RPM Community Forums

Mailing List Message of <rpm-devel>

Re: [CVS] RPM: rpm/ VENDOR rpm/lib/ psm.c rpm/rpmdb/ rpmtag.h

From: Ralf S. Engelschall <rse+rpm-devel@rpm5.org>
Date: Wed 30 Jan 2008 - 19:59:34 CET
Message-ID: <20080130185934.GA18309@engelschall.com>
On Wed, Jan 30, 2008, Jeff Johnson wrote:

> Eeek!

Yes, I expected your reaction... ;-)

> (aside) There's a need to carry information forward persistently
> in headers. Consider packages installed with --relocate,
> RPMTAG_INSTALLTIME1ST has similar persistence
> needs. There's also flink/blink upgrade chains that persistently
> carry info.

Can you go into more detail on this, Jeff? I don't think
I already fully get the point.

> (aside) How about a generalization through arbitrary tags
> added at install time?

Yes, the reason why I had to code this in C and not (again) via some
RPM macro and/or Lua hacking was the fact that arbitrary tags currently
exist during build-time only. If one could generate arbitrary install
tags, say via an RPM "callback" macro expansion or whatever, this would
allow one to solve those issues, too.

> (aside) What would also be needed is some primitives to
> initialize if not found (like time(2) stamp here) in
> previous header.

Well, if you look at the code in detaol you will see that if no previous
header is found "installTime" is used as the fallback value and this in
turn is the time(3) value used for the "INSTALLTIME" tag. So, I think
the initialization should be just fine.

> The database hit with Yet Another transaction
> flying around is, well, ick.

Yes, _THIS_ is also _MY_ personal concern. I do not fully understand the
whole RPM internal processing, so I already feared the side-effects.
But the current implementation was the only way I to achieve this. As
you perfectly understand the RPM internals and hence certainly see more
possibilities, I would be very very happy if you could improve this
piece of code for me.

> The previous time stamp
> could be extracted from previous header in
> rpmtsAddInstallElement(), added to rpmte carrier,
> retrieved and readded to new header without the
> database hit in lib/psm.c

Could you be so kind and quickly implement this for me, Jeff? Just
change the code, please. You know the internals of RPM a lot better
than me and hence can make this stuff more correct already in the first
place. I want to avoid doing ping-pong commits just to get this better
myself.

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com
Received on Wed Jan 30 20:00:53 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.