[CentOS] Shell Script - Compare packages. rpm.

Mon Jan 26 10:58:33 UTC 2009
Ian Forde <ian at duckland.org>

On Mon, 2009-01-26 at 08:26 -0200, Tiago Dias wrote:
> Hi,
> 
>          I need a script which makes the package compação rpm's
> through two text files ... 
> 
>          Since a file is the output of the command rpm-qa > pkg.out 
> 
>          And the second file is a list of several packages rpm's,
> multiple versions and architectures. 
> 
>          My idea is to compare a package x file pkg.out with several
> packages y of the file update.out and know whether a package and has a
> larger version of the package x installed and with that I return I
> have a package to be updated. 
> 
>         Does anyone can help me do this comparison? 

Looks like you want to see what the update packages are without doing
the updates, and without an internet connection.  About 5 years ago I
would have suggest running 'rpm --freshen --test
packagename-from-update.out'.  Today, I'd suggest saving even more time
and just a local instance of mrepo.  Configure your yum repos
in /etc/yum.repos.d/ to point to the repository, and install the
yum-updatesd package to find out what the new packages are... Why
reinvent the wheel? ;)

	-I