[Yum-devel] clean up sooner

seth vidal skvidal at linux.duke.edu
Tue Feb 21 04:59:57 UTC 2006


> I drafted up the text below in reply to the email.  It may still be
> useful, but I need to take a step back first.  I've only been thinking
> about storing the data needed at the RPM transaction.  Basically, you
> can describe the transaction as an ordered series of installs (defined
> by an RPM file) and erases (defined by naevr).  Do I need to be
> concerned with the other items you mention, such as repo location and
> obsolete actions?  I guess the answer is in how an aborted transaction
> is restarted.  If it's just at the RPM level, then probably not.  But if
> it's using the Yum APIs then it may be yes.

if we're going to recreate part of the transaction we will want all the
information to get the exact same package, if need be.

So having the repo included would be worthwhile.

> Hmm, I wasn't planning on storing the repo information for the packages
> to be installed.  By the time you get to the RPM transaction, you
> already have the RPMs to be installed downloaded locally.  So, I was
> just going to record the naevr and local file path for those. If the
> transaction aborts in the middle, those files should still be around for
> you to restart the transaction.  (Well, start a new transaction).

they _may_ still be around. Who knows what might have gone wrong. Let's
not assume too much. What we can assume is that grabbing the repo and
storing it is incredibly inexpensive.



> Here's a mockup log file for an update of the strace package before the
> RPM transaction starts:
> 
> Install: strace.i386 4.5.11-1 \
>   /var/cache/yum/fedora/packages/strace-4.5.11-1.i386.rpm
> Erase: strace.i386 4.5.8-1
> 
> And here's the mockup of the logfile after the transaction has
> completed:
> 
> Install: strace.i386 4.5.11-1 \
>   /var/cache/yum/fedora/packages/strace-4.5.11-1.i386.rpm
> Erase: strace.i386 4.5.8-1
> Installed: strace.i386 4.5.11-1
> Erased: strace.i386 4.5.8-1
> 
> It could also be XML. I don't particularly care about the format.

xml would make it easier to be _sure_ that the pkg strings are
consistently parsed.

-sv





More information about the Yum-devel mailing list