rpm-python list

seth vidal <skvidal-c/MNwgJ9CEH2fBVCVOL8/[email protected]> Thu, 02 Oct 2003 01:31:02 -0400
Newsgroups gmane.linux.redhat.rpm.python
Message-ID <1065072662.3682.51.camel@binkley>
Hi all,
 so I made this list - adrian suggested it and it seemed like a
reasonable thing to do after talking to various folks at red hat.

things maybe worth discussing a bit:

1. if you could do whatever with the python bindings to rpm what would
want to do with them?

2. what problems do you current have using the bindings

3. what cool things are people working on doing with them


so I'll start:

things I'd like to fix in the bindings given time/ability/etc


1. if you look for hdrobject[rpm.RPMTAG_REQUIREFLAGS] and there is only
one entry you get back a string object, if there is more than one entry
you get back a list object, if there is nothing you get back None  -
it'd be nice if you always got back a list object.

2. I found it mildly annoying since rpm 4.1 that you have to create a ts
set just to read an rpm header in from a file.

3. there should be some better way to simplify/handle the gpg sig
checking from w/i python:
  - currently to get all the info on all the signatures that _could_ be
in an rpm you need to do something like this:
    string = '%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|'
    siginfo = hdr.sprintf(string)

There are only a handful of people in the world who can read the
'string' above and I don't believe I'm one of them.

4. in the rpm callback it would be nice if erasures had a progress
callback

5. the header object could be 'prettied up' some to be more python-y and
also to maybe make fairly standard actions easier

6. documentation on the python bindings would be nice and ideally
deleting all the deprecated methods.

7. I would love to see some standard rpm modules created to wrap around
the python bindings some to handle fairly standard operations like so we
all don't end up writing the same code over and over and over again.


Somethings I'd like to do with the rpm+python:

1. I had this crazy idea of creating a database of headers for packages
of all different versions of rpms and versions of distribution releases,
etc so that a sysadmin could use a tool to query his file system and his
rpmdb then compare the md5sums/timestamps/etc to the remote header
database - described in more detail here
https://lists.dulug.duke.edu/pipermail/yum/2003-August/001839.html

2. It'd be really kinda cool to be able to generate an rpm header from
the metadata. So let's say I had all the rpm metadata in xml, and I
wanted to perform a transaction on that rpm - well to test in a check
I'd need the rpm header, instead of going to fetch it it would be cool
if I could just make the rpm header in place.


ok so I'm done with this long email.

I'm sure others of you who have had more experience with rpm-python than
I have could offer some places where it needs some love.

-sv