Bug 1010523

Summary: [abrt] createrepo-0.9.9-21.fc19: gzip.py:94:__init__:IOError: [Errno 2] No such file or directory: '/var/lib/yum/plugins/local/.repodata/other.xml.gz'
Product: [Fedora] Fedora Reporter: Sanjay Goel <skgoel>
Component: createrepoAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: cove_s, fonya, john.m.alberts, jzeleny, lmacken, packaging-team-maint, skgoel, vmukhame
Target Milestone: ---Flags: zpavlas: needinfo? (skgoel)
Target Release: ---   
Hardware: i686   
OS: Unspecified   
Whiteboard: abrt_hash:415e77a65afd1b086dee1e8e3e0495470d93349f
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-28 09:06:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
File: backtrace
none
File: environ none

Description Sanjay Goel 2013-09-21 07:04:19 UTC
Description of problem:
Don't Know

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
dso_list:       python-libs-2.7.5-4.fc19.i686
executable:     /usr/share/createrepo/genpkgmetadata.py
kernel:         3.10.10-200.fc19.i686.PAE
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
gzip.py:94:__init__:IOError: [Errno 2] No such file or directory: '/var/lib/yum/plugins/local/.repodata/other.xml.gz'

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 272, in main
    mdgen.doRepoMetadata()
  File "/usr/lib/python2.7/site-packages/createrepo/__init__.py", line 953, in doRepoMetadata
    zfo = compressOpen(complete_path)
  File "/usr/lib/python2.7/site-packages/createrepo/utils.py", line 135, in compressOpen
    return _gzipOpen(fn, mode)
  File "/usr/lib/python2.7/site-packages/createrepo/utils.py", line 53, in _gzipOpen
    return GzipFile(filename, mode, compresslevel)
  File "/usr/lib/python2.7/gzip.py", line 94, in __init__
    fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/var/lib/yum/plugins/local/.repodata/other.xml.gz'

Local variables in innermost frame:

Comment 1 Sanjay Goel 2013-09-21 07:04:23 UTC
Created attachment 800853 [details]
File: backtrace

Comment 2 Sanjay Goel 2013-09-21 07:04:28 UTC
Created attachment 800854 [details]
File: environ

Comment 3 cove_s 2013-10-03 06:44:23 UTC
Seeing the same issue..

createrepo-0.9.9-17.el6.noarch

# createrepo `pwd`
Spawning worker 0 with 992 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Traceback (most recent call last):
  File "/usr/share/createrepo/genpkgmetadata.py", line 291, in <module>
    main(sys.argv[1:])
  File "/usr/share/createrepo/genpkgmetadata.py", line 269, in main
    mdgen.doRepoMetadata()
  File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 951, in doRepoMetadata
    zfo = compressOpen(complete_path)
  File "/usr/lib/python2.6/site-packages/createrepo/utils.py", line 127, in compressOpen
    return _gzipOpen(fn, mode)
  File "/usr/lib/python2.6/site-packages/createrepo/utils.py", line 53, in _gzipOpen
    return GzipFile(filename, mode, compresslevel)
  File "/usr/lib64/python2.6/gzip.py", line 79, in __init__
    fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/data/repos/myrepo/.repodata/other.xml.gz'

Comment 4 Zdeněk Pavlas 2013-10-03 07:59:11 UTC
> Saving other metadata

Strange, ^^^this msg shows that

> '/data/repos/myrepo/.repodata/other.xml.gz'

^^^that file was saved.

Is this reproducible?  Could you attach a strace?

Comment 5 John Alberts 2013-11-27 20:55:59 UTC
I had this exact same problem when trying to run 'createrepo -d --update /repo' remotely via ssh in a script.  Same version of createrepo as this user except it was on CentOS.  Running the command locally or even running the script in a terminal it would work, so I suspect this has something to do with having a valid tty.  That's just a guess though.
In any case, I was able to solve my problem by not having createrepo generate the sql dbs.  Not optimal, but better than nothing.
My script now runs this command instead and so far works fine:
createrepo --no-database --workers 4 --update

Comment 6 Valentina Mukhamedzhanova 2014-05-28 09:06:23 UTC
Closing, as the requested info has not been provided, and a workaround has been suggested.