[Yum-devel] clean up sooner
Dennis Gregorovic
dgregor at redhat.com
Mon Feb 20 19:44:59 UTC 2006
On Mon, 2006-02-20 at 13:57 -0500, seth vidal wrote:
[snip]
>
> that's fine - but keep with the convention of _'s for name separation -
> if for no other reason than consistency.
Ok. I'm happy with consistency. :)
[snip]
> > I was using the Key() functionality to determine the location of the RPM
> > file that's scheduled to be installed. However, now that I think about
> > it, we already have that data in tsInfo, right? In that case, maybe
> > Key() isn't needed after all.
>
> I'd think you'd want to store:
> what action and then the package naevr + repo (or 'installed') for
> each item
>
> You'll need to make sure you break apart each update into install+erase
> and each obsolete into install/update + erase so that we have every one
> of the actions accounted for.
>
> It's the clean up actions which started all of this, of course.
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.
-- Dennis
-------------------------------------------------
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).
For the package removals, I was just planning on recording the naevr,
since that's all you need for rpm -e.
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.
More information about the Yum-devel
mailing list