yum leaving multiple versions installed

Jim Cornette fct-cornette at insight.rr.com
Sun Feb 5 19:39:53 UTC 2006


Ville Herva wrote:
> On Sun, Feb 05, 2006 at 02:00:21PM -0500, you [Jim Cornette] wrote:
>> dups="gpg-pubkey|kernel"
>> echo Starting Duplicate RPM Search.
>> echo ...
>> rpm -aq --queryformat "%{NAME}-%{ARCH}\n" | sort | uniq -c | grep -v -E 
>> " *1 "|awk '$1 > 1
>> { print $2 } ' | egrep -v $dups
>> echo Finished With Search.
>> echo
> 
> I small note: I think egrep -v "gpg-pubkey|kernel" will also match something
> like "fookernel" if such package name will ever appear. 
> 
> Perhaps something like
> 
>  egrep "^ +[0123456789]+ +($dups)$"
> 
> would be safer. Or then it is overkill :). I don't know :)
> 
> 
> -- v -- 
> 
> v at iki.fi
> 

I tried with removing the k from kernel and you are correct. There is a 
possibility for fookernel, kernelfoo and other undesired matches. It 
would most likely need some of Steve's expertise. I have to get rid of 
the linewrap from his entries and have not discovered what is missing 
yet. I'm enjoying the fi, exit status and the correct way to do a script 
presented.

Jim




More information about the fedora-test-list mailing list