Bug 581628 - createrepo -C leaves empty .repodata dir behind when nothing is done
Summary: createrepo -C leaves empty .repodata dir behind when nothing is done
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: createrepo
Version: 14
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-04-12 20:18 UTC by Ville Skyttä
Modified: 2016-09-20 02:40 UTC (History)
5 users (show)

Fixed In Version: createrepo-0.9.9-4.fc15
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-28 21:05:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Remove .repodata when createrepo -C is used on a clean repository (776 bytes, patch)
2011-04-07 02:12 UTC, Aaron Faanes
no flags Details | Diff

Description Ville Skyttä 2010-04-12 20:18:15 UTC
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.

Comment 1 Bug Zapper 2010-07-30 11:19:07 UTC
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

Comment 2 Aaron Faanes 2011-04-07 02:09:13 UTC
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.

Comment 3 Aaron Faanes 2011-04-07 02:12:28 UTC
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.

Comment 4 seth vidal 2011-07-28 21:05:37 UTC
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.

Comment 5 Fedora Update System 2011-07-29 20:07:12 UTC
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

Comment 6 Fedora Update System 2011-08-02 02:06:37 UTC
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.

Comment 7 Paul Howarth 2011-08-02 18:26:15 UTC
Now I seem to have empty "garbageid" directories left after running:

createrepo --update .


Note You need to log in before you can comment on or make changes to this bug.