Re: RE: rpmUtils cvs repository

"Adam T. Gautier" <adam_gautier-/[email protected]> Tue, 23 Mar 2004 14:26:50 -0500
Newsgroups gmane.linux.redhat.rpm.python
Message-ID <[email protected]>
>Are you suggesting that all the ts object abstraction that rpm-python
>currently does should be dumped and it should just be little more than a
>swig library?
>
>  
>
No, just that the current ts abstraction is not fully abstracted away 
from the C bindings of rpm.  I say that it should never strive to do 
that.  It has a strong role as I currently see it as the bridge point 
betwen python and the C libraries.  Usability inside of python should be 
abstracted from that bridge.  As an example, to write a usable callback 
now I have to have the C source up next to the python code that I am 
writing just to make sure that I know what should be available for me to 
use.  This is fine, and as I code more this will become second nature, 
but IMHO I don't want to have to know this.  I would rather inherit and 
overload something like an installStart() method versus remembering 
rpm.RPMCALLBACK_INST_OPEN_FILE.

>I'm pretty sure I don't like the 'everything revolves around a ts,
>sorta' framework that is currently in place but I don't think we want to
>draw directly from the c libs as a solution right away.
>
>
>  
>
Agreeded but if you abstract away from ts in python then applications 
built on top of that abstracted layer don't care if it is ts based or 
not and would allow the bridge change wenever.  I know you know all this 
already but I have to goto up2date, yum, anaconda, etc... to put 
together a proper abstraction from the ts based bridge I make the 
assumptions that 1.) The bridge is a well built layer since all of the 
projects use it and have not written around it. 2.) The abstraction from 
the bridge to the application layer is needed for various reasons, every 
project uses one. 3.) Nobody has gotten it right since everyone uses 
their own borrowing from one another.


>if you can't corrupt your rpmdb then you can't install packages, either
>:)
>
>  
>
Correct, but it is a whole lot easier to muck up rpmdb switching back 
and for between C and python context trying to write a simple script 
cobbled together from 4+ projects.  Which I did, I guess Duke might be a 
better University than Harvard :)  Such is life...  Cheers!