Eliminate dead code.
authorjbj <devnull@localhost>
Fri, 16 Nov 2001 13:58:21 +0000 (13:58 +0000)
committerjbj <devnull@localhost>
Fri, 16 Nov 2001 13:58:21 +0000 (13:58 +0000)
CVS patchset: 5183
CVS date: 2001/11/16 13:58:21

lib/depends.c
lib/transaction.c
po/rpm.pot

index f9e7caa..584d07a 100644 (file)
@@ -479,6 +479,8 @@ int rpmtransAddPackage(rpmTransactionSet ts, Header h,
     }
 
     /* XXX WARNING: nothing below can access *p as t->order may be realloc'd */
+    name = p->name;
+
     {  rpmdbMatchIterator mi;
        Header h2;
 
@@ -507,7 +509,6 @@ int rpmtransAddPackage(rpmTransactionSet ts, Header h,
     }
 
     p = ts->order + oc;
-    name = p->name;
     obsoletes = rpmdsLink(p->obsoletes, "Obsoletes");
     obsoletes = dsiInit(p->obsoletes);
     if (obsoletes != NULL)
index 52e920c..52fb748 100644 (file)
@@ -862,28 +862,16 @@ static void skipFiles(const rpmTransactionSet ts, TFI_t fi)
     dff = alloca(dc * sizeof(*dff));
     memset(dff, 0, dc * sizeof(*dff));
 
-#ifdef DYING
-    for (i = 0; i < fi->fc; i++)
-#else
     if ((fi = tfiInit(fi, 0)) != NULL)
     while ((i = tfiNext(fi)) >= 0)
-#endif
     {
        char **nsp;
 
-#ifdef DYING
-       bn = fi->bnl[i];
-       bnlen = strlen(bn);
-       ix = fi->dil[i];
-       dn = fi->dnl[ix];
-       dnlen = strlen(dn);
-#else
        bn = tfiGetBN(fi);
        bnlen = strlen(bn);
        ix = tfiGetDX(fi);
        dn = tfiGetDN(fi);
        dnlen = strlen(dn);
-#endif
        if (dn == NULL)
            continue;   /* XXX can't happen */
 
@@ -990,13 +978,8 @@ static void skipFiles(const rpmTransactionSet ts, TFI_t fi)
        }
 
        /* If explicitly included in the package, skip the directory. */
-#ifdef DYING
-       for (i = 0; i < fi->fc; i++)
-#else
        if ((fi = tfiInit(fi, 0)) != NULL)
-       while ((i = tfiNext(fi)) >= 0)
-#endif
-       {
+       while ((i = tfiNext(fi)) >= 0) {
            const char * dir;
 
            if (XFA_SKIPPING(fi->actions[i]))
@@ -1302,13 +1285,8 @@ int rpmRunTransactions(  rpmTransactionSet ts,
 
        fpLookupList(fpc, fi->dnl, fi->bnl, fi->dil, fc, fi->fps);
        /*@-branchstate@*/
-#ifdef DYING
-       for (i = 0; i < fi->fc; i++)
-#else
        if ((fi = tfiInit(fi, 0)) != NULL)
-       while ((i = tfiNext(fi)) >= 0)
-#endif
-       {
+       while ((i = tfiNext(fi)) >= 0) {
            if (XFA_SKIPPING(fi->actions[i]))
                /*@innercontinue@*/ continue;
            /*@-dependenttrans@*/
@@ -1352,24 +1330,15 @@ int rpmRunTransactions( rpmTransactionSet ts,
        }
 
        numShared = 0;
-#ifdef DYING
-       for (i = 0; i < fi->fc; i++)
-#else
        if ((fi = tfiInit(fi, 0)) != NULL)
        while ((i = tfiNext(fi)) >= 0)
-#endif
            numShared += dbiIndexSetCount(matches[i]);
 
        /* Build sorted file info list for this package. */
        shared = sharedList = xcalloc((numShared + 1), sizeof(*sharedList));
 
-#ifdef DYING
-       for (i = 0; i < fi->fc; i++)
-#else
        if ((fi = tfiInit(fi, 0)) != NULL)
-       while ((i = tfiNext(fi)) >= 0)
-#endif
-       {
+       while ((i = tfiNext(fi)) >= 0) {
            /*
             * Take care not to mark files as replaced in packages that will
             * have been removed before we will get here.
index ee84bbe..11c5f3e 100644 (file)
@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-11-15 19:25-0500\n"
+"POT-Creation-Date: 2001-11-16 08:49-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"
@@ -1420,73 +1420,73 @@ msgstr ""
 msgid "package %s was already added, replacing with %s\n"
 msgstr ""
 
-#: lib/depends.c:675
+#: lib/depends.c:676
 msgid "(cached)"
 msgstr ""
 
-#: lib/depends.c:700
+#: lib/depends.c:701
 msgid "(rpmrc provides)"
 msgstr ""
 
-#: lib/depends.c:716
+#: lib/depends.c:717
 msgid "(rpmlib provides)"
 msgstr ""
 
-#: lib/depends.c:737
+#: lib/depends.c:738
 msgid "(db files)"
 msgstr ""
 
-#: lib/depends.c:749
+#: lib/depends.c:750
 msgid "(db provides)"
 msgstr ""
 
-#: lib/depends.c:762
+#: lib/depends.c:763
 msgid "(db package)"
 msgstr ""
 
-#: lib/depends.c:801
+#: lib/depends.c:802
 #, c-format
 msgid "%9s: (%s, %s) added to Depends cache.\n"
 msgstr ""
 
-#: lib/depends.c:803 lib/rpmds.c:407 lib/rpmds.c:566
+#: lib/depends.c:804 lib/rpmds.c:407 lib/rpmds.c:566
 msgid "NO "
 msgstr ""
 
-#: lib/depends.c:803 lib/rpmds.c:407 lib/rpmds.c:566
+#: lib/depends.c:804 lib/rpmds.c:407 lib/rpmds.c:566
 msgid "YES"
 msgstr ""
 
-#: lib/depends.c:1142
+#: lib/depends.c:1143
 #, c-format
 msgid "removing %s \"%s\" from tsort relations.\n"
 msgstr ""
 
 #. Record all relations.
-#: lib/depends.c:1373
+#: lib/depends.c:1374
 msgid "========== recording tsort relations\n"
 msgstr ""
 
 #. T4. Scan for zeroes.
-#: lib/depends.c:1444
+#: lib/depends.c:1445
 msgid ""
 "========== tsorting packages (order, #predecessors, #succesors, depth)\n"
 msgstr ""
 
-#: lib/depends.c:1519
+#: lib/depends.c:1520
 msgid "========== successors only (presentation order)\n"
 msgstr ""
 
-#: lib/depends.c:1579
+#: lib/depends.c:1580
 msgid "LOOP:\n"
 msgstr ""
 
-#: lib/depends.c:1614
+#: lib/depends.c:1615
 msgid "========== continuing tsort ...\n"
 msgstr ""
 
 #. Return no. of packages that could not be ordered.
-#: lib/depends.c:1619
+#: lib/depends.c:1620
 #, c-format
 msgid "rpmdepOrder failed, %d elements remain\n"
 msgstr ""
@@ -2783,12 +2783,12 @@ msgid "%s skipped due to missingok flag\n"
 msgstr ""
 
 #. @innercontinue@
-#: lib/transaction.c:1015
+#: lib/transaction.c:998
 #, c-format
 msgid "excluding directory %s\n"
 msgstr ""
 
-#: lib/transaction.c:1106
+#: lib/transaction.c:1089
 msgid "getting list of mounted filesystems\n"
 msgstr ""