createrepo -C generates an empty .repodata dir and leaves it behind when there was nothing to do on a repo. I suppose creating the .repodata dir should be deferred until it is known that it will be actually used, and let the usual cleanup routines clean it up.
This bug appears to have been reported against 'rawhide' during the Fedora 14 development cycle. Changing version to '14'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
I ran into this bug today. It's minor, but it does dirty my rsync script a bit: Here's a quick demonstration: mkdir -p /tmp/dummyrepo cd /tmp/dummyrepo yumdownloader createrepo # or any other package you want createrepo . createrepo -C . [ -d .repodata ] && echo 'Temporary directory remains after createrepo exits' Looking at the source, the .repodata dir is created when createrepo.MetaDataGenerator is constructed. Ordinarily, this directory would replace the current repodata. However, the "-C" option causes createrepo to exit early, evading the replacement. As a result, the directory remains.
Created attachment 490460 [details] Remove .repodata when createrepo -C is used on a clean repository Fixes the bug on my system. This code should probably live inside the object that created the tempdir, but I don't have the necessary expertise to know for sure.
I've applied a slightly different change upstream that handles this bug. IT is mostly just to put the cleanup code in the place where it is only handled once for cli and non-cli callers. thank you.
createrepo-0.9.9-4.fc15 has been submitted as an update for Fedora 15. https://admin.fedoraproject.org/updates/createrepo-0.9.9-4.fc15
createrepo-0.9.9-4.fc15 has been pushed to the Fedora 15 stable repository. If problems still persist, please make note of it in this bug report.
Now I seem to have empty "garbageid" directories left after running: createrepo --update .