Menu

#2 Change syntax of RPM header lookup

closed-fixed
None
5
2002-03-18
2001-07-20
Chris Dolan
No

In truth, I don't know exactly why this is patch is
necessary, since I am a Python novice. With the
0.7.6-1 code, I kept getting the following error:

------------------------------------------------------
# /usr/sbin/yup update
... [connect, download rpms] ...
Traceback (innermost last):
File "/usr/sbin/yup", line 29, in ?
yup.main()
File "/usr/lib/yup/yup.py", line 417, in main
iface.DoList(oplist)
File "/usr/lib/yup/yuprpm.py", line 126, in DoList
self.filenames[header[rpm.RPMTAG_NAME]] =
packagedir + op[1]
TypeError: unsubscriptable object
------------------------------------------------------

The patch changes the syntax of the code that retrieves
the header object.

Is it simply that python wanted the function in
parentheses before subscripting?

I also noticed that the code in
rpm-4.0.2-8.src.rpm/python/rpmmodule.c has an error in
the documentation, reversing the order of return values
from the rpmHeaderFromPackage function...

Chris Dolan

Discussion

  • Chris Dolan

    Chris Dolan - 2001-07-20

    fix header lookup bug in yuprpm.py

     
  • Anonymous

    Anonymous - 2002-03-18
    • assigned_to: nobody --> hollis
    • status: open --> closed-fixed
     
  • Anonymous

    Anonymous - 2002-03-18

    Logged In: YES
    user_id=3010

    I don't recall the exact problem, but this has been fixed
    in yup-0.7.6-6.

     

Log in to post a comment.