Bug 1001629 - [abrt] createrepo-0.9.9-21.fc19: __init__.py:70:__init__:OSError: [Errno 2] No such file or directory
[abrt] createrepo-0.9.9-21.fc19: __init__.py:70:__init__:OSError: [Errno 2] N...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: createrepo (Show other bugs)
19
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
abrt_hash:fb54af973d5b3cfa3cec6aaacdb...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-27 08:30 EDT by fedoraxx.bugzilla.redhat
Modified: 2013-10-29 21:53 EDT (History)
3 users (show)

See Also:
Fixed In Version: createrepo-0.10-1.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-29 21:53:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (561 bytes, text/plain)
2013-08-27 08:30 EDT, fedoraxx.bugzilla.redhat
no flags Details
File: environ (2.05 KB, text/plain)
2013-08-27 08:31 EDT, fedoraxx.bugzilla.redhat
no flags Details

  None (edit)
Description fedoraxx.bugzilla.redhat 2013-08-27 08:30:52 EDT
Version-Release number of selected component:
createrepo-0.9.9-21.fc19

Additional info:
reporter:       libreport-2.1.6
cmdline:        /usr/bin/python -t /usr/share/createrepo/genpkgmetadata.py --quiet --database --update --unique-md-filenames /var/lib/yum/plugins/local
executable:     /usr/share/createrepo/genpkgmetadata.py
kernel:         3.10.9-200.fc19.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
__init__.py:70:__init__:OSError: [Errno 2] No such file or directory

Traceback (most recent call last):
  File "/usr/share/createrepo/genpkgmetadata.py", line 294, in <module>
    main(sys.argv[1:])
  File "/usr/share/createrepo/genpkgmetadata.py", line 245, in main
    conf = createrepo.MetaDataConfig()
  File "/usr/lib/python2.7/site-packages/createrepo/__init__.py", line 70, in __init__
    self.basedir = os.getcwd()
OSError: [Errno 2] No such file or directory

Local variables in innermost frame:
self: <createrepo.MetaDataConfig object at 0x23cbfd0>
Comment 1 fedoraxx.bugzilla.redhat 2013-08-27 08:30:58 EDT
Created attachment 790948 [details]
File: backtrace
Comment 2 fedoraxx.bugzilla.redhat 2013-08-27 08:31:04 EDT
Created attachment 790949 [details]
File: environ
Comment 3 Zdeněk Pavlas 2013-08-27 09:08:11 EDT
The cause is the same as Yum BZ 711358, I've copied the fix to createrepo.
Comment 4 Fedora Update System 2013-10-01 07:54:23 EDT
createrepo-0.9.9-23.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/createrepo-0.9.9-23.fc19
Comment 5 Fedora Update System 2013-10-02 02:50:21 EDT
Package createrepo-0.9.9-23.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing createrepo-0.9.9-23.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-18128/createrepo-0.9.9-23.fc19
then log in and leave karma (feedback).
Comment 6 Michael Schwendt 2013-10-07 14:17:29 EDT
The fix doesn't make much sense. Or to put it differently, it's a bad fix for some cases. Unlike Yum, which does not want to write files to $PWD, createrepo may be used to create repo metadata in $PWD or in paths relative to $PWD. Entering '/' is not the right solution then - and I wonder when would it be the right thing to do at all? Even if the root directory is the top of a special storage space that is writable by the user that runs createrepo, that user may not want createrepo to start traversing the filesystem at that location.

Createrepo ought to catch the OSError exception and error out. No more than that.
Comment 7 Zdeněk Pavlas 2013-10-08 07:42:02 EDT
Createrepo does not write to $PWD, it saves metadata to pkgdir/repodata". The above fix makes sense, at least when absolute pkgdirs are specified.  I'm not convinced that chdir / is better than to err out imediately, but added it for consistency with yum.  But doing a directory walk from / in the "createrepo ." case is very bad, agreed, so I'll probably change it.
Comment 8 Fedora Update System 2013-10-18 09:09:11 EDT
createrepo-0.10-0.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/createrepo-0.10-0.fc19
Comment 9 Fedora Update System 2013-10-19 05:10:09 EDT
Package createrepo-0.10-0.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing createrepo-0.10-0.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-19464/createrepo-0.10-0.fc19
then log in and leave karma (feedback).
Comment 10 Fedora Update System 2013-10-22 03:32:40 EDT
createrepo-0.10-1.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/createrepo-0.10-1.fc19
Comment 11 Fedora Update System 2013-10-29 21:53:56 EDT
createrepo-0.10-1.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

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