> so this was from a while ago but see the attached patch that does this.
>
> Things I don't like about this:
>
> 1. I feel like we're already passing a lot of stuff into the transaction
> callback instantiation. Though we will also need a configuration
> variable for the location to store these ts files.
>
> 2. obviously shoving the list of transaction elements is a bit hurky but
> there's no other place other than RIGHT before the transaction runs that
> we know it won't be messed with. If we passed the action ts into the
> callback object we could built it up internally to the callback which
> would be prettier. However, at some point we're dropping in most of the
> sub-objects of YumBase() in there. This goes back to #1
>
> if we have a callback instantiation that looks like:
>
> cb = RPMTransaction(self.tsInfo, self.ts,
> test=False, display=output.YumCliRPMCallBack,
> ts_file_dir=self.conf.yum_persist_dir)
>
> it feels ugly. However that might be the only way to do it.
alternatively we go hogwild and do:
cb = RPMTransaction(base=self, test=False,
display=output.YumCliRPMCallBack)
until we can make a complete api-break and just move the the
RPMTransaction to a place where YumBase can inherit directly from it.
and we can make the ts.run be:
self.ts.run(cb=self.ts_callback, '')
or some such thing.
> I'm open to suggestions on making this feel less 'bleah' and in general
> improvements on the patch.
I'm going to redo the patch some later today/tomorrow to make it be just
two methods in the RPMTransaction class. I should be able to make it
just _tsAll() and _tsDone(thing), also that should let us dump some of
the other silliness.
-sv
_______________________________________________
Yum-devel mailing list
[email protected]
https://lists.dulug.duke.edu/mailman/listinfo/yum-devel