YUM Irritations in F7 and F8
13 Nov 2007The fact that Fedora (and by extension, RHEL, CentOS, etc.), supports bi-arch platforms is a great thing. However, it does get to be very irritating when YUM decides that it should just pull in 32bit versions on a system with no other 32 bit packages. I’ve experienced this problem during installations, as anaconda now uses YUM to process package selections (since FC5).
It doesn’t stop with just anaconda installation and yum update commands, either. Almost every yum install command that I run decides to install both 64-bit and 32-bit packages. That is, unless I explicitly specify that I only want the 64-bit for each and every package. For example:
# yum install foo.x86_64 bar.x86_64
Why is yum doing this? It didn’t used to. I started experiencing this a little bit on FC6, but F7 and F8 both have horrific troubles with it. I need to do some more digging through Red Hat’s Bugzilla bug/issue tracking system, however, my first pass didn’t find anything to help explain the changes. After a little more research, I’ll file this as a bug.
In the meantime, here’s a quick-n-dirty hack I put together to run updates. The first step is to capture the output of yum update to a file (be patient, this command can take for-freakin-ever to run). Step two is to run the update itself. Here it is as a shell script:
#/bin/bash
# Get a temporary file to use.
TO_UPDATE="$(mktemp)"
# Populate the temporary file with the list of available updates.
yes n | yum update > ${TO_UPDATE}
# Composite an update command that does not include any 32-bit stuff.
yum update $(for i in $(sed '/i[3456]86/d' ${TO_UPDATE} |
sed '/^Updating/d' |
sed '/^Installing/d' |
grep -v "^$" |
grep -v replacing |
cut -d" " -f2); do
rpm -q --qf "%{name}.%{arch}\n" $i; done |
grep -v "is not installed$")
# Optional cleanup.
if [ "${1}" = "-k" ]; then
mv ${TO_UPDATE} /root/$(date --iso-8601)-$(basename ${TO_UPDATE})
else
rm ${TO_UPDATE}
fi
You will have to run a separate yum update command for any 32-bit stuff you really do have installed and want to update.
I know this could be streamlined (especially the part that constructs the yum update command), but as I’m not planing on making this a permanent fix, I’m just not going to bother with it right now. Still, feel free to comment or trackback with other solutions or optimizations of mine.






add ‘exclude=*.i386 *.i586 *.i686′ into your /etc/yum.conf and it should fix the problem. I also read somewhere that in F9 they were looking into making it so it only did the appropriate architecture.
Cheers,
Herlo