/*@unchecked@*/
int _ts_debug = 0;
+/*@unchecked@*/
+static int _tso_debug = 1;
+
/*@observer@*/ /*@unchecked@*/
const char *rpmNAME = PACKAGE;
/*@modifies fileSystem@*/
{
/*@-nullpass@*/
-if (_te_debug) {
+if (_tso_debug) {
if (msg) fprintf(stderr, "%s", msg);
/*@i@*/ fprintf(stderr, " tsi %p suc %p next %p chain %p reqx %d qcnt %d\n", tsi, tsi->tsi_suc, tsi->tsi_next, tsi->tsi_chain, tsi->tsi_reqx, tsi->tsi_qcnt);
}
pkgKey = RPMAL_NOMATCH;
key = alSatisfiesDepend(ts->addedPackages, requires, &pkgKey);
-if (_te_debug)
+if (_tso_debug)
fprintf(stderr, "addRelation: pkgKey %ld\n", (long)pkgKey);
/* Ordering depends only on added package relations. */
#endif
/*@-nullpass -nullderef -formattype@*/
-if (_te_debug)
+if (_tso_debug)
fprintf(stderr, "addRelation: q %p(%s) from %p[%d:%d]\n", q, teGetN(q), ts->order, i, ts->orderCount);
/*@=nullpass =nullderef =formattype@*/
return 0;
selected[i] = 1;
/*@-nullpass@*/
-if (_te_debug)
+if (_tso_debug)
fprintf(stderr, "addRelation: selected[%d] = 1\n", i);
/*@=nullpass@*/
(void) teSetDepth(p, (teGetDepth(q) + 1));
/*@-nullpass@*/
-if (_te_debug)
+if (_tso_debug)
/*@i@*/ fprintf(stderr, "addRelation: p %p(%s) depth %d", p, teGetN(p), teGetDepth(p));
prtTSI(NULL, teGetTSI(p));
/*@=nullpass@*/
tsi->tsi_next = teGetTSI(q)->tsi_next;
/*@-nullpass -compmempass@*/
prtTSI("addRelation: new", tsi);
-if (_te_debug)
+if (_tso_debug)
/*@i@*/ fprintf(stderr, "addRelation: BEFORE q %p(%s)", q, teGetN(q));
prtTSI(NULL, teGetTSI(q));
/*@=nullpass =compmempass@*/
teGetTSI(q)->tsi_qcnt++; /* bump q successor count */
/*@=mods@*/
/*@-nullpass -compmempass@*/
-if (_te_debug)
+if (_tso_debug)
/*@i@*/ fprintf(stderr, "addRelation: AFTER q %p(%s)", q, teGetN(q));
prtTSI(NULL, teGetTSI(q));
/*@=nullpass =compmempass@*/
}
/**
- * Add element to list sorting by initial successor count.
+ * Add element to list sorting by tsi_qcnt.
* @param p new element
* @retval qp address of first element
* @retval rp address of last element
{
transactionElement q, qprev;
+ /* Mark the package as queued. */
+ teGetTSI(p)->tsi_reqx = 1;
+
if ((*rp) == NULL) { /* 1st element */
/*@-dependenttrans@*/ /* FIX: double indirection */
(*rp) = (*qp) = p;
/*@=dependenttrans@*/
return;
}
- for (qprev = NULL, q = (*qp); q != NULL; qprev = q, q = teGetTSI(q)->tsi_suc) {
+
+ /* Find location in queue using metric tsi_qcnt. */
+ for (qprev = NULL, q = (*qp);
+ q != NULL;
+ qprev = q, q = teGetTSI(q)->tsi_suc)
+ {
if (teGetTSI(q)->tsi_qcnt <= teGetTSI(p)->tsi_qcnt)
break;
}
- /* Mark the package as queued. */
- teGetTSI(p)->tsi_reqx = 1;
-
if (qprev == NULL) { /* insert at beginning of list */
teGetTSI(p)->tsi_suc = q;
/*@-dependenttrans@*/
int numOrderList;
int nrescans = 10;
int _printed = 0;
+ char deptypechar;
#ifdef DYING
int oType = TR_ADDED;
#else
alMakeIndex(ts->addedPackages);
/*@-modfilesystem -nullpass -formattype@*/
-if (_te_debug)
+if (_tso_debug)
fprintf(stderr, "*** rpmdepOrder(%p) order %p[%d]\n", ts, ts->order, ts->orderCount);
/*@=modfilesystem =nullpass =formattype@*/
(void) teSetNpreds(p, teGetTSI(p)->tsi_count);
/*@-modfilesystem -nullpass @*/
-if (_te_debug)
+if (_tso_debug)
/*@i@*/ fprintf(stderr, "\t+++ %p[%d] %s npreds %d\n", p, teiGetOc(pi), teGetNEVR(p), teGetNpreds(p));
/*@=modfilesystem =nullpass @*/
addQ(p, &q, &r);
qlen++;
/*@-modfilesystem -nullpass @*/
-if (_te_debug)
+if (_tso_debug)
/*@i@*/ fprintf(stderr, "\t+++ addQ ++ qlen %d p %p(%s)", qlen, p, teGetNEVR(p));
prtTSI(" p", teGetTSI(p));
/*@=modfilesystem =nullpass @*/
/* T5. Output front of queue (T7. Remove from queue.) */
for (; q != NULL; q = teGetTSI(q)->tsi_suc) {
- char deptypechar;
/* Mark the package as unqueued. */
teGetTSI(q)->tsi_reqx = 0;
addQ(p, &teGetTSI(q)->tsi_suc, &r);
qlen++;
/*@-modfilesystem -nullpass @*/
-if (_te_debug)
+if (_tso_debug)
/*@i@*/ fprintf(stderr, "\t+++ addQ ++ qlen %d p %p(%s)", qlen, p, teGetNEVR(p));
prtTSI(" p", teGetTSI(p));
/*@=modfilesystem =nullpass @*/
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-11-17 15:43-0500\n"
+"POT-Creation-Date: 2001-11-18 06:36-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid " failed - "
msgstr ""
-#: lib/depends.c:101
+#: lib/depends.c:104
#, c-format
msgid "cannot open Packages database in %s\n"
msgstr ""
-#: lib/depends.c:294
+#: lib/depends.c:297
#, c-format
msgid "package %s was already added, replacing with %s\n"
msgstr ""
-#: lib/depends.c:566
+#: lib/depends.c:569
msgid "(cached)"
msgstr ""
-#: lib/depends.c:591
+#: lib/depends.c:594
msgid "(rpmrc provides)"
msgstr ""
-#: lib/depends.c:607
+#: lib/depends.c:610
msgid "(rpmlib provides)"
msgstr ""
-#: lib/depends.c:628
+#: lib/depends.c:631
msgid "(db files)"
msgstr ""
-#: lib/depends.c:640
+#: lib/depends.c:643
msgid "(db provides)"
msgstr ""
-#: lib/depends.c:653
+#: lib/depends.c:656
msgid "(db package)"
msgstr ""
-#: lib/depends.c:692
+#: lib/depends.c:695
#, c-format
msgid "%9s: (%s, %s) added to Depends cache.\n"
msgstr ""
-#: lib/depends.c:694 lib/rpmds.c:407 lib/rpmds.c:566
+#: lib/depends.c:697 lib/rpmds.c:407 lib/rpmds.c:566
msgid "NO "
msgstr ""
-#: lib/depends.c:694 lib/rpmds.c:407 lib/rpmds.c:566
+#: lib/depends.c:697 lib/rpmds.c:407 lib/rpmds.c:566
msgid "YES"
msgstr ""
-#: lib/depends.c:1031
+#: lib/depends.c:1034
#, c-format
msgid "removing %s \"%s\" from tsort relations.\n"
msgstr ""
#. Record all relations.
-#: lib/depends.c:1293
+#: lib/depends.c:1302
msgid "========== recording tsort relations\n"
msgstr ""
#. T4. Scan for zeroes.
-#: lib/depends.c:1387
+#: lib/depends.c:1396
msgid ""
"========== tsorting packages (order, #predecessors, #succesors, depth)\n"
msgstr ""
-#: lib/depends.c:1471
+#: lib/depends.c:1479
msgid "========== successors only (presentation order)\n"
msgstr ""
-#: lib/depends.c:1541
+#: lib/depends.c:1549
msgid "LOOP:\n"
msgstr ""
-#: lib/depends.c:1576
+#: lib/depends.c:1584
msgid "========== continuing tsort ...\n"
msgstr ""
#. Return no. of packages that could not be ordered.
-#: lib/depends.c:1581
+#: lib/depends.c:1589
#, c-format
msgid "rpmdepOrder failed, %d elements remain\n"
msgstr ""