RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 20-Oct-2007 07:42:25
Branch: HEAD Handle: 2007102006422500
Modified files:
rpm/lib psm.c
Log:
- rpm.org: use rpmteSetHeader method.
Summary:
Revision Changes Path
2.249 +12 -2 rpm/lib/psm.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/lib/psm.c
============================================================================
$ cvs diff -u -r2.248 -r2.249 psm.c
--- rpm/lib/psm.c 19 Oct 2007 00:36:44 -0000 2.248
+++ rpm/lib/psm.c 20 Oct 2007 05:42:25 -0000 2.249
@@ -248,7 +248,7 @@
}
assert(fi->h != NULL);
- fi->te->h = headerLink(fi->h);
+ rpmteSetHeader(fi->te, fi->h);
fi->te->fd = fdLink(fd, "installSourcePackage");
(void) headerMacrosLoad(fi->h);
@@ -381,7 +381,7 @@
if (h != NULL) h = headerFree(h);
if (fi != NULL) {
- fi->te->h = headerFree(fi->te->h);
+ rpmteSetHeader(fi->te, NULL);
if (fi->te->fd != NULL)
(void) Fclose(fi->te->fd);
fi->te->fd = NULL;
@@ -1686,9 +1686,14 @@
/* Retrieve installed header. */
rc = rpmpsmNext(psm, PSM_RPMDB_LOAD);
+#ifdef DYING
if (rc == RPMRC_OK)
if (psm->te)
psm->te->h = headerLink(fi->h);
+#else
+ if (rc == RPMRC_OK && psm->te)
+ (void) rpmteSetHeader(psm->te, fi->h);
+#endif
}
if (psm->goal == PSM_PKGSAVE) {
/* Open output package for writing. */
@@ -2180,9 +2185,14 @@
}
if (psm->goal == PSM_PKGERASE || psm->goal == PSM_PKGSAVE) {
+#ifdef DYING
if (psm->te != NULL)
if (psm->te->h != NULL)
psm->te->h = headerFree(psm->te->h);
+#else
+ if (psm->te != NULL)
+ rpmteSetHeader(psm->te, NULL);
+#endif
if (fi->h != NULL)
fi->h = headerFree(fi->h);
}
@@ .
Received on Sat Oct 20 07:42:25 2007