Something we talked about before. This is a simple fs-as-a-db backended additional database. It fits in around the rpmsack and the YumInstalledPackage objects to let you have fairly seamless access to this information from any given installed package object
Things I'm thinking about storing there: - repoid (from which the package was installed) - installedreason (user, dep, update, etc) - group it was installed with (if any) - notes? I dunno - other random data now this is obviously just a simple file system as a db mechanism but I think the idea is reasonable. It works well if the db is not there or not readable so people w/o this data don't lose out. Here's the patch: http://skvidal.fedorapeople.org/patches/rpm-additional-db.patch Here's an example of how to use it: as root: import yum my = yum.YumBase() po = my.rpmdb.searchNevra(name='yum')[0] po.set_additional('repoid', 'yourmom') po.set_additional('notes', 'This is a crappy package!') exit the session and come back as a user or as root again: import yum my = yum.YumBase() po = my.rpmdb.searchNevra(name='yum')[0] print po.repoid print po.repo.id print po.notes to get rid of an item just run: po.del_additional('name_of_item') Let me know if this is crack and I should be beaten. I just wanted to think about it. -sv _______________________________________________ Yum-devel mailing list [email protected] https://lists.dulug.duke.edu/mailman/listinfo/yum-devel
