[PATCH] Running update_rpms against a SuSE-like update tree

Ralph Angenendt <[email protected]> Fri, 22 Nov 2002 15:49:37 +0100
Newsgroups gmane.linux.suse.alice
Message-ID <[email protected]>
--fdj2RfSjLxBAspz7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi list,

I found a very small error(?) in alice, which makes it impossible to run
the script update_rpms against an update tree having the same structure
as the update tree on ftp.suse.com.

IMPACT:

Some packages are available in several versions at the moment, because
SuSE made several updates to the package. For example: n2/openldap at
the moment has subversions 28 and 33 on the ftp.suse.com server - and on
our updates tree for obvious reasons :)

update_rpms doesn't decide which packages it should update, it just
issues a=20

'find -type f -name "*.rpm" ! -name "k_*.rpm" [...]|xargs rpm --nodeps -Fvh=
'=20

thus using the freshen option included in rpm.

Now rpm -F barfs, if there are several versions of the same package it
is supposed to update and leaves you with the already installed version.

Note: This won't happen, if you maintain your update tree by hand,
assuring that there is just *one* version of a package in this tree. You
don't really need this patch.

SOLUTION:

For every package in the SuSE style update tree, there is a symbolic
link to the *newest* version of the package. If you let find run against
symbolic links only, update_rpms works again.

For those people, who don't want to use a patch I've put up a patched
rpm on <http://strg-alt-entf.org/alice-0.9.5-12.rpm>. This rpm was
converted from a tar file with alien, as I haven't found a source rpm
for this version of alice. This rpm should have the following md5sum:

ca2f57898693561937b41f9177a8a485  alice-0.9.5-12.rpm

For all other people - here's the "patch":

--------------------------8<--------------------------

--- update_rpms.orig	Fri Nov 22 15:23:01 2002
+++ update_rpms	Fri Nov 22 15:23:27 2002
@@ -80,7 +80,7 @@
=20
 	# Find the packages and update them
 	cd $LOCAL_DIR
-	find -type f -name "*.rpm" ! -name "k_*" ! -name "*src.rpm" | grep -v "./=
kernel/" | xargs rpm --nodeps -Fhv=20
+	find -type l -name "*.rpm" ! -name "k_*" ! -name "*src.rpm" | grep -v "./=
kernel/" | xargs rpm --nodeps -Fhv=20
 	cd -
=20
 	# Clean up the temporary files

--------------------------8<--------------------------


HTH, HAND,

Ralph Angenendt

--fdj2RfSjLxBAspz7
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)

iD8DBQE93kQBjB6yu/0L7eURAg4+AJ4k3friTVpvrEv3RwObdKAkafe6hgCeLfMq
/1W9v3pGNYZPAvcBGxC/hwc=
=nmjW
-----END PGP SIGNATURE-----

--fdj2RfSjLxBAspz7--