Goran � schreef:
> Thanks! I didn't only understand something about per packages which 
> you mentioned in your mail.

USE flags can be (and of course, are) set globally in /etc/make.conf
(and /usr/portage/profiles/use.defaults), but USE flags can also be
enabled or disabled for a particular package only using
/etc/portage/package.use.

You might do this for a number of reasons:

1) Every USE flag does not apply to every package, and some local USE
flags only apply to one specific package. It keeps your /etc/make.conf
neater and easier to read if it only contains the "really" global USE
flags. Some of us care about that kind of thing :-) .

But the main reason you'd use /etc/portage/package.use is because

2) You have a globally-enabled (or -disabled) USE flag that you want to
disable (or enable), for a particular package.

Example (from my own config):

USE="*-kde* -arts -eds -esd -apache -apache2 16bit 3dnow aalib acpi -apm
audiofile bash-completion -berkdb bigger-fonts bitmap-fonts bmp bzip2
caps cairo cddb cdr curl dbus dga directfb dri dts dv dvd exif expat
extrafilters fam fbcon ffmpeg firefox flac font-server gamin ggi
gimpprint glut gtkhtml gnutls -gstreamer gstreamer10 guile hal iconv idn
imagemagick inkjar inotify -ipv6 jack *java* jikes kdeenablefinal
kdexdeltas lcms ldap libcaca libnotify lua maildir math mmx mng
-mozilla mpi nas nfs nptl nptlonly offensive openexr -pam pcre pic
portaudio povray *samba* scanner slang sndfile socks5 sqlite sse -sse2
svg svga tcltk tetex theora threads tiff toolbar truetype-fonts
type1-fonts unicode usb v4l wmf xml xprint Xaw3d v4l v4l2 xvid yv12"

As you can hopefully see, the "java" and "samba" flags are enabled
(globally), and the "kde" flag is disabled (globally). You can't see it
here, but the default profile I'm using also disables the "doc" USE flag
(which is extra documentation, not man pages and the like), as well as
the "symlink" USE flag (which automatically re-targets the
/usr/src/linux symlink when a new kernel source is installed.

Now, the "java" USE flag is enabled globally, and it is a valid USE flag for
OpenOffice, but I don't want it enabled for OpenOffice, because I don't
need for OO.o to use Java, and it slows an already-slow application down.

As for "doc", well, I have Imagemagick installed, and it's very complex,
so I want the extra documentation, but generally, I don't need it;
--help and man pages are usually good enough.

As for "samba", I don't want Midnight Commander to have samba support,
because if I'm using mc that extensively, my system is probably borked
somehow (hey, I'm a GUI kinda girl, as great as mc is), or if somebody
has compromised the system and has managed remote command-line access to
mc, at least they can't just go right to the network shares. In either
case, I want to limit access to network shares to try and minimize the
ability to do damage to them. (Yes, I know it's not massively
protective and perhaps not even effective, but at least I care enough to
try-- and since Gentoo gives me the option, I took it ;-) .)

As for "kde", well I use it extremely rarely, but I want the OpenOffice
to be correctly integrated with the environment if I do ever have to log
into KDE rather than my preferred DE (KDE is my fallback DE of last
X-resort, and it's much more likely that I'll need to print out a cv or
something during a computer emergency that resulted in my having to use
my last X-based fallback than that I'll have to read my mail-- that can
wait, or I'll use webmail-- which is why you'll see that my fallback
mail-client does not have kde support).

So, in /etc/portage/package.use I have the following lines (among others):

app-misc/mc 7zip -X -samba
app-office/openoffice-bin kde -java
media-gfx/imagemagick fpx inkjar plugin doc
=sys-kernel/gentoo-sources-2.6.15-r7 symlink


Thus, when I do an emerge involving those packages :

 emerge -pv openoffice-bin mc imagemagick mozilla-firefox
kdebase-kioslaves sylpheed-claws =sys-kernel/gentoo-sources-2.6.15-r7
=sys-kernel/gentoo-sources-2.6.15-r5

 (additional packages to show use of the default settings)

|>>> cfg-update-1.8.0-r3 : Building checksum index... (takes a few
seconds)  done!

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] app-office/openoffice-bin-2.0.2  USE="gnome -java" 0 kB
[ebuild   R   ] app-misc/mc-4.6.0-r14  USE="7zip gpm ncurses nls slang
unicode -X -pam -samba" 49 kB
[ebuild   R   ] media-gfx/imagemagick-6.2.6.0  USE="X bzip2 doc fpx jpeg
lcms mpeg perl png tiff truetype wmf xml2 zlib -graphviz -gs -jbig
-minimal -nocxx" 0 kB
[ebuild   R   ] www-client/mozilla-firefox-1.5.0.1-r2  USE="gnome java
xprint -debug -ipv6 -mozdevelop -xinerama" 0 kB
[ebuild   R   ] kde-base/kdebase-kioslaves-3.5.1  USE="hal
kdeenablefinal kdexdeltas ldap openexr samba -arts -debug -xinerama" 0 kB
[ebuild   R   ] mail-client/sylpheed-claws-2.0.0  USE="clamav crypt
dillo gnome ldap spamassassin spell ssl -doc -imap -ipv6 -kde -pda
-xface" 0 kB
[ebuild   R   ] sys-kernel/gentoo-sources-2.6.15-r7  USE="symlink -build
-doc" 0 kB
[ebuild   R   ] sys-kernel/gentoo-sources-2.6.15-r5  USE="-build -doc
-symlink" 0 kB


So firefox is compiled is compiled with java support but openoffice-bin
does not have java support; kdebase-kioslaves has samba support (so I
can connect to network shares in konqueror or, more likely, krusader),
but mc does not; imagemagick will install its docs but sylpheed-claws
will not; openoffice-bin has kde support but sylpheed-claws does not. In
fact, you may notice that Imagemagick has X support, but midnight
commander does not. As for the kernels, I had 2.6.15-r7 (specifically)
change the symlink during emerge because I was going to change my video
card later that day, so I knew I was going to compile that kernel
immediately (so I could install support for the replacement card, then
shut down and install it), but normally it might be hours or days later
after the source is installed before I actually compile and install a new
kernel, and since I have several packages that compile against the
kernel source, I usually leave the link disabled and change it manually
when I get around to it, then just run module-rebuild afterwards. Not
that -r7 kernel, though, on that particular day; that particular kernel
upgrade needed special treatment (hence the version atom in the
package.use line), because the conditions that day were different, for me.

This is  what "customization" means, in Gentoo. This is *my* system, not
my boyfriend's, or my (future) mother-in-law's, and certainly not some
"average user's". *Mine*. And it's customized, by me, to my specific and
personal needs for it. (Can you see the fearsome light of pride in my
eyes? Thank you, Gentoo devs, for this; couldn't have done it without
you :-D .)

The point being that you can customize the operation of your system,
what it does, and how it does it, down to almost the very smallest
detail, based upon who you are and how you use the system, and
per-package USE flags are part of that.

But it does mean that you need to know exactly how you do use the system
(know thyself), and know how to control it (read the docs-- man portage
is a good place to start).

Hope this helps,
Holly
-- 
gentoo-user@gentoo.org mailing list

Reply via email to