On Thu, Jan 31, 2008, Jeff Johnson wrote:
> - jbj: fix: retrieve originTime from old, not new, header.
> [...]
> /* Snarf the original install time from older package(s). */
> he->tag = RPMTAG_ORIGINTIME;
> - xx = headerGet(h, he, 0);
> + xx = headerGet(oh, he, 0);
> if (xx && he->p.ui32p != NULL) {
> if (p->originTime == 0 || p->originTime > he->p.ui32p[0])
> p->originTime = he->p.ui32p[0];
Thanks for your efforts, Jeff.
Unfortunately, it think there is still a bug somewhere:
1. After(!) upgrading the RPM program itself:
| $ /openpkg/bin/openpkg rpm -q openpkg --qf '%{ORIGINTIME:date}\n%{INSTALLTIME:date}\n'
| Thu Jan 31 17:19:59 2008
| Thu Jan 31 17:19:59 2008
| $ /openpkg/bin/openpkg rpm -Uvh --force ../pkg/openpkg-4.0a0-20080131.ix86-freebsd6.3-openpkg.rpm
| Preparing... ########################################### [100%]
| 1:openpkg ########################################### [100%]
| $ /openpkg/bin/openpkg rpm -q openpkg --qf '%{ORIGINTIME:date}\n%{INSTALLTIME:date}\n'
| Thu Jan 31 17:20:44 2008
| Thu Jan 31 17:20:44 2008
2. After updating (rebuild+reinstall) the RPM program once again:
| $ /openpkg/bin/openpkg rpm -q openpkg --qf '%{ORIGINTIME:date}\n%{INSTALLTIME:date}\n'
| Thu Jan 31 17:20:44 2008
| Thu Jan 31 17:28:18 2008
^^^^^^^^ here it at least once worked surprisingly!
| $ sudo /openpkg/bin/openpkg rpm -Uvh --force ../pkg/openpkg-4.0a0-20080131.ix86-freebsd6.3-openpkg.rpm
| Preparing... ########################################### [100%]
| 1:openpkg ########################################### [100%]
| $ /openpkg/bin/openpkg rpm -q openpkg --qf '%{ORIGINTIME:date}\n%{INSTALLTIME:date}\n'
| Thu Jan 31 17:28:41 2008
| Thu Jan 31 17:28:41 2008
And all this is really with your bugfix already applied and with RPM
already upgraded to this version, of course:
| $ /openpkg/bin/openpkg rpm --version
| rpm (OpenPKG RPM) 5.1.SNAPSHOT.20080131
| $ gunzip <~/prj/openpkg-2008/src/openpkg/dst/rpm-5.1.SNAPSHOT.20080131.tar.gz | tar xf -
| $ grep -C3 RPMTAG_ORIGINTIME rpm-5.1.SNAPSHOT.20080131/lib/depends.c
| xx = rpmteChain(p, q, oh, "Upgrades");
|
| /* Snarf the original install time from older package(s). */
| he->tag = RPMTAG_ORIGINTIME;
| xx = headerGet(oh, he, 0);
| if (xx && he->p.ui32p != NULL) {
| if (p->originTime == 0 || p->originTime > he->p.ui32p[0])
Very strange... I see no deterministic pattern here. It more or less
never works except for the single attempt in the middle of my tests. I'm
puzzled...
Ralf S. Engelschall
rse@engelschall.com
www.engelschall.com
Received on Thu Jan 31 17:37:29 2008