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: 31-Jan-2008 23:12:15
Branch: rpm-5_0 Handle: 2008013122121500
Modified files: (Branch: rpm-5_0)
rpm CHANGES
rpm/lib psm.c transaction.c
Log:
- jbj: fix: --rollback PSM_INIT changes added fstates before
initialize.
Summary:
Revision Changes Path
1.2054.2.30 +1 -0 rpm/CHANGES
2.278.2.2 +29 -7 rpm/lib/psm.c
1.360.2.2 +0 -3 rpm/lib/transaction.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.2054.2.29 -r1.2054.2.30 CHANGES
--- rpm/CHANGES 31 Jan 2008 17:17:19 -0000 1.2054.2.29
+++ rpm/CHANGES 31 Jan 2008 22:12:15 -0000 1.2054.2.30
@@ -1,4 +1,5 @@
5.0.1 -> 5.0.2:
+ - jbj: fix: --rollback PSM_INIT changes added fstates before initialize.
- rse: allow to compile without <langinfo.h> and its nl_langinfo(3)
5.0.0 -> 5.0.1:
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/psm.c
============================================================================
$ cvs diff -u -r2.278.2.1 -r2.278.2.2 psm.c
--- rpm/lib/psm.c 15 Jan 2008 14:19:19 -0000 2.278.2.1
+++ rpm/lib/psm.c 31 Jan 2008 22:12:15 -0000 2.278.2.2
@@ -1555,13 +1555,6 @@
int xx = 1;
assert(fi->h != NULL);
- if (fi->fstates != NULL && fc > 0) {
- he->tag = RPMTAG_FILESTATES;
- he->t = RPM_UINT8_TYPE;
- he->p.ui8p = fi->fstates;
- he->c = fc;
- xx = headerPut(fi->h, he, 0);
- }
he->tag = RPMTAG_INSTALLTIME;
he->t = RPM_UINT32_TYPE;
@@ -1598,6 +1591,32 @@
return 0;
}
+
+/**
+ * Add fi->states to an install header.
+ * @param ts transaction set
+ * @param te transaction element
+ * @param fi file info set
+ * @return 0 always
+ */
+static int postPopulateInstallHeader(const rpmts ts, const rpmte te, rpmfi fi)
+ /*@modifies fi @*/
+{
+ HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+ int fc = rpmfiFC(fi);
+ int xx = 1;
+
+ if (fi->fstates != NULL && fc > 0) {
+ he->tag = RPMTAG_FILESTATES;
+ he->t = RPM_UINT8_TYPE;
+ he->p.ui8p = fi->fstates;
+ he->c = fc;
+ xx = headerPut(fi->h, he, 0);
+ }
+
+ return 0;
+}
+
#if defined(HAVE_PTHREAD_H)
static void * rpmpsmThread(void * arg)
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
@@ -2152,6 +2171,9 @@
if (rc) break;
}
+ /* Add fi->fstates to install header. */
+ xx = postPopulateInstallHeader(ts, psm->te, fi);
+
rc = rpmpsmNext(psm, PSM_RPMDB_ADD);
if (rc) break;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/transaction.c
============================================================================
$ cvs diff -u -r1.360.2.1 -r1.360.2.2 transaction.c
--- rpm/lib/transaction.c 15 Jan 2008 14:19:19 -0000 1.360.2.1
+++ rpm/lib/transaction.c 31 Jan 2008 22:12:15 -0000 1.360.2.2
@@ -861,9 +861,6 @@
/*@-dependenttrans@*/
if (netsharedPaths) freeSplitString(netsharedPaths);
-#ifdef DYING /* XXX freeFi will deal with this later. */
- fi->flangs = _free(fi->flangs);
-#endif
if (languages) freeSplitString((char **)languages);
/*@=dependenttrans@*/
}
@@ .
Received on Thu Jan 31 23:12:15 2008