Bug 1001629 - [abrt] createrepo-0.9.9-21.fc19: __init__.py:70:__init__:OSError: [Errno 2] No such file or directory
Summary: [abrt] createrepo-0.9.9-21.fc19: __init__.py:70:__init__:OSError: [Errno 2] N...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: createrepo
Version: 19
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:fb54af973d5b3cfa3cec6aaacdb...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-27 12:30 UTC by Yosuke Kobayashi
Modified: 2013-10-30 01:53 UTC (History)
3 users (show)

Fixed In Version: createrepo-0.10-1.fc19
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-30 01:53:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (561 bytes, text/plain)
2013-08-27 12:30 UTC, Yosuke Kobayashi
no flags Details
File: environ (2.05 KB, text/plain)
2013-08-27 12:31 UTC, Yosuke Kobayashi
no flags Details

Description Yosuke Kobayashi 2013-08-27 12:30:52 UTC
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 Yosuke Kobayashi 2013-08-27 12:30:58 UTC
Created attachment 790948 [details]
File: backtrace

Comment 2 Yosuke Kobayashi 2013-08-27 12:31:04 UTC
Created attachment 790949 [details]
File: environ

Comment 3 Zdeněk Pavlas 2013-08-27 13:08:11 UTC
The cause is the same as Yum BZ 711358, I've copied the fix to createrepo.

Comment 4 Fedora Update System 2013-10-01 11:54:23 UTC
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 06:50:21 UTC
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 18:17:29 UTC
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 11:42:02 UTC
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 13:09:11 UTC
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 09:10:09 UTC
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 07:32:40 UTC
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-30 01:53:56 UTC
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.