fun with the python shell
November 12, 2004
For reasons I’m not aware of I decided I wanted to test out the structure I’ve put together in yum and test the modularity of it.
so I ran the python interpreter and attempted to setup a usable transaction with as few commands as possible.
The closest I got, with a little bit of method adding:
my = yum.YumBase()
my.tsInfo.add((‘yum’, ‘noarch’, ‘0’, ‘2.1.11’, ‘3’), ‘e’)
at that point everything was depchecked and ready to be executed. The transaction is simple, of course, just marking the yum package to be removed but it’s not a huge amount of work to get there in the simplest possible sense. I can think of a couple of places where straightforward methods for adding packages by less than a complete pkgtup would be useful. This will be more useful when we start dealing with how to work out adding the gui.