Recently I install fedora to my laptop instead of ubuntu or any debian based distro, the application that I concern the most is yum. I have bad experience on yum previous during fedora core 5, which I find it extremely slow. Therefore I search for some guidelines from my friend Kagesenshi who are extremely active in Malaysia Fedora Community.
First question I throw to him is, Can yum be faster? He throws me back lots of tips over the IRC. Yeah! there are many tips indeed to make yum run faster, he wrote a post reviews all his kungfu on yum, don’t miss out his post, click here. Yum support plugins, one of them is Fastest Mirror, what this plugin does is it scan for the nearest mirror and pick the fastest one for you.
One of the yum’s shortcomings that bothers me so much is the latency of package searching, to search for available package, let say kmess, I do this:
yum search kmess
To do the same thing under apt, I do this
apt-cache search kmess
Seriously, apt-cache really out performs yum. One of the ‘feature’ that yum provides me is ‘intelligently’ do cache update when I ask for package searching. I really don’t understand the reason of such design. Why would it want to do the cache update when I just instruct it to do the package searching?
Well, I need to specified -C to force yum to do the package searching through the current available cache like this:
yum -C search kmess
It doesn’t really improve the speed of searching, but at least it do away the unexpected auto cache update.
I figure out a way which will makes my search faster, but for that I need to do some manual work before searching. One of the option yum support is to list all the packages which is either available or installed, well I can extract them into a file like this.
yum list all > yum-cache.txt
The result will look like this:
... ConsoleKit-x11.i386 0.2.3-3.fc8.1 installed GConf2.i386 2.20.1-1.fc8 installed GConf2-devel.i386 2.20.1-1.fc8 installed ImageMagick.i386 22.214.171.124-1.fc8 installed MAKEDEV.i386 3.23-1.2 installed MySQL-python.i386 1.2.2-4.fc8 installed ... SILLY-devel.i386 0.1.0-4.fc8 updates SIMVoleon.i386 2.0.1-7.fc8 fedora SIMVoleon-devel.i386 2.0.1-7.fc8 fedora SOAPpy.noarch 0.11.6-6.fc7 fedora ScientificPython.i386 2.6-10.fc8 fedora ScientificPython-devel.i386 2.6-10.fc8 fedora ...
Yeah, with that list now, I can search my package using grep
grep kmess yum-cache.txt
Or simply open it with less for consequent search
Yum list doesn’t extract the details package’s description, in case you need to search through the detail info, you can extract the detail info like this:
yum info all > yum-info.txt
Fedora 9 is on its way to us, lets see whether can yum be faster this time.
Some may suggest to use apt-rpm, but will apt-rpm as fast as apt-deb?