[Yum] Interesting yum feature with chroot
dawson at fnal.gov
Tue Feb 11 15:20:40 UTC 2003
This is an interesting feature of yum that I came upon by accident. Not that
I didn't think yum could do this, it just had never crossed my mind. And
incase anyone needs to do this, now you know you can.
I have several build machines with several version's of linux on several
partitions. One nice thing about this is that if I need to build the same
thing on two different versions of linux, I can just chroot in the other
partition, and build away. I usually do this when building things for Fermi
Linux 7.3.1 and 7.1.1.
Well, as is often the case, I sometimes don't have the right libraries or
rpm's when I'm building, and it's always been a hastle to get it installed on
the other partition, because I have to download it, move it to where that
partition can see it, and install it.
Well yesterday I was building KDE 3.1 on my FL 7.1.1 paritition, needed the
python-devel rpm, and just did a yum install python-devel in the chrooted
window, purely by instinct. About 10 minutes later it hit me what I had just
done, and double checked to make sure I really did that. Sure enough, my
yum.conf was setup correctly on that chroot partition, and it pulled in the
right rpm's and everything.
So the end result is, you can use yum even when you are chroot'ed.
p.s. Some of you might have already known that you could do that, but for me
it was a neat revelation, and a further time saver.
Troy Dawson dawson at fnal.gov (630)840-6468
Fermilab ComputingDivision/OSS CSI Group
More information about the Yum