Discussion:
Update 0.4.11-0.9.8: AttributeError: 'module' object has no attribute 'RPMSENSE_PREREQ'
David C. Rankin
2010-09-14 21:18:53 UTC
Permalink
Guys,

I updated my createrepo install to the current 0.9.8 package on my Arch Linux
server. I have 4 openSUSE repos I maintain. All updates with createrepo worked
fine with 0.4.11. After updating to the following:

beecrypt-4.2.1-2-x86_64.pkg.tar.xz
kid-0.9.6-4-x86_64.pkg.tar.xz
python-iniparse-0.4-1-x86_64.pkg.tar.xz
repoview-0.6.5-1-any.pkg.tar.xz
rpm-5.1.9-1-x86_64.pkg.tar.xz
yum-3.2.28-1-x86_64.pkg.tar.xz
yum-createrepo-0.9.8-3-x86_64.pkg.tar.xz
yum-metadata-parser-1.1.4-2-x86_64.pkg.tar.xz

I receive the following error on my opensuse_11.0 repo. (~6900 rpms).
However, my opensuse_11.3 repo updates just fine (~1200 rpms). The error I get is:

[13:55 nirvana:/home/backup/rpms] # createrepo --update -d openSUSE_11.0/
1149/6790 - i586/libopencore-amrwb0-0.1.2-0.pm.1.1.i586.rpm
Traceback (most recent call last):
File "/usr/share/createrepo/genpkgmetadata.py", line 249, in <module>
main(sys.argv[1:])
File "/usr/share/createrepo/genpkgmetadata.py", line 223, in main
mdgen.doPkgMetadata()
File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 367, in
doPkgMetadata
self.writeMetadataDocs(packages)
File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 531, in
writeMetadataDocs
self.primaryfile.write(po.xml_dump_primary_metadata())
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1168, in
xml_dump_primary_metadata
msg += misc.to_unicode(self._dump_format_items())
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1039, in
_dump_format_items
msg += self._dump_requires()
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1097, in
_dump_requires
mylist = self._requires_with_pre()
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1369, in
_requires_with_pre
pre = map(self._is_pre_req, lst)
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1359, in
_is_pre_req
rpm.RPMSENSE_SCRIPT_PRE |
AttributeError: 'module' object has no attribute 'RPMSENSE_PREREQ'

I know very little about python, so I need a bit of help on where I should
start trying to figure out what is going on. Any ideas?
--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
Robert Xu
2010-09-14 21:33:00 UTC
Permalink
err... only suse uses PreReq nowadays. that might be your problem.
See openSUSETools on build.o.o for the package createrepo and see what
patches they used.

On Tue, Sep 14, 2010 at 17:18, David C. Rankin
Guys,
       I updated my createrepo install to the current 0.9.8 package on my
Arch Linux server. I have 4 openSUSE repos I maintain. All updates with
beecrypt-4.2.1-2-x86_64.pkg.tar.xz
kid-0.9.6-4-x86_64.pkg.tar.xz
python-iniparse-0.4-1-x86_64.pkg.tar.xz
repoview-0.6.5-1-any.pkg.tar.xz
rpm-5.1.9-1-x86_64.pkg.tar.xz
yum-3.2.28-1-x86_64.pkg.tar.xz
yum-createrepo-0.9.8-3-x86_64.pkg.tar.xz
yum-metadata-parser-1.1.4-2-x86_64.pkg.tar.xz
   I receive the following error on my opensuse_11.0 repo. (~6900 rpms).
[13:55 nirvana:/home/backup/rpms] # createrepo --update -d openSUSE_11.0/
1149/6790 - i586/libopencore-amrwb0-0.1.2-0.pm.1.1.i586.rpm Traceback (most
 File "/usr/share/createrepo/genpkgmetadata.py", line 249, in <module>
   main(sys.argv[1:])
 File "/usr/share/createrepo/genpkgmetadata.py", line 223, in main
   mdgen.doPkgMetadata()
 File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 367,
in doPkgMetadata
   self.writeMetadataDocs(packages)
 File "/usr/lib/python2.6/site-packages/createrepo/__init__.py", line 531,
in writeMetadataDocs
   self.primaryfile.write(po.xml_dump_primary_metadata())
 File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1168, in
xml_dump_primary_metadata
   msg += misc.to_unicode(self._dump_format_items())
 File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1039, in
_dump_format_items
   msg += self._dump_requires()
 File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1097, in
_dump_requires
   mylist = self._requires_with_pre()
 File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1369, in
_requires_with_pre
   pre = map(self._is_pre_req, lst)
 File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1359, in
_is_pre_req
   rpm.RPMSENSE_SCRIPT_PRE |
AttributeError: 'module' object has no attribute 'RPMSENSE_PREREQ'
   I know very little about python, so I need a bit of help on where I
should start trying to figure out what is going on. Any ideas?
--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
_______________________________________________
Rpm-metadata mailing list
http://lists.baseurl.org/mailman/listinfo/rpm-metadata
--
later, Robert Xu
Anders F Björklund
2010-09-14 21:40:55 UTC
Permalink
Post by David C. Rankin
I updated my createrepo install to the current 0.9.8 package on my
Arch Linux server. I have 4 openSUSE repos I maintain. All updates
with createrepo worked fine with 0.4.11. After updating to the
[...]
File "/usr/lib/python2.6/site-packages/yum/packages.py", line
1359, in _is_pre_req
rpm.RPMSENSE_SCRIPT_PRE |
AttributeError: 'module' object has no attribute 'RPMSENSE_PREREQ'
I know very little about python, so I need a bit of help on
where I should start trying to figure out what is going on. Any ideas?
Yum needs a patch to work with 4.4.3 and beyond (such as your 5.1.9)

Easiest is just adding the enum values, rather than conditionals...

--anders
seth vidal
2010-09-14 22:04:24 UTC
Permalink
Post by Anders F Björklund
Post by David C. Rankin
I updated my createrepo install to the current 0.9.8 package on my
Arch Linux server. I have 4 openSUSE repos I maintain. All updates
with createrepo worked fine with 0.4.11. After updating to the
[...]
File "/usr/lib/python2.6/site-packages/yum/packages.py", line
1359, in _is_pre_req
rpm.RPMSENSE_SCRIPT_PRE |
AttributeError: 'module' object has no attribute 'RPMSENSE_PREREQ'
I know very little about python, so I need a bit of help on
where I should start trying to figure out what is going on. Any ideas?
Yum needs a patch to work with 4.4.3 and beyond (such as your 5.1.9)
Easiest is just adding the enum values, rather than conditionals...
rpm 4.7.X and rpm 4.8.x work fine with yum 3.2.2X

-sv
David C. Rankin
2010-09-14 22:15:58 UTC
Permalink
Post by seth vidal
rpm 4.7.X and rpm 4.8.x work fine with yum 3.2.2X
-sv
Thanks all, I'll try the patch and report back. What makes this situation a bit
different is my opensuse repositories are hosted on my Arch Linux server not on
openSUSE. So I end up building everything from source (well actually from the
Arch AUR PKGBUILD scripts -- that, shall we say, need a little TLC to handle the
0.4x to 0.9x jump.

Thank you again. I'll see how far I can get, but I may need to beg for a bit
more help if I get stuck :p
--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
David C. Rankin
2010-09-14 22:32:04 UTC
Permalink
Post by Anders F Björklund
Post by David C. Rankin
I updated my createrepo install to the current 0.9.8 package on my Arch Linux
server. I have 4 openSUSE repos I maintain. All updates with createrepo worked
[...]
File "/usr/lib/python2.6/site-packages/yum/packages.py", line 1359, in
_is_pre_req
rpm.RPMSENSE_SCRIPT_PRE |
AttributeError: 'module' object has no attribute 'RPMSENSE_PREREQ'
I know very little about python, so I need a bit of help on where I should
start trying to figure out what is going on. Any ideas?
Yum needs a patch to work with 4.4.3 and beyond (such as your 5.1.9)
Easiest is just adding the enum values, rather than conditionals...
--anders
Anders,

You-da-man! Applied the patch and then re-ran the update against my opensuse
11.0 repo and it worked just fine:

[17:28 nirvana:/home/backup/rpms] # createrepo --update -d openSUSE_11.0/
6790/6790 - src/fraqtive-0.4.4-3.22.src.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete

Thank you for your help!
--
David C. Rankin, J.D.,P.E.
Rankin Law Firm, PLLC
510 Ochiltree Street
Nacogdoches, Texas 75961
Telephone: (936) 715-9333
Facsimile: (936) 715-9339
www.rankinlawfirm.com
Loading...