[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Upgrading from RedHat (7.2)

Karsten Wade wrote:
> Having a snapshot of what was installed on the old system is also
> helpful in finding lost applications.
> rpm -qa > /tmp/all-packages

I've recently done something similar for my FC5 -> FC6 upgrade. I found
rpm -qa --qf '%{NAME}\n' > /tmp/rpm-pkgs
to be much more helpful, since it *just* lists the package name. That
makes it much easier to tell the difference between packages which have
been upgraded and packages which are no longer there.

(The problem is that, for example, rpm -q postfix-2.2.7 will say "not
installed" even if postfix-2.3.3-2 is installed.)

I came up with
for i in $(grep -v -- -devel /tmp/rpm-pkgs | egrep -v ^lib ) ; do rpm -q $i ; done | grep "is not installed" | cut -d \  -f2 | sort > /tmp/to-install
(which leaves out development and library packages).

Otherwise, it's difficult to get bash to reliably get the package name
out of a list of packages.

Hope this helps,


E-mail:     james@ | [Training spam filters] is somewhat like house-training a
aprilcottage.co.uk | puppy: it's a painful process, involving contact with
                   | unpleasant materials, and with a messy failure mode.
                   | And, somewhere in the process, something you care about
                   | is likely to get chewed up. -- Jonathan Corbet, lwn.net

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]