gentoo package question

Gontran Zepeda plug-discuss@lists.plug.phoenix.az.us
Fri, 12 Apr 2002 15:41:55 -0700


* bob smith (sekretskwerl@yahoo.com) wrote:
> [ pkg-clean exists as a tool ]
> 
> In the guide it says that it "can be dangerous if used
> incorrectly".

That's a very cautious warning.  Just like using rm as root can be a
dangerous thing.

> I'm really tempted to run a "pkg-clean --yes" but
> that's kind of a scary warning :). I don't like that
> it's reporting I have 170 duplicates either. That
> command is just so inviting.

Don't give in sekretskwerl, it's that kind of laziness that will have you
running proprietary OSes! <g>

IIRC, what I did before I starting keeping my system on a 'one version
only' rule, was something like:

qpkg --dups -v | sort > my_dupes

then edited my_dupes, making sure that I deleted the version I wanted to
KEEP.  (Don't forget you'll want to keep two packages with different major
versions :). Then I ran something like this script on it.

#!/bin/bash
pkgs=$( cat my_dupes)
for i in $pkgs; do
	echo ">>> emerge $i unmerge \n"
	emerge $i unmerge # --safe
done

Yeah, I couldn't get the --safe option to work right on my rc_6 system.  I
think it's fixed in newer portages though.

After that you can dutifully maintain your installed ebuilds with pkg-clean
simply.


Gontran