RPM Package Manager, CVS Repository
/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 13-Aug-2010 16:16:56
Branch: rpm-5_3 Handle: 2010081314165401
Modified files: (Branch: rpm-5_3)
rpm CHANGES
rpm/lib rpmts.c
Log:
- solve: fix: don't free the package file name when depsolving.
Summary:
Revision Changes Path
1.3296.2.52 +1 -0 rpm/CHANGES
2.181.2.2 +24 -15 rpm/lib/rpmts.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.3296.2.51 -r1.3296.2.52 CHANGES
--- rpm/CHANGES 13 Aug 2010 14:15:49 -0000 1.3296.2.51
+++ rpm/CHANGES 13 Aug 2010 14:16:54 -0000 1.3296.2.52
@@ -1,4 +1,5 @@
5.3.2 -> 5.3.3:
+ - jbj: solve: fix: don't free the package file name when depsolving.
- jbj: fix: debugedit produce empty list file on MIPS.
5.3.1 -> 5.3.2:
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmts.c
============================================================================
$ cvs diff -u -r2.181.2.1 -r2.181.2.2 rpmts.c
--- rpm/lib/rpmts.c 22 May 2010 16:08:29 -0000 2.181.2.1
+++ rpm/lib/rpmts.c 13 Aug 2010 14:16:55 -0000 2.181.2.2
@@ -230,15 +230,19 @@
static int has_sdbpath = -1;
int rc = 0;
- if (ts->sdb != NULL && ts->sdbmode == dbmode)
- return 0;
+ if (ts->sdb != NULL && ts->sdbmode == dbmode) {
+ rc = 0;
+ goto exit;
+ }
if (has_sdbpath < 0)
has_sdbpath = rpmExpandNumeric("%{?_solve_dbpath:1}");
/* If not configured, don't try to open. */
- if (has_sdbpath <= 0)
- return 1;
+ if (has_sdbpath <= 0) {
+ rc = 1;
+ goto exit;
+ }
addMacro(NULL, "_dbpath", NULL, "%{_solve_dbpath}", RMIL_DEFAULT);
@@ -254,6 +258,9 @@
}
delMacro(NULL, "_dbpath");
+exit:
+if (_rpmts_debug)
+fprintf(stderr, "<-- %s(%p, 0%o) rc %d\n", __FUNCTION__, ts, dbmode, rc);
return rc;
}
@@ -285,19 +292,22 @@
rpmTag rpmtag;
const char * keyp;
size_t keylen = 0;
- int rc = 1; /* assume not found */
+ int rc = 1; /* assume not found */
int xx;
+if (_rpmts_debug)
+fprintf(stderr, "--> %s(%p,%p,%p)\n", __FUNCTION__, ts, ds, data);
+
/* Make suggestions only for installing Requires: */
if (ts->goal != TSM_INSTALL)
- return rc;
+ goto exit;
switch (rpmdsTagN(ds)) {
case RPMTAG_CONFLICTNAME:
default:
- return rc;
+ goto exit;
/*@notreached@*/ break;
- case RPMTAG_DIRNAMES: /* XXX perhaps too many wrong answers */
+ case RPMTAG_DIRNAMES: /* XXX perhaps too many wrong answers? */
case RPMTAG_REQUIRENAME:
case RPMTAG_FILELINKTOS:
break;
@@ -305,11 +315,12 @@
keyp = rpmdsN(ds);
if (keyp == NULL)
- return rc;
+ goto exit;
if (ts->sdb == NULL) {
xx = rpmtsOpenSDB(ts, ts->sdbmode);
- if (xx) return rc;
+ if (xx)
+ goto exit;
}
/* Look for a matching Provides: in suggested universe. */
@@ -385,6 +396,7 @@
xx = Fclose(fd);
switch (rpmrc) {
default:
+ str = _free(str);
break;
case RPMRC_NOTTRUSTED:
case RPMRC_NOKEY:
@@ -398,7 +410,6 @@
}
break;
}
- str = _free(str);
(void)headerFree(h);
h = NULL;
goto exit;
@@ -426,9 +437,9 @@
qsort(ts->suggests, ts->nsuggests, sizeof(*ts->suggests), sugcmp);
exit:
-/*@-nullstate@*/ /* FIX: ts->suggests[] may be NULL */
+if (_rpmts_debug)
+fprintf(stderr, "<-- %s(%p,%p,%p) rc %d\n", __FUNCTION__, ts, ds, data, rc);
return rc;
-/*@=nullstate@*/
}
int rpmtsAvailable(rpmts ts, const rpmds ds)
@@ -452,9 +463,7 @@
ts->suggests[ts->nsuggests] = NULL;
}
sugkey = _free(sugkey);
-/*@-nullstate@*/ /* FIX: ts->suggests[] may be NULL */
return rc;
-/*@=nullstate@*/
}
int rpmtsSetSolveCallback(rpmts ts,
@@ .
Received on Fri Aug 13 16:16:56 2010