diff options
-rw-r--r-- | lib/problems.c | 2 | ||||
-rw-r--r-- | lib/query.c | 16 | ||||
-rw-r--r-- | lib/rpmds.c | 7 | ||||
-rw-r--r-- | lib/rpmlib.h | 4 | ||||
-rw-r--r-- | lib/transaction.c | 39 | ||||
-rw-r--r-- | lib/verify.c | 16 | ||||
-rw-r--r-- | po/rpm.pot | 56 |
7 files changed, 59 insertions, 81 deletions
diff --git a/lib/problems.c b/lib/problems.c index 1fa3cfde5..2be6abbe6 100644 --- a/lib/problems.c +++ b/lib/problems.c @@ -154,7 +154,7 @@ int rpmProblemSetTrim(rpmProblemSet ps, rpmProblemSet filter) continue; } while ((t - ps->probs) < ps->numProblems) { - /*@-nullpass@*/ /* LCL: looks good to me */ + /*@-nullpass@*/ /* LCL: looks good to me <shrug> */ if (f->type == t->type && t->key == f->key && XSTRCMP(f->str1, t->str1)) /*@innerbreak@*/ break; diff --git a/lib/query.c b/lib/query.c index 3356571fd..20536ce5c 100644 --- a/lib/query.c +++ b/lib/query.c @@ -543,10 +543,8 @@ int showMatches(QVA_t qva, rpmTransactionSet ts) while ((h = rpmdbNextIterator(qva->qva_mi)) != NULL) { int rc; - /*@-nullpass@*/ if ((rc = qva->qva_showPackage(qva, ts, h)) != 0) ec = rc; - /*@=nullpass@*/ } qva->qva_mi = rpmdbFreeIterator(qva->qva_mi); return ec; @@ -571,6 +569,7 @@ int rpmQueryVerify(QVA_t qva, rpmTransactionSet ts, const char * arg) int res = 0; Header h; int rc; + int xx; if (qva->qva_showPackage == NULL) return 1; @@ -605,7 +604,7 @@ restart: } ts->verify_legacy = 1; - /*@-mustmod@*/ /* LCL: something fishy here, was segfault */ + /*@=mustmod@*/ /* LCL: something fishy here, was segfault */ rpmrc = rpmReadPackageFile(ts, fd, fileURL, &h); /*@=mustmod@*/ ts->verify_legacy = 0; @@ -683,7 +682,7 @@ restart: int anyarch = 1; int force = 1; - /*@-mods@*/ + /*@-mods@*/ /* FIX: make spec abstract */ rc = parseSpecVec(&spec, arg, "/", buildRoot, recursing, passPhrase, cookie, anyarch, force); /*@=mods@*/ @@ -702,11 +701,8 @@ restart: break; } - for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) { - /*@-noeffectuncon@*/ /* FIX: check rc */ - (void) qva->qva_showPackage(qva, ts, pkg->header); - /*@=noeffectuncon@*/ - } + for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) + xx = qva->qva_showPackage(qva, ts, pkg->header); spec = freeSpecVec(spec); } break; @@ -782,9 +778,7 @@ restart: if (*s == '\0') { char fnbuf[PATH_MAX]; - /*@-unrecog -moduncon @*/ fn = realpath(arg, fnbuf); - /*@=unrecog =moduncon @*/; if (fn) fn = xstrdup(fn); else diff --git a/lib/rpmds.c b/lib/rpmds.c index 63bf773c6..57845e00d 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -20,6 +20,12 @@ /*@unchecked@*/ static int _fi_debug = 0; +/** + * Enable noisy range comparison debugging message? + */ +/*@unchecked@*/ +static int _noisy_range_comparison_debug_message = 0; + TFI_t XrpmfiUnlink(TFI_t fi, const char * msg, const char * fn, unsigned ln) { if (fi == NULL) return NULL; @@ -810,6 +816,7 @@ int dsCompare(const rpmDepSet A, const rpmDepSet B) } exit: + if (_noisy_range_comparison_debug_message) rpmMessage(RPMMESS_DEBUG, _(" %s A %s\tB %s\n"), (result ? _("YES") : _("NO ")), aDepend, bDepend); aDepend = _free(aDepend); diff --git a/lib/rpmlib.h b/lib/rpmlib.h index 6fb8d5893..e80c4e22c 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -1628,6 +1628,10 @@ typedef enum rpmprobFilterFlags_e { /** \ingroup rpmtrans * Process all packages in transaction set. + * + * @warning The value returned in *newProbs is now refcounted, and should + * be free'd using rpmProblemSetFree(). + * * @param ts transaction set * @param notify progress callback * @param notifyData progress callback private data diff --git a/lib/transaction.c b/lib/transaction.c index 01b999cd8..7de3a191c 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -111,9 +111,7 @@ int rpmtransGetKeys(const rpmTransactionSet ts, fnpyKey ** ep, int * nep) /*@switchbreak@*/ break; case TR_REMOVED: default: - /*@-mods@*/ /* FIX: double indirection. */ *e = NULL; - /*@=mods@*/ /*@switchbreak@*/ break; } e++; @@ -335,7 +333,6 @@ static int handleInstInstalledFiles(const rpmTransactionSet ts, fi->fmodes[fileNum], fi->fmd5s[fileNum], fi->flinks[fileNum])) { - /*@-compdef@*/ /* FIX: *fi->replaced undefined */ if (reportConflicts) { const char * altNEVR = hGetNEVR(h, NULL); rpmProblemSetAppend(ts->probs, RPMPROB_FILE_CONFLICT, @@ -345,10 +342,9 @@ static int handleInstInstalledFiles(const rpmTransactionSet ts, 0); altNEVR = _free(altNEVR); } - /*@=compdef@*/ if (!(otherFlags[otherFileNum] | fi->fflags[fileNum]) & RPMFILE_CONFIG) { - /*@-assignexpose@*/ + /*@-assignexpose@*/ /* FIX: p->replaced, not fi */ if (!shared->isRemoved) fi->replaced[numReplaced++] = *shared; /*@=assignexpose@*/ @@ -545,7 +541,6 @@ static void handleOverlappedFiles(const rpmTransactionSet ts, } /* Mark added overlapped non-identical files as a conflict. */ - /*@-branchstate@*/ /* FIX: p->key ??? */ if ((ts->ignoreSet & RPMPROB_FILTER_REPLACENEWFILES) && filecmp(recs[otherPkgNum]->fmodes[otherFileNum], recs[otherPkgNum]->fmd5s[otherFileNum], @@ -561,7 +556,6 @@ static void handleOverlappedFiles(const rpmTransactionSet ts, altNEVR, 0); } - /*@=branchstate@*/ /* Try to get the disk accounting correct even if a conflict. */ fixupSize = recs[otherPkgNum]->fsizes[otherFileNum]; @@ -673,7 +667,6 @@ static int ensureOlder(rpmTransactionSet ts, rc = headerMatchesDepFlags(h, req); req = dsFree(req); - /*@-branchstate@*/ /* FIX: p->key ??? */ if (rc == 0) { const char * altNEVR = hGetNEVR(h, NULL); rpmProblemSetAppend(ts->probs, RPMPROB_OLDPACKAGE, @@ -685,7 +678,6 @@ static int ensureOlder(rpmTransactionSet ts, rc = 1; } else rc = 0; - /*@=branchstate@*/ return rc; } @@ -904,10 +896,9 @@ int rpmRunTransactions( rpmTransactionSet ts, ts->notify = notify; ts->notifyData = notifyData; - /*@-assignexpose@*/ - ts->probs = *newProbs = rpmProblemSetCreate(); + ts->probs = rpmProblemSetFree(ts->probs); + ts->probs = rpmProblemSetCreate(); *newProbs = rpmpsLink(ts->probs, "RunTransactions"); - /*@=assignexpose@*/ ts->ignoreSet = ignoreSet; ts->currDir = _free(ts->currDir); ts->currDir = currentDirectory(); @@ -916,9 +907,7 @@ int rpmRunTransactions( rpmTransactionSet ts, ts->id = (int_32) time(NULL); memset(psm, 0, sizeof(*psm)); - /*@-assignexpose@*/ psm->ts = rpmtsLink(ts, "tsRun"); - /*@=assignexpose@*/ /* Get available space on mounted file systems. */ if (!(ts->ignoreSet & RPMPROB_FILTER_DISKSPACE) && @@ -991,19 +980,19 @@ int rpmRunTransactions( rpmTransactionSet ts, while ((p = teNext(pi, TR_ADDED)) != NULL) { rpmdbMatchIterator mi; - /*@-branchstate@*/ /* FIX: p->key ??? */ - if (!archOkay(p->arch) && !(ts->ignoreSet & RPMPROB_FILTER_IGNOREARCH)) - rpmProblemSetAppend(ts->probs, RPMPROB_BADARCH, + if (!(ts->ignoreSet & RPMPROB_FILTER_IGNOREARCH)) + if (!archOkay(p->arch)) + rpmProblemSetAppend(ts->probs, RPMPROB_BADARCH, p->NEVR, p->key, p->arch, NULL, NULL, 0); - if (!osOkay(p->os) && !(ts->ignoreSet & RPMPROB_FILTER_IGNOREOS)) - rpmProblemSetAppend(ts->probs, RPMPROB_BADOS, + if (!(ts->ignoreSet & RPMPROB_FILTER_IGNOREOS)) + if (!osOkay(p->os)) + rpmProblemSetAppend(ts->probs, RPMPROB_BADOS, p->NEVR, p->key, p->os, NULL, NULL, 0); - /*@=branchstate@*/ if (!(ts->ignoreSet & RPMPROB_FILTER_OLDPACKAGE)) { Header h; @@ -1319,9 +1308,7 @@ int rpmRunTransactions( rpmTransactionSet ts, { if (psm->ts != NULL) psm->ts = rpmtsUnlink(psm->ts, "tsRun (problems)"); - /*@-nullstate@*/ /* FIX: ts->flList may be NULL */ return ts->orderCount; - /*@=nullstate@*/ } /* =============================================== @@ -1374,24 +1361,20 @@ int rpmRunTransactions( rpmTransactionSet ts, rpmMessage(RPMMESS_DEBUG, "========== +++ %s\n", p->NEVR); h = NULL; { - /*@-noeffectuncon @*/ /* FIX: ??? */ p->fd = ts->notify(fi->h, RPMCALLBACK_INST_OPEN_FILE, 0, 0, p->key, ts->notifyData); - /*@=noeffectuncon @*/ if (p->fd != NULL) { rpmRC rpmrc; - /*@-mustmod@*/ /* LCL: segfault */ + /*@=mustmod@*/ /* LCL: segfault */ rpmrc = rpmReadPackageFile(ts, p->fd, "rpmRunTransactions", &h); /*@=mustmod@*/ if (!(rpmrc == RPMRC_OK || rpmrc == RPMRC_BADSIZE)) { - /*@-noeffectuncon @*/ /* FIX: check rc */ - (void) ts->notify(fi->h, RPMCALLBACK_INST_CLOSE_FILE, + p->fd = ts->notify(fi->h, RPMCALLBACK_INST_CLOSE_FILE, 0, 0, p->key, ts->notifyData); - /*@=noeffectuncon @*/ p->fd = NULL; ourrc++; } diff --git a/lib/verify.c b/lib/verify.c index b8d737d9e..70df8b62c 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -290,30 +290,20 @@ static int rpmVerifyScript(/*@unused@*/ QVA_t qva, rpmTransactionSet ts, psm->ts = rpmtsLink(ts, "rpmVerifyScript"); - if (scriptFd != NULL) { - /*@-type@*/ /* FIX: ??? */ + if (scriptFd != NULL) ts->scriptFd = fdLink(scriptFd, "rpmVerifyScript"); - /*@=type@*/ - } - /*@-type@*/ + psm->fi = fiNew(ts, NULL, h, RPMTAG_BASENAMES, 1); - /*@=type@*/ if (psm->fi != NULL) { /* XXX can't happen */ psm->stepName = "verify"; psm->scriptTag = RPMTAG_VERIFYSCRIPT; psm->progTag = RPMTAG_VERIFYSCRIPTPROG; rc = psmStage(psm, PSM_SCRIPT); } - /*@-type@*/ psm->fi = fiFree(psm->fi, 1); - /*@=type@*/ - if (scriptFd != NULL) { - /*@-type@*/ /* FIX: ??? */ + if (ts->scriptFd != NULL) ts->scriptFd = fdFree(ts->scriptFd, "rpmVerifyScript"); - /*@=type@*/ - ts->scriptFd = NULL; - } rpmtransClean(ts); /* XXX this is sure to cause heartburn */ diff --git a/po/rpm.pot b/po/rpm.pot index a7aef8f83..a41ffae9a 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2001-11-12 15:50-0500\n" +"POT-Creation-Date: 2001-11-12 17:47-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" @@ -1449,11 +1449,11 @@ msgstr "" msgid "%9s: (%s, %s) added to Depends cache.\n" msgstr "" -#: lib/depends.c:795 lib/rpmds.c:656 lib/rpmds.c:814 +#: lib/depends.c:795 lib/rpmds.c:662 lib/rpmds.c:821 msgid "NO " msgstr "" -#: lib/depends.c:795 lib/rpmds.c:656 lib/rpmds.c:814 +#: lib/depends.c:795 lib/rpmds.c:662 lib/rpmds.c:821 msgid "YES" msgstr "" @@ -2318,81 +2318,81 @@ msgstr "" msgid "can't query %s: %s\n" msgstr "" -#: lib/query.c:600 lib/query.c:638 lib/rpminstall.c:328 lib/rpminstall.c:470 +#: lib/query.c:599 lib/query.c:637 lib/rpminstall.c:328 lib/rpminstall.c:470 #: lib/rpminstall.c:840 #, c-format msgid "open of %s failed: %s\n" msgstr "" -#: lib/query.c:616 +#: lib/query.c:615 #, c-format msgid "query of %s failed\n" msgstr "" -#: lib/query.c:622 +#: lib/query.c:621 msgid "old format source packages cannot be queried\n" msgstr "" -#: lib/query.c:648 lib/rpminstall.c:483 +#: lib/query.c:647 lib/rpminstall.c:483 #, c-format msgid "%s: read manifest failed: %s\n" msgstr "" -#: lib/query.c:692 +#: lib/query.c:691 #, c-format msgid "query of specfile %s failed, can't parse\n" msgstr "" -#: lib/query.c:716 +#: lib/query.c:712 msgid "no packages\n" msgstr "" -#: lib/query.c:736 +#: lib/query.c:732 #, c-format msgid "group %s does not contain any packages\n" msgstr "" -#: lib/query.c:746 +#: lib/query.c:742 #, c-format msgid "no package triggers %s\n" msgstr "" -#: lib/query.c:756 +#: lib/query.c:752 #, c-format msgid "no package requires %s\n" msgstr "" -#: lib/query.c:767 +#: lib/query.c:763 #, c-format msgid "no package provides %s\n" msgstr "" -#: lib/query.c:804 +#: lib/query.c:798 #, c-format msgid "file %s: %s\n" msgstr "" -#: lib/query.c:808 +#: lib/query.c:802 #, c-format msgid "file %s is not owned by any package\n" msgstr "" -#: lib/query.c:835 +#: lib/query.c:829 #, c-format msgid "invalid package number: %s\n" msgstr "" -#: lib/query.c:838 +#: lib/query.c:832 #, c-format msgid "package record number: %u\n" msgstr "" -#: lib/query.c:843 +#: lib/query.c:837 #, c-format msgid "record %u could not be read\n" msgstr "" -#: lib/query.c:854 lib/rpminstall.c:628 +#: lib/query.c:848 lib/rpminstall.c:628 #, c-format msgid "package %s is not installed\n" msgstr "" @@ -2469,20 +2469,20 @@ msgid "OK" msgstr "" #. XXX legacy epoch-less requires/conflicts compatibility -#: lib/rpmds.c:784 +#: lib/rpmds.c:790 #, c-format msgid "" "the \"B\" dependency needs an epoch (assuming same as \"A\")\n" "\tA %s\tB %s\n" msgstr "" -#: lib/rpmds.c:813 +#: lib/rpmds.c:820 #, c-format msgid " %s A %s\tB %s\n" msgstr "" #. @=branchstate@ -#: lib/rpmds.c:837 +#: lib/rpmds.c:844 #, c-format msgid "package %s has unsatisfied %s: %s\n" msgstr "" @@ -2811,18 +2811,18 @@ msgstr "" msgid "Signature: UNKNOWN (%d)\n" msgstr "" -#: lib/transaction.c:187 +#: lib/transaction.c:185 #, c-format msgid "%s skipped due to missingok flag\n" msgstr "" #. @innercontinue@ -#: lib/transaction.c:858 +#: lib/transaction.c:850 #, c-format msgid "excluding directory %s\n" msgstr "" -#: lib/transaction.c:929 +#: lib/transaction.c:918 msgid "getting list of mounted filesystems\n" msgstr "" @@ -2834,17 +2834,17 @@ msgstr "" msgid "package lacks both group name and id lists (this should never happen)\n" msgstr "" -#: lib/verify.c:418 +#: lib/verify.c:408 #, c-format msgid "missing %s" msgstr "" -#: lib/verify.c:515 +#: lib/verify.c:505 #, c-format msgid "Unsatisifed dependencies for %s: " msgstr "" -#: lib/verify.c:553 +#: lib/verify.c:543 #, c-format msgid "%s-%s-%s: immutable header region digest check failed\n" msgstr "" |