Richard Fish posted
<[EMAIL PROTECTED]>, excerpted
below,  on Wed, 26 Apr 2006 22:10:27 -0700:

> So maybe this could be satisified by allowing user-defined categories
> of packages beyond system and world?  Something like world, system,
> fragile, non-fragile?

Actually, that's called set support, and it's actively planned for a
future portage.  I haven't been tracking it to the point where I know what
the implementation status is, but it's very likely in portage-core (aka
savior aka portage-ng, portage folks correct me if I'm simply confused) to
some extent now.  Again, portage-devel would be the preferred place for
discussions.  (As used to be common courtesy with groups/lists, reading up
on the last few weeks to 3 months worth of existing messages before
posting something that will then be understood to be a FAQ, is nice, but
the devs don't usually bite too hard if you don't. =8^)

> I think you could probably implement something like this yourself with
> a bit of trickery with the /var/lib/portage/world list.  You could
> copy world to non-fragile, remove anything that you consider fragile
> from it, and then do an "automatic" update with:
> 
> cp /var/lib/portage/world /var/lib/portage/world.bak
> cp /var/lib/portage/non-fragile /var/lib/portage/world
> emerge -DNuv world
> cp /var/lib/portage/world.bak /var/lib/portage/world
> 
> A similar script for the fragile packages would let you update those
> as a group, obviously using the -p and/or --ask options as you like.

Actually, the idea is slightly more complicated at one step, and slightly
less at another, but very workable with existing portage.

You can't simply begin with the world file, as that by definition won't
necessarily include stuff in system.  Rather, begin with the world file,
then add the stuff in system.  (The best way is probably to walk your
profile tree following the parent nodes, and include what you find in
packages.)

Or, start generate the initial list with an 

emerge --pretend --emptytree > newpkglist

Note that the latter, however, will include "trunk and branch" packages as
well as the "leaf" packages normally found in world.  This would therefore
require the use of --oneshot with any emerge based on the list, so as to
prevent stuffing world with unnecessary dependencies.  Those dependencies
can also change over time, one of the reasons you /don't/ want them in
world (and why an occasional emerge --depclean --pretend is recommended as
routine system hygiene on a Gentoo system, generating a list to either be
added to world or unmerged as necessary, read the docs for more
information if you aren't already doing this as part of your normal
routine).  Due to this change over time, if you use this generation
method, you'll also wish to regenerate the list periodically.  OTOH, it'll
give you a more accurate list to start with, if you consider any of the
dependencies especially fragile or robust, since they'd not be directly
handled using the first generation method, only treated as dependencies.

In any case, once you get your list and weed out the stuff you /don't/
want on it, rather than doing that copy trickery, try this:

emerge -NuDv $(cat /path/to/listfile)

Again, the usual pretend/ask situation applies, and --oneshot should be
added since you are updating specific packages from the command line. 
Also consider the effect of the -D and -N flags, as depending on your
exact needs, --newuse and --deep may or may not be suitable.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman in
http://www.linuxdevcenter.com/pub/a/linux/2004/12/22/rms_interview.html


-- 
gentoo-dev@gentoo.org mailing list

Reply via email to