Tonko Mulder <[EMAIL PROTECTED]> posted
[EMAIL PROTECTED], excerpted below, on  Mon, 24 Nov 2008
06:14:44 +0100:

> for some reason my world file is kind of messed up. I used regenworld to
> restore it to it's old self, but that didn't quite work as well as I
> hoped it would.
> 
> I also rebuild everything, in the hope that would lead to that the
> packages would be added to the world file.
> 
> No success.
> And since I tend to experiment a lot with ebuilds, I use emerge
> --depclean -pv quite often. But when I do this now, it wants to remove
> stuff I don't want to be removed.
> 
> Any thoughts on this?

Try emerge with the -n/--noreplace option, which is sort of the reverse 
of -1/--oneshot (and not to be confused with -N/--newuse).  If the 
package is already merged, -n just adds it to the world file without 
actually remerging it.  Then --depclean won't try to remove it or its 
dependencies.

I do this all the time since I use --oneshot in my (stub-scripted) normal 
emerge commands.  Unless I know I want to keep it (in which case I use a 
special version without the --oneshot), I'll use a script that adds -1 by 
default.  That way I can try out a package and decide if I like it, 
before either adding it to world using emerge -n or --depcleaning it and 
dependencies.  Then, since I always use -a or -p as well, when I run 
--depclean I'll get a list of packages I haven't decided on yet.  I 
seldom run --depclean and let it do its thing, preferring to use emerge 
-C to unmerge packages on the list specifically, if I've decided not to 
keep them, or emerge -n to add them to my world file if I do want to keep 
them.  If I've not decided yet, they just sit in the list, but that 
doesn't happen very long for very many packages, and my --depclean -p 
list is usually empty.

Also note the --with-bdeps=<y|n> option.  Since I always want build 
dependencies retained, I have EMERGE_DEFAULT_OPTIONS="--with-bdeps=y" set 
(along with --keep-going and --nospinner, but the bdeps option is what is 
important here).  Otherwise, --depclean will always want to unmerge build 
dependencies as they aren't needed to actually run the package, only to 
build it.

That's what I find works for me.  YMMV.

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