Getting source RPMs with yumdownloader (part 2)

June 14, 2007

To follow up the first installment, it turns out that enabling the source repositories has a side effect that I didn't think about at the time: it no longer looks in the default repositories.

(This is a general thing in yumdownloader: any time you specify a repository explicitly, it disables all the default ones. This makes me grumpy. While you can argue that this makes a sort of sense, it is not how yum itself behaves when you enable repositories, and yumdownloader uses the exact same command line switch that yum does, so people are going to expect it to behave the same.)

This matters because there are binary RPMs that are built from source RPMs with different names; the obvious case is most of the -devel RPMs, but there are a number of others that are less obvious (this is why the extra mapping step mentioned in the first installment exists). Unfortunately yumdownloader consults the normal binary RPM repositories to find this information, and without them gets nowhere.

(At least you get an error message.)

Since this means that you now really want to give yumdownloader at least seven switches (six of them with arguments) to download source RPMs, I now have a shell script I call yumsource:

; cat yumsource
yumdownloader --source \
    -e core-source -e core \
    -e extras-source -e extras \
    -e updates-source -e updates \

(Add extra repositories to taste. I admit my real script has the livna repository too.)

Written on 14 June 2007.
« What NFS file-based locking problems can happen
Why I am in system administration instead of programming »

Page tools: View Source, Add Comment.
Login: Password:
Atom Syndication: Recent Comments.

Last modified: Thu Jun 14 23:22:15 2007
This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.