When using Koji with external repositories, Koji will merge the metadata of these repositories into its own build tag repository. If this build tag repository metadata is not updated regularly, it's going to be out-of-date and you start getting errors in your builds, varying from unresolved dependencies to older packages no longer being found.
Hence, I've created a cronjob to regenerate the external repository metadata once a day. However, since I use a lot of tag inheritance, I only want to trigger the re-generating at the top-level build tags; those that are the first to have the external repositories attached, and all other build tags inherit from. As they are being regenerated, then so will all descending build tags -hence I don't need to trigger them.
It's just a tiny little snippet but I wanted to share it with you anyway:
for tag in `koji list-tags | grep -E '\-build$'`; do
if [ -z "`koji list-tag-inheritance $tag | grep -v $tag | grep -E '\-build \(\w+\)$'`" ]; then
koji regen-repo --nowait $tag
echo "Tag $tag does inherit from other build tags, skipping"
Moving on to the next problem; Triggering such a regen-repo (or newRepo) task, will let Koji believe an event has taken place and thus will automatically start the newRepo task for descending build tags as well. However... completing a parent build tag newRepo task is also an event (duplicating the descendent build tag newRepo task). Or something like that. Maybe I need to review how my build tags inherit from one another ;-)
After a short visit to Linux Solutions in Paris, I've been working with Xavier Lamien on setting up Koji for RPM Fusion. We would make full use of the External Repository support, in order to import Red Hat Enterprise Linux (RHEL), CentOS, Extra Packages for Enterprise Linux (EPEL) and Fedora, so that packages can be built for Enterprise Linux 4 & 5, Fedora 11, 12, 13 and Rawhide.
Working on such, I thought it would be nice to share a few details on the subject, such as the way I've set up tag inheritance + external repositories + free + nonfree in RPM Fusion. Hence, here's a overview diagram of how it's set up. I've also made a more extensive document on the subject, for those of you wanting to set up there own buildsystem. This however will probably become a book sometime.