nasty hack around broken yum archive dependancy blockages

Michael Wiktowy mwiktowy at gmx.net
Mon Mar 15 06:00:29 UTC 2004


Rather than force packages into my system and risk package-dependency
doom I wrote and simple, terrible little sh script to yum update one
dependency-tree at a time to use when I run into problems.

It is terrible in the following ways:
- it does that initial header server check for *every* file that needs
updating ... unnecessary yum repository load
- it still tries to update files that it has already updated through
previous dependencies ... unnecessary yum repository load
- it doesn't make any effort at error logging/trapping ... potential for
things to go horribly wrong and have no record of it.

In saying that, it should auto-exclude dependency trees that are
blocking "yum update" while still maintaining a sane rpm database ...
but I make no guarantees.

I would love to see this kind of functionality folded into the -t option
of yum so that "yum -t update" will update those dependency-trees it
*can* and skip things it can't find dependencies for.

Here it is ... use at your own risk and I would invite anyone with more
sh-ability than me (i.e. almost everyone) to improve on the terrors
outlined above:

Dump the following into a file named "partial_yum_update"

#!/bin/sh
for i in `yum list updates |cut -f 1 -d " " |grep -A 500 -e ---- |\
grep -v -e ----` ; do
        echo "Updating $i"
        yum -y update $i
done


then execute it with "sh partial_yum_update"

Enjoy.

/Mike





More information about the fedora-test-list mailing list