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: 13-Oct-2007 20:15:04
Branch: HEAD Handle: 2007101319150300
Modified files:
rpm CHANGES
rpm/lib psm.c rpmfi.c transaction.c verify.c
Log:
- scareMem = 0 everywhere FINALLY! Yippie!
Summary:
Revision Changes Path
1.1685 +1 -0 rpm/CHANGES
2.238 +6 -1 rpm/lib/psm.c
2.82 +0 -2 rpm/lib/rpmfi.c
1.339 +1 -1 rpm/lib/transaction.c
2.171 +1 -1 rpm/lib/verify.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.1684 -r1.1685 CHANGES
--- rpm/CHANGES 13 Oct 2007 17:50:06 -0000 1.1684
+++ rpm/CHANGES 13 Oct 2007 18:15:03 -0000 1.1685
@@ -1,4 +1,5 @@
4.5 -> 5.0:
+ - jbj: scareMem = 0 everywhere FINALLY! Yippie!
- jbj: rpmds.c: use headerGetExtension everywhere.
- jbj: eliminate rpmtsSetSig(), use pgpSetSig() instead.
- jbj: fix: trade a double free for a ~100b/header memleak.
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/psm.c
============================================================================
$ cvs diff -u -r2.237 -r2.238 psm.c
--- rpm/lib/psm.c 12 Oct 2007 18:55:57 -0000 2.237
+++ rpm/lib/psm.c 13 Oct 2007 18:15:03 -0000 2.238
@@ -167,7 +167,7 @@
const char ** specFilePtr, const char ** cookie)
{
FD_t fd = _fd;
- int scareMem = 1; /* XXX fi->h is needed */
+ int scareMem = 0;
rpmfi fi = NULL;
const char * _sourcedir = NULL;
const char * _specdir = NULL;
@@ -213,6 +213,7 @@
(void) rpmtsAddInstallElement(ts, h, NULL, 0, NULL);
fi = rpmfiNew(ts, h, RPMTAG_BASENAMES, scareMem);
+ fi->h = headerLink(h);
h = headerFree(h);
if (fi == NULL) { /* XXX can't happen */
@@ -1517,6 +1518,10 @@
int saveerrno;
int xx;
+/* XXX hackery to assert(!scaremem) in rpmfiNew. */
+assert(fi->te);
+if (fi->h == NULL && fi->te->h != NULL) fi->h = headerLink(fi->te->h);
+
switch (stage) {
case PSM_UNKNOWN:
break;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmfi.c
============================================================================
$ cvs diff -u -r2.81 -r2.82 rpmfi.c
--- rpm/lib/rpmfi.c 11 Oct 2007 19:44:22 -0000 2.81
+++ rpm/lib/rpmfi.c 13 Oct 2007 18:15:03 -0000 2.82
@@ -1240,9 +1240,7 @@
int xx;
int i;
-#ifdef NOTYET /* XXX transaction.c still needs scareMem 1 */
assert(scareMem == 0); /* XXX always allocate memory */
-#endif
if (tagN == RPMTAG_BASENAMES) {
Type = "Files";
} else {
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/transaction.c
============================================================================
$ cvs diff -u -r1.338 -r1.339 transaction.c
--- rpm/lib/transaction.c 12 Oct 2007 18:55:57 -0000 1.338
+++ rpm/lib/transaction.c 13 Oct 2007 18:15:03 -0000 1.339
@@ -1787,7 +1787,7 @@
fileAction * actions = fi->actions;
int mapflags = fi->mapflags;
rpmte savep;
- int scareMem = 1; /* XXX rpmpsmStage needs fi->h */
+ int scareMem = 0;
fi->fstates = NULL;
fi->actions = NULL;
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/verify.c
============================================================================
$ cvs diff -u -r2.170 -r2.171 verify.c
--- rpm/lib/verify.c 11 Oct 2007 19:44:22 -0000 2.170
+++ rpm/lib/verify.c 13 Oct 2007 18:15:03 -0000 2.171
@@ -450,7 +450,7 @@
int showVerifyPackage(QVA_t qva, rpmts ts, Header h)
{
- int scareMem = 1; /* XXX rpmpsmStage needs fi->h */
+ int scareMem = 0;
rpmfi fi = NULL;
int ec = 0;
int rc;
@@ .
Received on Sat Oct 13 20:15:04 2007