summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2001-06-19 20:03:13 +0000
committerjbj <devnull@localhost>2001-06-19 20:03:13 +0000
commit8cd30c7190a630809a54f259718576d29bde80da (patch)
treec598322655015cdec4c17e6450c3ebc9234bfd62
parenteb8db3316d3a125c8974436112829d56aa63b21f (diff)
downloadlibrpm-tizen-8cd30c7190a630809a54f259718576d29bde80da.tar.gz
librpm-tizen-8cd30c7190a630809a54f259718576d29bde80da.tar.bz2
librpm-tizen-8cd30c7190a630809a54f259718576d29bde80da.zip
- make package ordering loop messages debug, not warning.
CVS patchset: 4883 CVS date: 2001/06/19 20:03:13
-rw-r--r--CHANGES1
-rw-r--r--lib/depends.c12
-rw-r--r--lib/fsm.c7
-rw-r--r--lib/transaction.c36
4 files changed, 42 insertions, 14 deletions
diff --git a/CHANGES b/CHANGES
index ea2cc500c..1e5b2f714 100644
--- a/CHANGES
+++ b/CHANGES
@@ -120,6 +120,7 @@
- check for API/ABI creep, diddle up some compatibility.
- preliminary abstraction to support per-header methods.
- finalize per-header methods, accessing headerFoo through vector.
+ - make package ordering loop messages debug, not warning.
4.0 -> 4.0.[12]
- add doxygen and lclint annotations most everywhere.
diff --git a/lib/depends.c b/lib/depends.c
index 44e33b7cb..a6644934a 100644
--- a/lib/depends.c
+++ b/lib/depends.c
@@ -1733,7 +1733,7 @@ zapRelation(struct availablePackage * q, struct availablePackage * p,
* Attempt to unravel a dependency loop by eliminating Requires's.
*/
if (zap && !(p->requireFlags[j] & RPMSENSE_PREREQ)) {
- rpmMessage(RPMMESS_WARNING,
+ rpmMessage(RPMMESS_DEBUG,
_("removing %s-%s-%s \"%s\" from tsort relations.\n"),
p->name, p->version, p->release, dp);
p->tsi.tsi_count--;
@@ -1789,7 +1789,7 @@ static inline int addRelation( const rpmTransactionSet ts,
#endif
/* Avoid redundant relations. */
- /* XXX FIXME: add control bit. */
+ /* XXX TODO: add control bit. */
matchNum = q - ts->addedPackages.list;
if (selected[matchNum] != 0)
return 0;
@@ -1979,7 +1979,7 @@ rescan:
tsi->tsi_next = NULL;
p = tsi->tsi_suc;
if (p && (--p->tsi.tsi_count) <= 0) {
- /* XXX FIXME: add control bit. */
+ /* XXX TODO: add control bit. */
p->tsi.tsi_suc = NULL;
/*@-nullstate@*/ /* FIX: q->tsi.tsi_u.suc may be NULL */
addQ(p, &q->tsi.tsi_suc, &r);
@@ -2043,7 +2043,7 @@ rescan:
p->tsi.tsi_pkg = NULL;
if (!printed) {
- rpmMessage(RPMMESS_WARNING, _("LOOP:\n"));
+ rpmMessage(RPMMESS_DEBUG, _("LOOP:\n"));
printed = 1;
}
@@ -2052,7 +2052,7 @@ rescan:
/* Print next member of loop. */
sprintf(buf, "%s-%s-%s", p->name, p->version, p->release);
- rpmMessage(RPMMESS_WARNING, " %-40s %s\n", buf,
+ rpmMessage(RPMMESS_DEBUG, " %-40s %s\n", buf,
(dp ? dp : "not found!?!"));
dp = _free(dp);
@@ -2070,7 +2070,7 @@ rescan:
}
/* If a relation was eliminated, then continue sorting. */
- /* XXX FIXME: add control bit. */
+ /* XXX TODO: add control bit. */
if (nzaps && nrescans-- > 0) {
rpmMessage(RPMMESS_DEBUG, _("========== continuing tsort ...\n"));
goto rescan;
diff --git a/lib/fsm.c b/lib/fsm.c
index 6378ba516..7b46250be 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -551,10 +551,8 @@ int fsmMapPath(FSM_t fsm)
case FA_SKIP:
break;
case FA_SKIPMULTILIB: /* XXX RPMFILE_STATE_MULTILIB? */
-fprintf(stderr, "*** %s:%s %s\n", fiTypeString(fi), fileActionString(fsm->action), (fsm->path ? fsm->path : ""));
break;
case FA_UNKNOWN:
-fprintf(stderr, "*** %s:%s %s\n", fiTypeString(fi), fileActionString(fsm->action), (fsm->path ? fsm->path : ""));
break;
case FA_COPYOUT:
@@ -598,7 +596,6 @@ assert(fi->type == TR_ADDED);
assert(fi->type == TR_REMOVED);
break;
default:
-fprintf(stderr, "*** %s:%s %s\n", fiTypeString(fi), fileActionString(fsm->action), (fsm->path ? fsm->path : ""));
break;
}
@@ -1912,7 +1909,6 @@ int fsmStage(FSM_t fsm, fileStage stage)
rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, cfd)\trdnb %d\n",
cur, (fsm->wrbuf == fsm->wrb ? "wrbuf" : "mmap"),
(int)fsm->wrlen, (int)fsm->rdnb);
-if (fsm->rdnb != fsm->wrlen) fprintf(stderr, "*** short read, had %d, got %d\n", (int)fsm->rdnb, (int)fsm->wrlen);
if (fsm->rdnb != fsm->wrlen || Ferror(fsm->cfd))
rc = CPIOERR_READ_FAILED;
if (fsm->rdnb > 0)
@@ -1924,7 +1920,6 @@ if (fsm->rdnb != fsm->wrlen) fprintf(stderr, "*** short read, had %d, got %d\n",
rpmMessage(RPMMESS_DEBUG, " %8s (%s, %d, cfd)\twrnb %d\n",
cur, (fsm->rdbuf == fsm->rdb ? "rdbuf" : "mmap"),
(int)fsm->rdnb, (int)fsm->wrnb);
-if (fsm->rdnb != fsm->wrnb) fprintf(stderr, "*** short write, had %d, got %d\n", (int)fsm->rdnb, (int)fsm->wrnb);
if (fsm->rdnb != fsm->wrnb || Ferror(fsm->cfd))
rc = CPIOERR_WRITE_FAILED;
if (fsm->wrnb > 0)
@@ -1948,7 +1943,6 @@ if (fsm->rdnb != fsm->wrnb) fprintf(stderr, "*** short write, had %d, got %d\n",
if (_fsm_debug && (stage & FSM_SYSCALL))
rpmMessage(RPMMESS_DEBUG, " %8s (rdbuf, %d, rfd)\trdnb %d\n",
cur, (int)fsm->rdlen, (int)fsm->rdnb);
-if (fsm->rdnb != fsm->rdlen) fprintf(stderr, "*** short read, had %d, got %d\n", (int)fsm->rdnb, (int)fsm->rdlen);
if (fsm->rdnb != fsm->rdlen || Ferror(fsm->rfd))
rc = CPIOERR_READ_FAILED;
break;
@@ -1977,7 +1971,6 @@ if (fsm->rdnb != fsm->rdlen) fprintf(stderr, "*** short read, had %d, got %d\n",
if (_fsm_debug && (stage & FSM_SYSCALL))
rpmMessage(RPMMESS_DEBUG, " %8s (wrbuf, %d, wfd)\twrnb %d\n",
cur, (int)fsm->rdnb, (int)fsm->wrnb);
-if (fsm->rdnb != fsm->wrnb) fprintf(stderr, "*** short write: had %d, got %d\n", (int)fsm->rdnb, (int)fsm->wrnb);
if (fsm->rdnb != fsm->wrnb || Ferror(fsm->wfd))
rc = CPIOERR_WRITE_FAILED;
break;
diff --git a/lib/transaction.c b/lib/transaction.c
index fe5f8e286..c17587ca5 100644
--- a/lib/transaction.c
+++ b/lib/transaction.c
@@ -1517,7 +1517,9 @@ int rpmRunTransactions( rpmTransactionSet ts,
int i, j;
int ourrc = 0;
struct availablePackage * alp;
+#ifdef DYING
Header * hdrs;
+#endif
int totalFileCount = 0;
hashTable ht;
TFI_t fi;
@@ -1615,7 +1617,9 @@ int rpmRunTransactions( rpmTransactionSet ts,
if (dip) ts->di[i].bsize = 0;
}
+#ifdef DYING
hdrs = alloca(sizeof(*hdrs) * ts->addedPackages.size);
+#endif
/* ===============================================
* For packages being installed:
@@ -1709,13 +1713,21 @@ int rpmRunTransactions( rpmTransactionSet ts,
fi->record = 0;
loadFi(fi->ap->h, fi);
if (fi->fc == 0) {
+#ifdef DYING
hdrs[i] = headerLink(fi->h);
+#endif
continue;
}
/* Allocate file actions (and initialize to FA_UNKNOWN) */
fi->actions = xcalloc(fi->fc, sizeof(*fi->actions));
+#ifdef DYING
hdrs[i] = relocateFileList(ts, fi, fi->ap, fi->h, fi->actions);
+#else
+ { Header foo = relocateFileList(ts, fi, fi->ap, fi->h, fi->actions);
+ foo = headerFree(foo);
+ }
+#endif
/* Skip netshared paths, not our i18n files, and excluded docs */
skipFiles(ts, fi);
@@ -1946,6 +1958,7 @@ int rpmRunTransactions( rpmTransactionSet ts,
{
*newProbs = ts->probs;
+#ifdef DYING
for (alp = ts->addedPackages.list, fi = ts->flList;
(alp - ts->addedPackages.list) < ts->addedPackages.size;
alp++, fi++)
@@ -1953,6 +1966,7 @@ int rpmRunTransactions( rpmTransactionSet ts,
hdrs[alp - ts->addedPackages.list] =
headerFree(hdrs[alp - ts->addedPackages.list]);
}
+#endif
ts->flList = freeFl(ts, ts->flList);
ts->flEntries = 0;
@@ -1987,6 +2001,7 @@ int rpmRunTransactions( rpmTransactionSet ts,
lastFailed = -2; /* erased packages have -1 */
tsi = tsInitIterator(ts);
while ((fi = tsNextIterator(tsi)) != NULL) {
+ Header h;
int gotfd;
gotfd = 0;
@@ -1998,14 +2013,18 @@ int rpmRunTransactions( rpmTransactionSet ts,
assert(alp == fi->ap);
i = alp - ts->addedPackages.list;
+ h = headerLink(fi->h);
if (alp->fd == NULL) {
alp->fd = ts->notify(fi->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0,
alp->key, ts->notifyData);
if (alp->fd) {
- Header h;
rpmRC rpmrc;
+#ifdef DYING
hdrs[i] = headerFree(hdrs[i]);
+#else
+ h = headerFree(h);
+#endif
/*@-mustmod@*/ /* LCL: segfault */
rpmrc = rpmReadPackageHeader(alp->fd, &h, NULL, NULL, NULL);
/*@=mustmod@*/
@@ -2015,8 +2034,15 @@ assert(alp == fi->ap);
alp->fd = NULL;
ourrc++;
} else {
+#ifdef DYING
hdrs[i] = relocateFileList(ts, fi, alp, h, NULL);
h = headerFree(h);
+#else
+ Header foo = relocateFileList(ts, fi, alp, h, NULL);
+ h = headerFree(h);
+ h = headerLink(foo);
+ foo = headerFree(foo);
+#endif
}
if (alp->fd) gotfd = 1;
}
@@ -2029,7 +2055,11 @@ assert(alp == fi->ap);
hsave = headerLink(fi->h);
fi->h = headerFree(fi->h);
}
+#ifdef DYING
fi->h = headerLink(hdrs[i]);
+#else
+ fi->h = headerLink(h);
+#endif
if (alp->multiLib)
ts->transFlags |= RPMTRANS_FLAG_MULTILIB;
@@ -2048,7 +2078,11 @@ assert(alp == fi->ap);
lastFailed = i;
}
+#ifdef DYING
hdrs[i] = headerFree(hdrs[i]);
+#else
+ h = headerFree(h);
+#endif
if (gotfd) {
(void)ts->notify(fi->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0,