up2date, still in beta
Mon, 14 Nov 2005 19:19Recently, Red Hat's up2date tool gained an --upgrade-to-release
option, which tells it to ignore the current OS release version as
found in /etc/redhat-release and use the one you specify. You can
use this, then, to upgrade your install in-place to the next version.
I mean "recently" relatively; Debian's had this functionality since package
management systems were invented, though up2date has had since at
least the birth of RHEL ES 3.
Like most things about the Red Hat package management system, though, this doesn't just work.
up2date is at the mercy of the incomplete dependency information
that is contained within the RPM database. When up2date is asked to
upgrade the enture system, it chooses first to update itself, which it
does by checking the dependency list for up2date, the dependencies
of those dependencies, and so on, then works out how to resolve that
all and downloads the required packages.
When you upgrade from RHEL ES 3 to RHEL ES 4, you get two packages:
up2date and rhnlib.
rhnlib depends on functions within
rhpl, which according to RPM is installed, but alas, does not
contain the latest modules that rhnlib calls... you see, Red Hat
have left out some vitally important version information from the
package database.
up2date, having downloaded itself, then restarts itself, and fails.
[root@x up2date]# up2date --upgrade-to-release=4ES -u
Fetching Obsoletes list for channel: rhel-i386-es-4...
Fetching rpm headers...
########################################
Fetching Obsoletes list for channel: rhel-i386-es-4...
Name Version Rel
----------------------------------------------------------
up2date 4.4.50 4 i386
Testing package set / solving RPM inter-dependencies...
########################################
up2date-4.4.50-4.i386.rpm: ########################## Done.
rhnlib-1.8.1-1.p23.1.noarch ########################## Done.
New Up2date available
Preparing ########################################### [100%]
Installing...
1:rhnlib ########################################### [100%]
2:up2date ########################################### [100%]
warning: /etc/sysconfig/rhn/sources saved as /etc/sysconfig/rhn/sources.rpmsave
New Up2date available
The following packages were added to your selection to satisfy dependencies:
Name Version Release
--------------------------------------------------------------
rhnlib 1.8.1 1.p23.1
Restarting up2date
Restarting up2date
[root@x up2date]# Traceback (most recent call last):
File "/usr/sbin/up2date", line 27, in ?
from up2date_client import repoDirector
File "/usr/share/rhn/up2date_client/repoDirector.py", line 5, in ?
import rhnChannel
File "/usr/share/rhn/up2date_client/rhnChannel.py", line 10, in ?
import up2dateAuth
File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 5, in ?
import rpcServer
File "/usr/share/rhn/up2date_client/rpcServer.py", line 23, in ?
from rhn import rpclib
ImportError: No module named rhn
Debian gets a lot of shit for its release cycle, and its alleged barriers to use, but at least it gets the basics of package management right. I can only assume that the many dollars my company gives to Red Hat for the RHEL licences and RHN subscriptions goes towards development of new icon sets and clicky user admin tools, and staff work on reliable infrastructure in their spare time after hours.
time passes
more time passes
Rolling back to the ES3 version of up2date and then attempting to
upgrade other parts first, e.g. the kernel, trigger a TypeError
whilst walking the dependency tree. I'm amazed that up2date was
able to get as far as it did when it updated itself!
time continues to pass
So, for my own reference, and possibly yours, the complete (and maybe
excessive) list of RPM Hell required to get up2date both usable and
capable of upgrading the operating system follows here:
db4
gd
glibc
glibc-common
glibc-headers
glibc-utils
libselinux
libxml2
libxml2-python
popt
pyOpenSSL
python
rhnlib
rhpl
rpm
rpm-libs
rpm-python
up2date
You may need to remove some packages before installing, and specify
--nodeps ("may" is just a euphemism for "you will
absolutely need to"); --nodeps is an evil hack but necessary to
remain mostly sane otherwise you will be downloading most of the
archive. up2date will sort them out for you later when it graps all
the latest packages.