SOURCES (rpm-4_4_9): rpm-rpm5-patchset-9486.patch (NEW) - backport...

glen glen at pld-linux.org
Tue Feb 5 18:59:14 CET 2008


Author: glen                         Date: Tue Feb  5 17:59:14 2008 GMT
Module: SOURCES                       Tag: rpm-4_4_9
---- Log message:
- backport patchset 9486 from rpm5.org

---- Files affected:
SOURCES:
   rpm-rpm5-patchset-9486.patch (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/rpm-rpm5-patchset-9486.patch
diff -u /dev/null SOURCES/rpm-rpm5-patchset-9486.patch:1.1.2.1
--- /dev/null	Tue Feb  5 18:59:14 2008
+++ SOURCES/rpm-rpm5-patchset-9486.patch	Tue Feb  5 18:59:09 2008
@@ -0,0 +1,71 @@
+fix: --rollback PSM_INIT changes added fstates before initialize.
+http://rpm5.org/cvs/chngview?cn=9486
+
+--- rpm-4.4.9/lib/psm.c	2008-02-05 19:50:14.238918269 +0200
++++ rpm-4.4.9-cs9486/lib/psm.c	2008-02-05 19:47:16.644011486 +0200
+@@ -1497,10 +1497,6 @@
+     int xx = 1;
+ 
+ assert(fi->h != NULL);
+-    if (fi->fstates != NULL && fc > 0)
+-	xx = headerAddEntry(fi->h, RPMTAG_FILESTATES, RPM_CHAR_TYPE,
+-				fi->fstates, fc);
+-assert(xx);
+ 
+     xx = headerAddEntry(fi->h, RPMTAG_INSTALLTIME, RPM_INT32_TYPE,
+ 			&installTime, 1);
+@@ -1530,6 +1526,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;
++}
++
+ static void * rpmpsmThread(void * arg)
+ 	/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
+ 	/*@modifies arg, rpmGlobalMacroContext, fileSystem, internalState @*/
+@@ -2059,6 +2081,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;
+ 
+--- rpm-4.4.9/lib/transaction.c	2007-05-17 01:47:00.000000000 +0300
++++ rpm-4.4.9-cs9486/lib/transaction.c	2008-02-05 19:39:52.565758407 +0200
+@@ -895,9 +895,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@*/
+ }
================================================================


More information about the pld-cvs-commit mailing list