[Yum-devel] install/update/erase cases

Jeremy Katz katzj at redhat.com
Wed Oct 26 21:42:04 UTC 2005


On Wed, 2005-10-26 at 17:32 -0400, seth vidal wrote:
> On Wed, 2005-10-26 at 16:26 -0400, Jeremy Katz wrote:
> > On Wed, 2005-10-26 at 14:15 -0400, Jeremy Katz wrote:
> > > On Mon, 2005-10-24 at 11:08 -0400, seth vidal wrote:
> > > >  I'm putting  some thought into generic install/erase/update methods in
> > > > the base yum class. Some error/sanity checking before passing the
> > > > package objects onto tsInfo. 
> > > 
> > > Also would avoid a lot of cut and paste code which I know exists in a
> > > number of different places at this point.  Per what we were talking
> > > about earlier, it would probably be good if these took either a package
> > > object or some way of specifying at least name and arch (although
> > > probably full nevra).
> > 
> > Oh, also, just to make sure it's said... by doing this, it'll be
> > possible to find out the state of a specific package object without
> > digging into the tsInfo, right? ;-)
> 
> questions:
>  1. is self.tsInfo.getMode() too invasive?

If I think blindly and I'm iterating over a group of packages which are
part of a group, it's far easier to do something like package.getstate
than digging into somewhere else.  Also, it feels like it's something
which is inherently about the package object

>  2. if we add an attribute in the package object to store its current
> state in the ts - it seems like we'll be stuck having to make sure we
> retag that attribute each time we change anything in the ts. Having said
> that - that's not all that big of a deal, really.

You'd want to set the state if it wasn't set then anyway, so that seems
like it makes sense

Jeremy




More information about the Yum-devel mailing list