Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USE flag organization.
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Circuitsoft
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jul 2004
Posts: 112

PostPosted: Wed Sep 05, 2007 5:55 am    Post subject: USE flag organization. Reply with quote

Came up with a way to keep my use flags a little more readable. Wonder what everyone else thinks:

USE="gtk qt qt3 qt4 fltk tk neXt -gnome -kde startup-notification fontconfig" # Desktop Options
USE="$USE mmx sse alsa -oss dbus hal fam acpi caps pcmcia disk-partition X xv opengl xcomposite fbcon directfb ieee1394" # Platform
USE="$USE ldap samba slp kerberos winbind sasl srp authdaemond avahi gnutls httpd upnp network" # Networking options
USE="$USE vim-syntax bash-completion plugins spell nsplugin skins encode" # App Options
USE="$USE audiofile libsamplerate sndfile sdl imlib t1lib lcms cairo glitz" # Media Libraries
USE="$USE xml truetype pango libnotify xcb djbfft bzip2 rle gd expat sqlite" # Other Libraries
USE="$USE cscope gs graphviz tcl jack" # Application support
USE="$USE jpeg jbig jpeg2k exif svg png mng gif tiff djvu wmf pdf xpm xface fpx hdri openexr q8 q32" # Image formats
USE="$USE mpeg theora win32codecs x264 xvid quicktime real" # Video formats
USE="$USE a52 aac amr dts flac mod mp3 musepack speex vorbis" # Audio formats
USE="$USE cdda daap dc1394 dvb dvd live matroska ogg rtsp shout stream vcd cddb" # Media containers/transports
Back to top
View user's profile Send private message
omp
Retired Dev
Retired Dev


Joined: 10 Sep 2005
Posts: 1018
Location: Glendale, California

PostPosted: Wed Sep 05, 2007 6:03 am    Post subject: Reply with quote

Pretty nice, I must say.

I personally have nowhere near as many global USE flags set, so I just keep it in one long alphabetised line, with flags that are on and flags that are off separated.
_________________
meow.
Back to top
View user's profile Send private message
Deem3n
n00b
n00b


Joined: 15 Jun 2007
Posts: 20

PostPosted: Wed Sep 05, 2007 6:38 am    Post subject: Reply with quote

Thanks for sharing.
My use flag organisation:
http://video4admin.com/stuff/make.conf
Back to top
View user's profile Send private message
Circuitsoft
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jul 2004
Posts: 112

PostPosted: Wed Sep 05, 2007 7:07 am    Post subject: Reply with quote

omp wrote:
I personally have nowhere near as many global USE flags set, so I just keep it in one long alphabetised line, with flags that are on and flags that are off separated.


Do you attempt to have a complete desktop/office/multimedia system? Yes, I may have quite a few flags turned on, but I have a reason for each one, and each one in make.conf is used in more than one ebuild. I have as much in /etc/portage/package.use as I can, but many just need to be global. (the few, such as win32codecs, which seem like they would go in package.use are here because I use more than one media player)
Back to top
View user's profile Send private message
rgk
Tux's lil' helper
Tux's lil' helper


Joined: 06 Apr 2007
Posts: 140
Location: ny

PostPosted: Wed Sep 05, 2007 7:08 am    Post subject: Reply with quote

mine is a complete mess, i have been wanting to organize it but i never did, i will now :D
_________________
MadGizmo.com is awesome.
Back to top
View user's profile Send private message
enderandrew
l33t
l33t


Joined: 25 Oct 2005
Posts: 731

PostPosted: Wed Sep 05, 2007 7:11 am    Post subject: Reply with quote

I used to use a similar method, but these days I just sort them alphabetically rather than in groups.
_________________
Nihilism makes me smile.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Sep 05, 2007 10:43 am    Post subject: Reply with quote

Nice :-)

You can use: USE+="blah blah" in bash (which all ebuilds are.)
_________________
creaker wrote:
systemd. It is a really ass pain

update - "a most excellent portage wrapper"

#friendly-coders -- We're still here for you™ ;)
Back to top
View user's profile Send private message
pdr
l33t
l33t


Joined: 20 Mar 2004
Posts: 618

PostPosted: Wed Sep 05, 2007 11:25 am    Post subject: Reply with quote

I also alphabetize (easier to find if a flag is in there or not), but recently went to multiple lines in my workstation by using line continuation (backslash as last character on the line) - made it easier to edit than hitting 'b' or 'e' in command mode a whole bunch of times in vi.. Example:
Code:
USE="one two three \
    four five six \
    seven eight nine"


However, now I use cream as root to edit, so its not a navigation thing any more (can just click to move cursor), just for readability
Back to top
View user's profile Send private message
d2_racing
Bodhisattva
Bodhisattva


Joined: 25 Apr 2005
Posts: 13047
Location: Ste-Foy,Canada

PostPosted: Wed Sep 05, 2007 11:30 am    Post subject: Reply with quote

Yeah, this is a great idea...a saw a lot a personal variable, but the use=#use + your use flag is great !
Back to top
View user's profile Send private message
aidanjt
Veteran
Veteran


Joined: 20 Feb 2005
Posts: 1118
Location: Rep. of Ireland

PostPosted: Wed Sep 05, 2007 11:44 am    Post subject: Reply with quote

/etc/portage/package.use/${major-grouping}.use

make.conf sucks for anything but globally applicable USE flags options, and ufed does a fine job of managing them. :/
_________________
juniper wrote:
you experience political reality dilation when travelling at american political speeds. it's in einstein's formulas. it's not their fault.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Sep 05, 2007 12:19 pm    Post subject: Reply with quote

AidanJT wrote:
make.conf sucks for anything but globally applicable USE flags options, and ufed does a fine job of managing them. :/

Agreed, although I think the OP answered that concern.

The \ character isn't needed at the end of the line, pdr, as bash does multi-line strings quite happily.
Back to top
View user's profile Send private message
jabol
Apprentice
Apprentice


Joined: 05 Oct 2005
Posts: 269

PostPosted: Wed Sep 05, 2007 3:14 pm    Post subject: Reply with quote

And I use euse :D . You may imagine how does this look like :lol:
Back to top
View user's profile Send private message
hielvc
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2805
Location: Oceanside, Ca

PostPosted: Wed Sep 05, 2007 3:17 pm    Post subject: Reply with quote

Quote:
The \ character isn't needed at the end of the line, pdr, as bash does multi-line strings quite happily.
But nano do :lol:
_________________
An A-Z Index of the Linux BASH command line
Back to top
View user's profile Send private message
Suicidal
l33t
l33t


Joined: 30 Jul 2003
Posts: 959
Location: /dev/null

PostPosted: Wed Sep 05, 2007 3:26 pm    Post subject: Reply with quote

Wow my laziness knows no bounds, I just use ufed to manage $USE
Back to top
View user's profile Send private message
aidanjt
Veteran
Veteran


Joined: 20 Feb 2005
Posts: 1118
Location: Rep. of Ireland

PostPosted: Wed Sep 05, 2007 8:38 pm    Post subject: Reply with quote

Suicidal wrote:
Wow my laziness knows no bounds, I just use ufed to manage $USE


So do I for the global stuff. Else I just use /etc/portgage/package.use/*, I've been meaning to do a script for minor/perpackage flags but I haven't got around to it yet.
_________________
juniper wrote:
you experience political reality dilation when travelling at american political speeds. it's in einstein's formulas. it's not their fault.
Back to top
View user's profile Send private message
omp
Retired Dev
Retired Dev


Joined: 10 Sep 2005
Posts: 1018
Location: Glendale, California

PostPosted: Wed Sep 05, 2007 9:04 pm    Post subject: Reply with quote

Circuitsoft wrote:
omp wrote:
I personally have nowhere near as many global USE flags set, so I just keep it in one long alphabetised line, with flags that are on and flags that are off separated.


Do you attempt to have a complete desktop/office/multimedia system?

Well, I have enough applications to satisfy my daily usage.

My flags, in case you are interested:
Code:
*/* aac aalib alsa cairo firefox flac gif gtk imap jpeg mp3 nptl nptlonly ogg opengl pango png theora tiff truetype unicode vim-syntax vorbis X -cups
*/* INPUT_DEVICES: -* evdev keyboard mouse
*/* VIDEO_CARDS: -* nvidia
app-crypt/pinentry -gtk -ncurses
dev-cpp/gtkmm accessibility
dev-libs/pwlib ldap
mail-client/mozilla-thunderbird -crypt
media-gfx/gimp jpeg png tiff
media-sound/lame -gtk
media-sound/mixxx -python
media-sound/ncmpc artist-screen key-screen search-screen
media-video/mplayer xv xvid
net-im/pidgin spell
sys-apps/paludis bash-completion inquisitio qa ruby

_________________
meow.
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Wed Sep 05, 2007 10:00 pm    Post subject: Reply with quote

hielvc wrote:
Quote:
The \ character isn't needed at the end of the line, pdr, as bash does multi-line strings quite happily.
But nano do :lol:

I have alias nano='nano -w' in /etc/bash/bashrc (and ufed seems to keep the variable nicely formatted in any case -- without slashes ;)
Back to top
View user's profile Send private message
96140
Retired Dev
Retired Dev


Joined: 23 Jan 2005
Posts: 1324

PostPosted: Wed Sep 05, 2007 11:58 pm    Post subject: Reply with quote

--

Last edited by 96140 on Fri Sep 13, 2013 9:06 am; edited 1 time in total
Back to top
View user's profile Send private message
omp
Retired Dev
Retired Dev


Joined: 10 Sep 2005
Posts: 1018
Location: Glendale, California

PostPosted: Thu Sep 06, 2007 12:17 am    Post subject: Reply with quote

nightmorph wrote:
It's so easy to cat foo >> /etc/portage/package.use, but that means going in every month or two to reorganize by category/packagename.

Can't you just do something along the lines of the following to sort it?
Code:
sort /etc/portage/package.use > /etc/portage/package.use


[edit] Apparently you shouldn't do this... :lol:
_________________
meow.


Last edited by omp on Thu Sep 06, 2007 1:01 am; edited 1 time in total
Back to top
View user's profile Send private message
96140
Retired Dev
Retired Dev


Joined: 23 Jan 2005
Posts: 1324

PostPosted: Thu Sep 06, 2007 12:47 am    Post subject: Reply with quote

--

Last edited by 96140 on Fri Sep 13, 2013 9:06 am; edited 1 time in total
Back to top
View user's profile Send private message
Tolstoi
l33t
l33t


Joined: 20 May 2004
Posts: 678

PostPosted: Thu Sep 06, 2007 6:30 pm    Post subject: Reply with quote

I just ordered my use flags in make.conf alphabetically recently, that does it for me.
Back to top
View user's profile Send private message
libero
Tux's lil' helper
Tux's lil' helper


Joined: 26 Mar 2004
Posts: 87
Location: Tokyo

PostPosted: Thu Sep 13, 2007 1:53 pm    Post subject: Reply with quote

FYI

Made this handy script last year: hope you can use it too:

https://forums.gentoo.org/viewtopic-t-407903-start-0-postdays-0-postorder-asc-highlight-.html

quick one-line command to reorder USE flags alphabetically, which you can then paste back into your make.conf

Leo
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Sep 14, 2007 8:28 am    Post subject: Reply with quote

omp wrote:
nightmorph wrote:
It's so easy to cat foo >> /etc/portage/package.use, but that means going in every month or two to reorganize by category/packagename.

Can't you just do something along the lines of the following to sort it?
Code:
sort /etc/portage/package.use > /etc/portage/package.use


[edit] Apparently you shouldn't do this... :lol:

The redirect clobbers the file before the command starts so all you do is delete the file.
Code:
sort -k1 /etc/portage/package.use > newFile


nightmorph wrote:
Lame. Rather than using a bash hack that you can't get around, just use /etc/nanorc -- that's what it's there for.

Gee whiz, how old are you?! ;P Why on earth would I ever want to run nano with word wrap? I only use it occasionally in the console, but thanks for the pointer to the config file. I still don't want to use it though, after having looked at it. There was an interesting post about ebuild highlighting, but I do that in Kate anyhow (I should edit that with a newer version i think at some point) or vim in the console if I have no gui.
And BTW the alias isn't BASH-specific, I just happen to like the Bourne-Again SHell.
Back to top
View user's profile Send private message
Kyro
n00b
n00b


Joined: 20 Dec 2002
Posts: 56
Location: Over here

PostPosted: Fri Sep 14, 2007 8:27 pm    Post subject: Reply with quote

Mine's ordered the following way

1_USE="3dnow 3dnowext 7zip"
A_USE="a52 aac ace acpi (etc...)"
B_USE="bash-completion bcmath (etc...)"
down to
Z_USE="zip zlib"
and
EX_USE="-arts"
where I put stuff I explicitly don't want. This is then followed by a simple:

USE="${A_USE} ${B_USE} ${C_USE} ... ${Z_USE} ${EX_USE}" line, which gathers it all together.

Makes it easy to read and easy to manage, in my opinion. :)
_________________
Quis custodiet ipsos custodes?
Back to top
View user's profile Send private message
ocin
Guru
Guru


Joined: 01 Jan 2006
Posts: 500

PostPosted: Sat Sep 15, 2007 1:19 am    Post subject: Reply with quote

I use ufed :p
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum