[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: yum leaving multiple versions installed
- From: Steve Grubb <sgrubb redhat com>
- To: fedora-test-list redhat com
- Cc: vherva vianova fi
- Subject: Re: yum leaving multiple versions installed
- Date: Sun, 5 Feb 2006 12:15:55 -0500
On Sunday 05 February 2006 08:12, Steve Grubb wrote:
> I looked at this a little. In your scripts wherever you have %{NAME} change
> that to %{NAME}-%{ARCH} and then it spots multilib packages.
Here's what I'm using modified from your first piece:
#!/bin/sh
dups="gpg-pubkey|kernel-`uname -m`"
rpm -qa --queryformat "%{NAME}-%{ARCH}\n" | sort | uniq -c | awk '$1 > 1
{ print $2 } ' | egrep -v $dups
But if you are on a multilib system, you can have the above script report
nothing wrong since yum may not have pulled both i386 & x86_64 libs. In that
case, you can use the following script to look even deeper for version
mismatches:
#!/bin/sh
dups="gpg-pubkey"
rpm -qa --queryformat "%{NAME}\n" | sort | uniq -c | egrep -v $dups | awk '$1
== 2 { print $2 } '| xargs rpm -q --queryformat "%{NAME}-%{VERSION}\n" | sort
| uniq -c | awk '$1 == 1 { print $2 }'
-Steve
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]