Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with updaterepo #1

Open
m4ce opened this issue Nov 19, 2013 · 9 comments
Open

Issue with updaterepo #1

m4ce opened this issue Nov 19, 2013 · 9 comments

Comments

@m4ce
Copy link

m4ce commented Nov 19, 2013

Hi,

not sure what the problem is :(

Delete: []
Add : []

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Traceback (most recent call last):
File "/usr/share/createrepo/updaterepo.py", line 205, in
UpdateRepo(sys.argv[1]).execute()
File "/usr/share/createrepo/updaterepo.py", line 161, in execute
self.generateMetaData()
File "/usr/share/createrepo/updaterepo.py", line 184, in generateMetaData
self.generator.doRepoMetadata()
File "/usr/share/createrepo/createrepo/init.py", line 962, in doRepoMetadata
zfo = _gzipOpen(complete_path)
File "/usr/share/createrepo/createrepo/utils.py", line 47, in _gzipOpen
return GzipFile(filename, mode, compresslevel)
File "/usr/lib64/python2.7/gzip.py", line 89, in init
fileobj = self.myfileobj = builtin.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/srv/inst/rhel/6.4/extra/noarch/./.repodata/other.xml.gz'

real 0m0.654s
user 0m0.568s
sys 0m0.080s

I am running yum 3.2.29 + createrepo 0.9.9

Thanks for your help.

Cheers,
Matteo

@heroldus
Copy link
Owner

updaterepo only works on existing repos. That means, you have to create yum metadata per createrepo /srv/inst/rhel/6.4/extra and can use updaterepo for the next updates.

@m4ce
Copy link
Author

m4ce commented Nov 19, 2013

Yep, that's why I also thought, check this out:

installer:/tmp/repo # createrepo -d .
Spawning worker 0 with 139 pkgs
Workers Finished
Gathering worker results

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
installer:/tmp/repo # /usr/share/createrepo/updaterepo.py .
Delete: []
Add : []

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Traceback (most recent call last):
File "/usr/share/createrepo/updaterepo.py", line 205, in
UpdateRepo(sys.argv[1]).execute()
File "/usr/share/createrepo/updaterepo.py", line 161, in execute
self.generateMetaData()
File "/usr/share/createrepo/updaterepo.py", line 184, in generateMetaData
self.generator.doRepoMetadata()
File "/usr/share/createrepo/createrepo/init.py", line 962, in doRepoMetadata
zfo = _gzipOpen(complete_path)
File "/usr/share/createrepo/createrepo/utils.py", line 47, in _gzipOpen
return GzipFile(filename, mode, compresslevel)
File "/usr/lib64/python2.7/gzip.py", line 89, in init
fileobj = self.myfileobj = builtin.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/tmp/repo/./.repodata/other.xml.gz'

Not sure if I am doing something wrong then?

@heroldus
Copy link
Owner

Could you please send me the result of:

ls -al /tmp/repo/repodata

@heroldus
Copy link
Owner

And which version of createrepo are you using?

@m4ce
Copy link
Author

m4ce commented Nov 19, 2013

installer:/tmp/repo # ls -lrt repodata/*
-rw-r--r-- 1 root root 9501 Nov 19 13:54 repodata/primary.xml.gz
-rw-r--r-- 1 root root 18891 Nov 19 13:54 repodata/other.xml.gz
-rw-r--r-- 1 root root 6807 Nov 19 13:54 repodata/filelists.xml.gz
-rw-r--r-- 1 root root 2279 Nov 19 13:54 repodata/repomd.xml
-rw-r--r-- 1 root root 26440 Nov 19 13:54 repodata/primary.sqlite.bz2
-rw-r--r-- 1 root root 86459 Nov 19 13:54 repodata/other.sqlite.bz2
-rw-r--r-- 1 root root 19878 Nov 19 13:54 repodata/filelists.sqlite.bz2

version 0.9.9, but i also tried against 0.9.8 :)

Thanks,
Matteo

@heroldus
Copy link
Owner

May I should fix the code to do nothing, if no RPM was added or deleted.

@m4ce
Copy link
Author

m4ce commented Nov 19, 2013

It doesn't work in any case, on delete/add. I've tested different scenarios:

installer:/tmp/repo # /usr/share/createrepo/updaterepo.py .
Delete: []
Add : ['createrepo-0.10-100.noarch.rpm']

Saving Primary metadata
Saving file lists metadata
Saving other metadata
Traceback (most recent call last):
File "/usr/share/createrepo/updaterepo.py", line 205, in
UpdateRepo(sys.argv[1]).execute()
File "/usr/share/createrepo/updaterepo.py", line 161, in execute
self.generateMetaData()
File "/usr/share/createrepo/updaterepo.py", line 184, in generateMetaData
self.generator.doRepoMetadata()
File "/usr/share/createrepo/createrepo/init.py", line 962, in doRepoMetadata
zfo = _gzipOpen(complete_path)
File "/usr/share/createrepo/createrepo/utils.py", line 47, in _gzipOpen
return GzipFile(filename, mode, compresslevel)
File "/usr/lib64/python2.7/gzip.py", line 89, in init
fileobj = self.myfileobj = builtin.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/tmp/repo/./.repodata/other.xml.gz'

What createrepo version did you test it against?

@TheTeraByte
Copy link

@m4ce did you ever manage to fix this issue? I am running into it as well, though I think it is a bug in the createrepo utility. (createrepo version 0.10.3)

@heroldus
Copy link
Owner

@TheTeraByte I'm sorry, but I'm not maintaining the repository anymore. I think the createrepo uses a different format for the metadata, now. That's why the the code doesn't work anymore out of the box.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants