Michael Orlitzky posted on Thu, 17 Jan 2013 11:31:53 -0500 as excerpted:

> In either case, to keep your world file accurate, you have to remember
> to type an additional useless parameter every time you run the command.
> When you're running depclean, you have to cross your fingers and hope
> nobody forgot the magic --dont-break-world parameter.
> 
> I've  "solved" this by installing every single package as a dependency
> of something in our company repo. So we emerge
> dev-util/mike_wants_to_be_able_to_run_strace_on_apache (depending on
> strace) instead of dev-util/strace. This makes it obvious what can be
> removed; we don't have normal packages listed in the world file, so if
> you see one, it was a mistake.

Different (and IMO nicer, but it requires portage sets support) solution 
here, same problem.

Two part solution:

1) For years, I've had a set of aliases to emerge, most of which add -1, 
so I don't have to worry about world-file pollution.  The aliases break 
down into two sets, ea* and ep*, emerge --ask and emerge --pretend.  

Examples:

eaw     emerge --ask @world (--update --deep --newuse are there too, and 
--jobs, etc, --with-bdeps=y is in my emerge defaults)

epw     same thing basically, but --pretend instead of --ask.

eptw    emerge --pretend --tree @world

ea      emerge -av1 $*

epl     emerge -pvlO $* (see the changelog for an upgrade before I do it)

Significant to this discussion:

ea2     emerge -av --select $* (the 2 being shorthand for NOT oneshot)

(I have tab-completion stubs built on the normal emerge completions, too, 
so get full tab-completion on my short forms. =:^)


I don't even /use/ the long forms any longer, except for copying to bugs, 
etc, only my short forms.  So no weird stuff in @world, as I have -1 on 
my short forms by default, and specifically use the e*2 forms when I WANT 
it in world.  As I said, I've been doing this for years now.

2) Portage sets support made things even better.  They first appeared 
shortly before I setup my netbook, and in the process of going thru my 
existing world file to figure out what I wanted on the netbook, I simply 
split the world file into a bunch of categorized sets, beginning with the 
kde sets, which I manage in parallel to the ones found in the kde overlay 
(but with some package entries commented out), but extended to dev, 
net.admin, net.user, etc.

Now my world-file is normally empty, with all packages that would 
normally be in world listed in a set instead, with the sets in turn 
listed in the world_sets file.

So there's only two conditions under which a package would be listed in 
the world file instead of in a set to be found in world_sets:

2a) I sometimes use the world file as a "package purgatory", for packages 
I'm testing so I don't want them removed by depclean, but I've not yet 
decided to keep, so I don't want them in my normal sets, either.  The 
world file is thus a very convenient middle ground. =:^)

2b) I somehow made a mistake, and something ended up in world that 
shouldn't have.  (Due to my longstanding alias usage, this case has so 
far been entirely theoretical; I've not made that mistake since the 
introduction of sets... yet.  But I'm glad the protection's there, in 
case I do. =:^)

-- 
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


Reply via email to