On Thu, 22 Jun 2006 13:46:51 +0200, Mick wrote:

> I am trying to unmerge KDE 3.4 using the script below and it comes up
> with an error.
> =========================================
> for x in `ls /usr/portage/kde-base`; do
>   if [ "$x" != "CVS" ]; then
>      echo -n "=kde-base/$x-3.4* "
>   fi
> done |xargs emerge -Cv
> =========================================
> 
> The error is:
> =========================================
> # ./unmerge-kde.sh
> --- Couldn't find '=kde-base/akode-3.4*' to unmerge
> =========================================

You are trying to unmerge akode 3.4 when you don't have it installed. I
take it you are trying to unmerge 3.4 having merged 3.5. The problem with
this script is that it assumes that the two releases used the same
package names. I prefer to use this, which removes all but the latest
version of each package.

equery --no-color --quiet list  kde-base/ | awk '{print $1}' | sed 
's:\(.*\)-3\.5.*:\1:' | xargs emerge --prune --pretend

Because it doesn't try to remove anything by explicit version number, it
won't have the sort of error you found. Remove --pretend when you are
happy with the results. You can check for any stray 3.4 packages left
over with

equery list kde-base/ | grep 3.4


-- 
Neil Bothwick

*Libra*: /(Sept 23--Oct 23)/ An unfortunate typo on your application
results in your being accepted into the Legion Of Superherpes.

Attachment: signature.asc
Description: PGP signature

Reply via email to