Running a private koji instance with createrepo-0.10.1-0.fc21.noarch It is failing during regen-repo I see the following: $ /usr/libexec/kojid/mergerepos -a ppc64le -b /mnt/koji/repos/f21-build/9/ppc64le/blocklist -o /mnt/koji/tmp/tasks/15/15/repo -g /mnt/koji/repos/f21-build/9/groups/comps.xml -r file:///mnt/koji/tmp/tasks/15/15/repo_9_premerge/ -r http://9.5.211.49/ppc64le-minimal-packages/ Adding repo: file:///mnt/koji/tmp/tasks/15/15/repo_9_premerge/ Adding repo: http://9.5.211.49/ppc64le-minimal-packages/ pkg = acl-2.2.52-4.fc21.ppc64le, type (pkg) = <class 'yum.sqlitesack.YumAvailablePackageSqlite'> __getitem__: key = 0, type (key) = <type 'int'> Traceback (most recent call last): File "/usr/libexec/kojid/mergerepos", line 262, in <module> main(sys.argv[1:]) File "/usr/libexec/kojid/mergerepos", line 257, in main merge.write_metadata() File "/usr/libexec/kojid/mergerepos", line 237, in write_metadata mdgen.doPkgMetadata() File "/usr/lib/python2.7/site-packages/createrepo/__init__.py", line 406, in doPkgMetadata if '://' in pkg: # remote File "/usr/lib/python2.7/site-packages/yum/packages.py", line 384, in __getitem__ return getattr(self, key) TypeError: getattr(): attribute name must be string It is from the following code: [root@localhost ~]# cat /usr/lib/python2.7/site-packages/createrepo/__init__.py ... for pkg in self.conf.pkglist: self.callback.log("pkg = %s, type (pkg) = %s" % (pkg, type (pkg))) if "://" in pkg: # remote ... [root@localhost ~]# cat /usr/lib/python2.7/site-packages/yum/packages.py ... def __getitem__(self, key): print "__getitem__: key = %s, type (key) = %s" % (key, type (key)) return getattr(self, key) ... It looks like Python is in a loop trying to enumerate the keys given that it has passed a 0 integer. Is that code correct? You are trying to use "in" for a substring test but relying on __getitem__ which is doing a member variable lookup. http://docs.python.org/2/reference/datamodel.html#object.__contains__ http://docs.python.org/2/reference/expressions.html#membership-test-details
Hi, thanks for the report! "if '://' in pkg:" is correct under the normal use of the pkglist option, but I've missed that passing in a package sack was kind of supported too. (Although not documented, and --update didn't apparently work anyway). Adding the early file checks broke this. Fixed upstream. http://createrepo.baseurl.org/gitweb?p=createrepo.git;a=commitdiff;h=b8904f59773a478aedd416963ec451c678a6bb72
*** Bug 1056270 has been marked as a duplicate of this bug. ***
(In reply to Zdeněk Pavlas from comment #1) > Hi, thanks for the report! > > "if '://' in pkg:" is correct under the normal use of the pkglist option, > but I've missed that passing in a package sack was kind of supported too. > (Although not documented, and --update didn't apparently work anyway). > Adding the early file checks broke this. Fixed upstream. > > http://createrepo.baseurl.org/gitweb?p=createrepo.git;a=commitdiff; > h=b8904f59773a478aedd416963ec451c678a6bb72 Could you push this update to Bodhi for f20 ?
createrepo-0.10.3-1.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/createrepo-0.10.3-1.fc20
Package createrepo-0.10.3-1.fc20: * should fix your issue, * was pushed to the Fedora 20 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.3-1.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-2527/createrepo-0.10.3-1.fc20 then log in and leave karma (feedback).
createrepo-0.10.3-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
(In reply to Igor Gnatenko from comment #3) > (In reply to Zdeněk Pavlas from comment #1) > > Hi, thanks for the report! > > > > "if '://' in pkg:" is correct under the normal use of the pkglist option, > > but I've missed that passing in a package sack was kind of supported too. > > (Although not documented, and --update didn't apparently work anyway). > > Adding the early file checks broke this. Fixed upstream. > > > > http://createrepo.baseurl.org/gitweb?p=createrepo.git;a=commitdiff; > > h=b8904f59773a478aedd416963ec451c678a6bb72 > Could you push this update to Bodhi for f20 ? Any chance of getting this fix for EPEL too? I just got bit by this with createrepo-0.9.9-23.el7.noarch and found the patch to be helpful, but would rather not worry about my patch getting squashed.