[Yum] feature request for using yum a back end?
David Farning
dfarning at sbcglobal.net
Tue Nov 11 16:57:34 UTC 2003
I got yum working as a back end to redhat-config-packages yesterday--see
screen shot below.
Three considerations that would help me and others who would like to use
yum.
1. The use of config.py. That is a pretty common module name and
python has a very limited ability to work with two modules of the same
name. There are a bunch of working arounds but it just seems like a
debugging nightmare waiting to happen.
2. Several of your functions dump output to a terminal via print.
would you consider adding a mechanism we could use to grab that output.
Something along the lines of a progress=None added to the the function
signature would work if followed by.
if not progress == None:
progress = 'stuff'
else:
print 'stuff'
I could detect a change in progress and use it to emit the necessary
signal to update the gui.
3. I am using following method as an entry point back into yum for
my transactionSet. Just passing (install ,filename1, filename2,
filename3... in as cmds.
clientStuff.take_action(cmds, nulist, uplist, newlist, obsoleting,
tsInfo, HeaderInfo, rpmDBInfo, obsoleted)
Now, it would be nice to be able to pass(install: filename1, remove:
filename2, update: filename3) ;) just kidding, that RFE would take
weeks.
BTW, in the nevral.rpmnbynamearch() there is a var 'state' that seems to
always return 'a' --unless I am smashing it somehow. What is it? I was
hoping it was a installed flag.
When creating my dataStore I am use the technique below to determine
which packages are install and wich are not. The conditional
if namearch in self.localHeaders.rpmbynamearch: kind or scares me as
being pretty CPU costly. But,
not namearch in self.newlist return that the unused kernels are
installed. Any suggestions?
for namearch in self.remoteHeaders.rpmbynamearch:
iter = self.packageStore.append()
((re,rv,rr,ra,rl,ri),rs)=self.remoteHeaders.rpmbynamearch[namearch]
if namearch in self.localHeaders.rpmbynamearch:
(le,lv,lr,la,ll,li),ls)=elf.localHeaders.rpmbynamearch[namearch]
self.packageStore.set(iter,
self.COLUMN_SELECTED, gtk.FALSE,
self.COLUMN_NAME, namearch[0],
self.COLUMN_LVERSION, lv,
self.COLUMN_RVERSION, rv,
self.COLUMN_SERVER, ri,
self.COLUMN_NAMEARCH, namearch,
)
else:
self.packageStore.set(iter,
self.COLUMN_SELECTED, gtk.FALSE,
self.COLUMN_NAME, namearch[0],
self.COLUMN_LVERSION, '',
self.COLUMN_RVERSION, rv,
self.COLUMN_SERVER, ri,
self.COLUMN_NAMEARCH, namearch,
)
Thanks
Dave Farning
-------------- next part --------------
A non-text attachment was scrubbed...
Name: snapshot1.png
Type: image/png
Size: 69017 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum/attachments/20031111/28622dcf/attachment-0001.png
More information about the Yum
mailing list