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 15:12:15
Branch: HEAD Handle: 2010081313121401
Modified files:
rpm CHANGES
rpm/lib rpminstall.c rpmts.c
Log:
- solve: fix: don't free the package file name when depsolving.
Summary:
Revision Changes Path
1.3409 +1 -0 rpm/CHANGES
1.227 +4 -0 rpm/lib/rpminstall.c
2.184 +24 -15 rpm/lib/rpmts.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/CHANGES
============================================================================
$ cvs diff -u -r1.3408 -r1.3409 CHANGES
--- rpm/CHANGES 12 Aug 2010 13:39:54 -0000 1.3408
+++ rpm/CHANGES 13 Aug 2010 13:12:14 -0000 1.3409
@@ -1,4 +1,5 @@
5.3.2 -> 5.4a1:
+ - jbj: solve: fix: don't free the package file name when depsolving.
- jbj: stub in bag/svn/cvs/git objects.
- jbj: tpm: stub in client startup code and ttpm executable.
- jbj: tpm: rework the AutoFu through *.pc to set CFLAGS.
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpminstall.c
============================================================================
$ cvs diff -u -r1.226 -r1.227 rpminstall.c
--- rpm/lib/rpminstall.c 10 Feb 2010 14:57:41 -0000 1.226
+++ rpm/lib/rpminstall.c 13 Aug 2010 13:12:15 -0000 1.227
@@ -128,6 +128,8 @@
if (filename == NULL || filename[0] == '\0')
return NULL;
fd = Fopen(filename, "r%{?_rpmgio}");
+if (_rpmts_debug)
+fprintf(stderr, "-->\tfd %p = Fopen(%.40s,r)\n", fd, filename);
/* XXX Retry once to handle http:// server timeout reopen's. */
if (Ferror(fd)) {
@@ -155,6 +157,8 @@
/*@notreached@*/ break;
case RPMCALLBACK_INST_CLOSE_FILE:
+if (_rpmts_debug)
+fprintf(stderr, "<--\tfd %p = Fclose(%p)\n", fd, fd);
/*@-type@*/ /* FIX: still necessary? */
fd = fdFree(fd, "persist (showProgress)");
/*@=type@*/
@@ .
patch -p0 <<'@@ .'
Index: rpm/lib/rpmts.c
============================================================================
$ cvs diff -u -r2.183 -r2.184 rpmts.c
--- rpm/lib/rpmts.c 21 May 2010 05:01:02 -0000 2.183
+++ rpm/lib/rpmts.c 13 Aug 2010 13:12:15 -0000 2.184
@@ -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 15:12:15 2010