From c8502fbab503982d95f49141c0a7fa305c750e90 Mon Sep 17 00:00:00 2001 From: jbj Date: Mon, 29 Jul 2002 23:06:06 +0000 Subject: [PATCH] - update trpm. - factor all mode-specific options into mode-specific tables. - treat an unspecified epoch as Epoch: 0 everywhere. CVS patchset: 5578 CVS date: 2002/07/29 23:06:06 --- CHANGES | 3 +++ build/poptBT.c | 20 +++++++-------- lib/depends.c | 34 ++++++++++++++++--------- lib/poptALL.c | 12 ++++++--- lib/poptI.c | 32 ++++++++++++++++++------ lib/poptQV.c | 13 +++++++++- lib/psm.c | 10 ++++++-- lib/rpmds.c | 48 +++++++++++++++++++++++++++++------- lib/rpmds.h | 41 +++++++++++++++++++++++++++--- lib/rpmts.c | 2 +- lib/transaction.c | 2 +- lib/verify.c | 6 +++++ popt/popt.c | 8 +++++- rpm.spec.in | 5 +++- rpmpopt.in | 51 +++++++++++++++++++------------------- rpmqv.c | 62 ++++++++++++++++++++-------------------------- scripts/trpm | 74 ++++++++++++++++++++++++++++++++++++++++++++++++------- 17 files changed, 303 insertions(+), 120 deletions(-) diff --git a/CHANGES b/CHANGES index f723265..783ac74 100644 --- a/CHANGES +++ b/CHANGES @@ -190,6 +190,9 @@ - popt: display sub-table options only once on --usage. - wire --nosignatures et al as common options, rework CLI options. - python: don't segfault in ts.GetKeys() on erased packages. + - update trpm. + - factor all mode-specific options into mode-specific tables. + - treat an unspecified epoch as Epoch: 0 everywhere. 4.0.3 -> 4.0.4: - solaris: translate i86pc to i386 (#57182). diff --git a/build/poptBT.c b/build/poptBT.c index 6314eac..c651a09 100644 --- a/build/poptBT.c +++ b/build/poptBT.c @@ -15,16 +15,16 @@ /*@unchecked@*/ struct rpmBuildArguments_s rpmBTArgs; -#define POPT_USECATALOG -1000 -#define POPT_NOLANG -1001 -#define POPT_RMSOURCE -1002 -#define POPT_RMBUILD -1003 -#define POPT_BUILDROOT -1004 -#define POPT_TARGETPLATFORM -1007 -#define POPT_NOBUILD -1008 -#define POPT_SHORTCIRCUIT -1009 -#define POPT_RMSPEC -1010 -#define POPT_SIGN -1012 +#define POPT_USECATALOG -1011 +#define POPT_NOLANG -1012 +#define POPT_RMSOURCE -1013 +#define POPT_RMBUILD -1014 +#define POPT_BUILDROOT -1015 +#define POPT_TARGETPLATFORM -1016 +#define POPT_NOBUILD -1017 +#define POPT_SHORTCIRCUIT -1018 +#define POPT_RMSPEC -1019 +#define POPT_SIGN -1020 #define POPT_REBUILD 0x4220 #define POPT_RECOMPILE 0x4320 diff --git a/lib/depends.c b/lib/depends.c index 1cbeb22..70c9db2 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -301,7 +301,7 @@ int rpmtsAddInstallElement(rpmts ts, Header h, * If no obsoletes version info is available, match all names. */ if (rpmdsEVR(obsoletes) == NULL - || headerMatchesDepFlags(h2, obsoletes)) + || rpmdsAnyMatchesDep(h2, obsoletes, _rpmds_nopromote)) xx = removePackage(ts, h2, rpmdbGetIteratorOffset(mi), pkgKey); } mi = rpmdbFreeIterator(mi); @@ -323,12 +323,12 @@ int rpmtsAddEraseElement(rpmts ts, Header h, int dboffset) /** * Check dep for an unsatisfied dependency. - * @todo Eliminate rpmrc provides. * @param ts transaction set * @param dep dependency + * @param adding dependency is from added package set? * @return 0 if satisfied, 1 if not satisfied, 2 if error */ -static int unsatisfiedDepend(rpmts ts, rpmds dep) +static int unsatisfiedDepend(rpmts ts, rpmds dep, int adding) /*@globals _cacheDependsRC, rpmGlobalMacroContext, fileSystem, internalState @*/ /*@modifies ts, _cacheDependsRC, rpmGlobalMacroContext, @@ -339,6 +339,7 @@ static int unsatisfiedDepend(rpmts ts, rpmds dep) rpmdbMatchIterator mi; const char * Name; Header h; + int _cacheThisRC = 1; int rc; int xx; @@ -437,8 +438,15 @@ static int unsatisfiedDepend(rpmts ts, rpmds dep) } /* Search added packages for the dependency. */ - if (rpmalSatisfiesDepend(ts->addedPackages, dep, NULL) != NULL) + if (rpmalSatisfiesDepend(ts->addedPackages, dep, NULL) != NULL) { + /* + * XXX Ick, context sensitive answers from dependency cache. + * XXX Always resolve added dependencies within context to disambiguate. + */ + if (_rpmds_nopromote) + _cacheThisRC = 0; goto exit; + } /* XXX only the installer does not have the database open here. */ if (rpmtsGetRdb(ts) != NULL) { @@ -464,7 +472,7 @@ static int unsatisfiedDepend(rpmts ts, rpmds dep) (void) rpmdbPruneIterator(mi, ts->removedPackages, ts->numRemovedPackages, 1); while ((h = rpmdbNextIterator(mi)) != NULL) { - if (rangeMatchesDepFlags(h, dep)) { + if (rpmdsAnyMatchesDep(h, dep, _rpmds_nopromote)) { rpmdsNotify(dep, _("(db provides)"), rc); mi = rpmdbFreeIterator(mi); goto exit; @@ -477,7 +485,7 @@ static int unsatisfiedDepend(rpmts ts, rpmds dep) (void) rpmdbPruneIterator(mi, ts->removedPackages, ts->numRemovedPackages, 1); while ((h = rpmdbNextIterator(mi)) != NULL) { - if (rangeMatchesDepFlags(h, dep)) { + if (rpmdsAnyMatchesDep(h, dep, _rpmds_nopromote)) { rpmdsNotify(dep, _("(db package)"), rc); mi = rpmdbFreeIterator(mi); goto exit; @@ -492,8 +500,10 @@ static int unsatisfiedDepend(rpmts ts, rpmds dep) * Search for an unsatisfied dependency. */ /*@-boundsread@*/ - if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOSUGGEST) && ts->solve != NULL) - xx = (*ts->solve) (ts, dep); + if (adding && !(rpmtsFlags(ts) & RPMTRANS_FLAG_NOSUGGEST)) { + if (ts->solve != NULL) + xx = (*ts->solve) (ts, dep); + } /*@=boundsread@*/ unsatisfied: @@ -504,7 +514,7 @@ exit: /* * If dbiOpen/dbiPut fails (e.g. permissions), we can't cache. */ - if (_cacheDependsRC) { + if (_cacheDependsRC && _cacheThisRC) { dbiIndex dbi; dbi = dbiOpen(rpmtsGetRdb(ts), RPMDBI_DEPENDS, 0); if (dbi == NULL) { @@ -581,7 +591,7 @@ static int checkPackageDeps(rpmts ts, const char * pkgNEVR, if (multiLib && !isDependsMULTILIB(Flags)) continue; - rc = unsatisfiedDepend(ts, requires); + rc = unsatisfiedDepend(ts, requires, adding); switch (rc) { case 0: /* requirements are satisfied. */ @@ -625,7 +635,7 @@ static int checkPackageDeps(rpmts ts, const char * pkgNEVR, if (multiLib && !isDependsMULTILIB(Flags)) continue; - rc = unsatisfiedDepend(ts, conflicts); + rc = unsatisfiedDepend(ts, conflicts, adding); /* 1 == unsatisfied, 0 == satsisfied */ switch (rc) { @@ -672,7 +682,9 @@ static int checkPackageSet(rpmts ts, const char * dep, pkgNEVR = hGetNEVR(h, NULL); requires = rpmdsNew(h, RPMTAG_REQUIRENAME, scareMem); + (void) rpmdsSetNoPromote(requires, _rpmds_nopromote); conflicts = rpmdsNew(h, RPMTAG_CONFLICTNAME, scareMem); + (void) rpmdsSetNoPromote(requires, _rpmds_nopromote); rc = checkPackageDeps(ts, pkgNEVR, requires, conflicts, dep, 0, adding); conflicts = rpmdsFree(conflicts); requires = rpmdsFree(requires); diff --git a/lib/poptALL.c b/lib/poptALL.c index b90576f..b4aa445 100644 --- a/lib/poptALL.c +++ b/lib/poptALL.c @@ -9,17 +9,20 @@ #include "debug.h" -#ifdef NOTYET -#define POPT_RCFILE -1022 -#endif #define POPT_SHOWVERSION -999 #define POPT_SHOWRC -998 +#ifdef NOTYET +#define POPT_RCFILE -997 +#endif /*@unchecked@*/ static int _debug = 0; /*@-exportheadervar@*/ /*@unchecked@*/ +extern int _rpmds_nopromote; + +/*@unchecked@*/ extern int _fps_debug; /*@unchecked@*/ @@ -227,6 +230,9 @@ struct poptOption rpmcliAllPoptTable[] = { N_("disable use of libio(3) API"), NULL}, #endif + { "promoteepoch", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_rpmds_nopromote, 0, + NULL, NULL}, + { "fpsdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_fps_debug, -1, NULL, NULL}, { "fsmdebug", '\0', POPT_ARG_VAL|POPT_ARGFLAG_DOC_HIDDEN, &_fsm_debug, -1, diff --git a/lib/poptI.c b/lib/poptI.c index a0c1e6e..f3fc208 100644 --- a/lib/poptI.c +++ b/lib/poptI.c @@ -16,12 +16,14 @@ extern time_t get_date(const char * p, void * now); /* XXX expedient lies */ /*@unchecked@*/ struct rpmInstallArguments_s rpmIArgs; -#define POPT_RELOCATE -1016 -#define POPT_EXCLUDEPATH -1019 -#define POPT_ROLLBACK -1024 - -/*@exits@*/ static void argerror(const char * desc) - /*@*/ +#define POPT_RELOCATE -1021 +#define POPT_EXCLUDEPATH -1022 +#define POPT_ROLLBACK -1023 + +/*@exits@*/ +static void argerror(const char * desc) + /*@globals stderr, fileSystem @*/ + /*@modifies stderr, fileSystem @*/ { /*@-modfilesys -globs @*/ fprintf(stderr, _("%s: %s\n"), __progname, desc); @@ -36,8 +38,8 @@ static void installArgCallback( /*@unused@*/ poptContext con, /*@unused@*/ enum poptCallbackReason reason, const struct poptOption * opt, const char * arg, /*@unused@*/ const void * data) - /*@globals rpmIArgs @*/ - /*@modifies rpmIArgs @*/ + /*@globals rpmIArgs, stderr, fileSystem @*/ + /*@modifies rpmIArgs, stderr, fileSystem @*/ { struct rpmInstallArguments_s * ia = &rpmIArgs; @@ -45,6 +47,11 @@ static void installArgCallback( /*@unused@*/ poptContext con, /*@-branchstate@*/ if (opt->arg == NULL) switch (opt->val) { + + case 'i': + ia->installInterfaceFlags |= INSTALL_INSTALL; + break; + case POPT_EXCLUDEPATH: if (arg == NULL || *arg != '/') argerror(_("exclude paths must begin with a /")); @@ -196,11 +203,19 @@ struct poptOption rpmInstallPoptTable[] = { N_("don't check disk space before installing"), NULL}, { "includedocs", '\0', POPT_ARGFLAG_DOC_HIDDEN, &rpmIArgs.incldocs, 0, N_("install documentation"), NULL}, + +#ifdef DYING { "install", '\0', POPT_BIT_SET, &rpmIArgs.installInterfaceFlags, INSTALL_INSTALL, N_("install package(s)"), N_("+") }, +#else + { "install", 'i', 0, NULL, 'i', + N_("install package(s)"), N_("+") }, +#endif + { "justdb", '\0', POPT_BIT_SET, &rpmIArgs.transFlags, RPMTRANS_FLAG_JUSTDB, N_("update the database, but do not modify the filesystem"), NULL}, + #ifdef DYING { "nodeps", '\0', 0, &rpmIArgs.noDeps, 0, N_("do not verify package dependencies"), NULL }, @@ -208,6 +223,7 @@ struct poptOption rpmInstallPoptTable[] = { { "nodeps", '\0', 0, NULL, RPMCLI_POPT_NODEPS, N_("do not verify package dependencies"), NULL }, #endif + { "nomd5", '\0', 0, NULL, RPMCLI_POPT_NOMD5, N_("don't verify MD5 digest of files"), NULL }, { "noorder", '\0', POPT_BIT_SET, diff --git a/lib/poptQV.c b/lib/poptQV.c index 6b519b7..4e3b17f 100644 --- a/lib/poptQV.c +++ b/lib/poptQV.c @@ -46,7 +46,7 @@ static void rpmQVSourceArgCallback( /*@unused@*/ poptContext con, case 'I': /* from --import */ case 'K': /* from --checksig, -K */ case 'R': /* from --resign */ - if (qva->qva_mode == ' ') { + if (qva->qva_mode == ' ' || qva->qva_mode == '\0') { qva->qva_mode = opt->val; qva->qva_char = ' '; } @@ -167,6 +167,15 @@ static void queryArgCallback(/*@unused@*/poptContext con, } break; + case 'i': + if (qva->qva_mode == 'q') { + /*@-nullassign -readonlytrans@*/ + const char * infoCommand[] = { "--info", NULL }; + /*@=nullassign =readonlytrans@*/ + (void) poptStuffArgs(con, infoCommand); + } + break; + case RPMCLI_POPT_NODIGEST: qva->qva_flags |= VERIFY_DIGEST; break; @@ -221,6 +230,8 @@ struct poptOption rpmQueryPoptTable[] = { N_("list all documentation files"), NULL }, { "dump", '\0', 0, 0, POPT_DUMP, N_("dump basic file information"), NULL }, + { NULL, 'i', POPT_ARGFLAG_DOC_HIDDEN, 0, 'i', + NULL, NULL }, { "list", 'l', 0, 0, 'l', N_("list files in package"), NULL }, diff --git a/lib/psm.c b/lib/psm.c index aec50da..37910bb 100644 --- a/lib/psm.c +++ b/lib/psm.c @@ -923,6 +923,8 @@ exit: } /** + * Execute triggers. + * @todo Trigger on any provides, not just package NVR. * @param psm package state machine data * @param sourceH * @param triggeredH @@ -954,7 +956,11 @@ static int handleOneTrigger(const PSM_t psm, Header sourceH, Header triggeredH, xx = headerNVR(sourceH, &sourceName, NULL, NULL); trigger = rpmdsInit(rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem)); - if (trigger != NULL) + if (trigger == NULL) + return rc; + + (void) rpmdsSetNoPromote(trigger, 1); + while ((i = rpmdsNext(trigger)) >= 0) { rpmTagType tit, tst, tpt; const char * Name; @@ -968,7 +974,7 @@ static int handleOneTrigger(const PSM_t psm, Header sourceH, Header triggeredH, if (!(Flags & psm->sense)) continue; - if (!headerMatchesDepFlags(sourceH, trigger)) + if (!rpmdsNVRMatchesDep(sourceH, trigger, 1)) continue; if (!( hge(triggeredH, RPMTAG_TRIGGERINDEX, &tit, diff --git a/lib/rpmds.c b/lib/rpmds.c index bbcaa87..efcc92f 100644 --- a/lib/rpmds.c +++ b/lib/rpmds.c @@ -19,6 +19,12 @@ static int _noisy_range_comparison_debug_message = 0; /*@unchecked@*/ int _rpmds_debug = 0; +/*@unchecked@*/ +int _rpmds_nopromote = 1; + +/*@unchecked@*/ +int _rpmds_unspecified_epoch_noise = 0; + rpmds XrpmdsUnlink(rpmds ds, const char * msg, const char * fn, unsigned ln) { if (ds == NULL) return NULL; @@ -157,6 +163,7 @@ rpmds rpmdsNew(Header h, rpmTag tagN, int scareMem) ds->N = N; ds->Nt = Nt; ds->Count = Count; + ds->nopromote = 0; xx = hge(h, tagEVR, &ds->EVRt, (void **) &ds->EVR, NULL); xx = hge(h, tagF, &ds->Ft, (void **) &ds->Flags, NULL); @@ -436,6 +443,26 @@ rpmTag rpmdsTagN(const rpmds ds) return tagN; } +int rpmdsNoPromote(const rpmds ds) +{ + int nopromote = 0; + + if (ds != NULL) + nopromote = ds->nopromote; + return nopromote; +} + +int rpmdsSetNoPromote(const rpmds ds, int nopromote) +{ + int onopromote = 0; + + if (ds != NULL) { + onopromote = ds->nopromote; + ds->nopromote = nopromote; + } + return onopromote; +} + void rpmdsNotify(rpmds ds, const char * where, int rc) { if (!(ds != NULL && ds->i >= 0 && ds->i < ds->Count)) @@ -579,14 +606,13 @@ int rpmdsCompare(const rpmds A, const rpmds B) if (aE && *aE && bE && *bE) sense = rpmvercmp(aE, bE); else if (aE && *aE && atol(aE) > 0) { -#ifndef LEGACY_COMPATIBILITY_NEEDS_THIS - /* XXX legacy epoch-less requires/conflicts compatibility */ - rpmMessage(RPMMESS_DEBUG, _("the \"B\" dependency needs an epoch (assuming same as \"A\")\n\tA %s\tB %s\n"), + if (!B->nopromote) { + int lvl = (_rpmds_unspecified_epoch_noise ? RPMMESS_WARNING : RPMMESS_DEBUG); + rpmMessage(lvl, _("The \"B\" dependency needs an epoch (assuming same epoch as \"A\")\n\tA = \"%s\"\tB = \"%s\"\n"), aDepend, bDepend); - sense = 0; -#else - sense = 1; -#endif + sense = 0; + } else + sense = 1; } else if (bE && *bE && atol(bE) > 0) sense = -1; @@ -652,7 +678,7 @@ void rpmdsProblem(rpmps ps, const char * pkgNEVR, const rpmds ds, rpmpsAppend(ps, type, pkgNEVR, key, NULL, NULL, DNEVR, adding); } -int rangeMatchesDepFlags (Header h, const rpmds req) +int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote) { int scareMem = 1; rpmds provides = NULL; @@ -667,6 +693,8 @@ int rangeMatchesDepFlags (Header h, const rpmds req) provides = rpmdsInit(rpmdsNew(h, RPMTAG_PROVIDENAME, scareMem)); if (provides == NULL) goto exit; /* XXX should never happen */ + if (nopromote) + (void) rpmdsSetNoPromote(provides, nopromote); /* * Rpm prior to 3.0.3 did not have versioned provides. @@ -701,7 +729,7 @@ exit: return result; } -int headerMatchesDepFlags(const Header h, const rpmds req) +int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote) { HGE_t hge = (HGE_t)headerGetEntryMinMemory; const char * pkgN, * v, * r; @@ -733,6 +761,8 @@ int headerMatchesDepFlags(const Header h, const rpmds req) /*@=boundswrite@*/ if ((pkg = rpmdsSingle(RPMTAG_PROVIDENAME, pkgN, pkgEVR, pkgFlags)) != NULL) { + if (nopromote) + (void) rpmdsSetNoPromote(pkg, nopromote); rc = rpmdsCompare(pkg, req); pkg = rpmdsFree(pkg); } diff --git a/lib/rpmds.h b/lib/rpmds.h index 41c60ec..bffc6f2 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -15,6 +15,13 @@ extern int _rpmds_debug; /*@=exportlocal@*/ +/** + */ +/*@-exportlocal@*/ +/*@unchecked@*/ +extern int _rpmds_nopromote; +/*@=exportlocal@*/ + #if defined(_RPMDS_INTERNAL) /** * A package dependency set. @@ -39,6 +46,7 @@ struct rpmds_s { int_32 * Flags; /*!< Flags identifying context/comparison. */ rpmTagType Nt, EVRt, Ft; /*!< Tag data types. */ int_32 Count; /*!< No. of elements */ + int nopromote; /*!< Don't promote Epoch: in rpmdsCompare()? */ /*@refs@*/ int nrefs; /*!< Reference count. */ }; @@ -206,6 +214,30 @@ rpmTag rpmdsTagN(/*@null@*/ const rpmds ds) /*@*/; /** + * Return current "Don't promote Epoch:" flag. + * + * This flag controls for Epoch: promotion when a dependency set is + * compared. If the flag is set (for already installed packages), then + * an unspecified value will be treated as Epoch: 0. Otherwise (for added + * packages), the Epoch: portion of the comparison is skipped if the value + * is not specified, i.e. an unspecified Epoch: is assumed to be equal + * in dependency comparisons. + * + * @param ds dependency set + * @return current "Don't promote Epoch:" flag + */ +int rpmdsNoPromote(/*@null@*/ const rpmds ds) + /*@*/; + +/** + * Set "Don't promote Epoch:" flag. + * @param ds dependency set + * @return previous "Don't promote Epoch:" flag + */ +int rpmdsSetNoPromote(/*@null@*/ const rpmds ds, int nopromote) + /*@*/; + +/** * Notify of results of dependency match. * @param ds dependency set * @param where where dependency was resolved (or NULL) @@ -260,18 +292,21 @@ void rpmdsProblem(/*@null@*/ rpmps ps, const char * pkgNEVR, const rpmds ds, * Compare package provides dependencies from header with a single dependency. * @param h header * @param req dependency set + * @param nopromote Don't promote Epoch: in comparison? + * @return 1 if any dependency overlaps, 0 otherwise */ -int rangeMatchesDepFlags (Header h, const rpmds req) +int rpmdsAnyMatchesDep (const Header h, const rpmds req, int nopromote) /*@modifies h @*/; /** * Compare package name-version-release from header with a single dependency. * @deprecated Remove from API when obsoletes is correctly implemented. * @param h header - * @param req dependency + * @param req dependency set + * @param nopromote Don't promote Epoch: in comparison? * @return 1 if dependency overlaps, 0 otherwise */ -int headerMatchesDepFlags(const Header h, const rpmds req) +int rpmdsNVRMatchesDep(const Header h, const rpmds req, int nopromote) /*@*/; #ifdef __cplusplus diff --git a/lib/rpmts.c b/lib/rpmts.c index 70d4c7b..33fb49e 100644 --- a/lib/rpmts.c +++ b/lib/rpmts.c @@ -382,7 +382,7 @@ int rpmtsSolve(rpmts ts, rpmds ds) time_t htime; int_32 * ip; - if (rpmtag == RPMTAG_PROVIDENAME && !rangeMatchesDepFlags(h, ds)) + if (rpmtag == RPMTAG_PROVIDENAME && !rpmdsAnyMatchesDep(h, ds, 1)) continue; htime = 0; diff --git a/lib/transaction.c b/lib/transaction.c index 61ff5d6..d765dfc 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -701,7 +701,7 @@ static int ensureOlder(rpmts ts, /*@=boundswrite@*/ req = rpmdsSingle(RPMTAG_REQUIRENAME, rpmteN(p), reqEVR, reqFlags); - rc = headerMatchesDepFlags(h, req); + rc = rpmdsNVRMatchesDep(h, req, _rpmds_nopromote); req = rpmdsFree(req); if (rc == 0) { diff --git a/lib/verify.c b/lib/verify.c index a528a92..f39405c 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -23,6 +23,9 @@ #define S_ISDEV(m) (S_ISBLK((m)) || S_ISCHR((m))) +/*@unchecked@*/ +extern int _rpmds_unspecified_epoch_noise; + int rpmVerifyFile(const rpmts ts, const rpmfi fi, rpmVerifyAttrs * res, rpmVerifyAttrs omitMask) { @@ -432,8 +435,11 @@ int showVerifyPackage(QVA_t qva, rpmts ts, Header h) if (fi != NULL) { if (qva->qva_flags & VERIFY_DEPS) { + int save_noise = _rpmds_unspecified_epoch_noise; + _rpmds_unspecified_epoch_noise = 1; if ((rc = verifyDependencies(qva, ts, h)) != 0) ec = rc; + _rpmds_unspecified_epoch_noise = save_noise; } if (qva->qva_flags & VERIFY_FILES) { if ((rc = verifyHeader(qva, ts, fi)) != 0) diff --git a/popt/popt.c b/popt/popt.c index d71e2bf..812861e 100644 --- a/popt/popt.c +++ b/popt/popt.c @@ -18,6 +18,11 @@ #include "findme.h" #include "poptint.h" +#ifdef MYDEBUG +/*@unchecked@*/ +int _popt_debug = 0; +#endif + #ifndef HAVE_STRERROR static char * strerror(int errno) { extern int sys_nerr; @@ -427,7 +432,8 @@ static int execCommand(poptContext con) if (argv[0] == NULL) return POPT_ERROR_NOARG; -#ifdef MYDEBUG +#ifdef MYDEBUG +if (_popt_debug) { const char ** avp; fprintf(stderr, "==> execvp(%s) argv[%d]:", argv[0], argc); for (avp = argv; *avp; avp++) diff --git a/rpm.spec.in b/rpm.spec.in index d7f5437..e0a3b36 100644 --- a/rpm.spec.in +++ b/rpm.spec.in @@ -515,10 +515,13 @@ fi %{__prefix}/include/popt.h %changelog -* Sat Jul 27 2002 Jeff Johnson 4.1-0.58 +* Mon Jul 29 2002 Jeff Johnson 4.1-0.58 - popt: display sub-table options only once on --usage. - wire --nosignatures et al as common options, rework CLI options. - python: don't segfault in ts.GetKeys() on erased packages. +- update trpm. +- factor all mode-specific options into mode-specific tables. +- treat an unspecified epoch as Epoch: 0 everywhere. * Thu Jul 25 2002 Jeff Johnson 4.1-0.57 - python: remove the old initdb/rebuilddb methods, use ts.fooDB(). diff --git a/rpmpopt.in b/rpmpopt.in index 9c669d6..a65642c 100644 --- a/rpmpopt.in +++ b/rpmpopt.in @@ -117,7 +117,7 @@ rpm alias --rebuilddbapi --define '_dbapi_rebuild !#:+' rpm alias --rebuilddbpath --define '_dbapath_rebuild !#:+' #============================================================================== -# [--dbpath ] "use as the directory for the database" +# [--dbpath DIRECTORY" "use database in DIRECTORY" rpm alias --dbpath --define '_dbpath !#:+' # [--ftpport ] "port number of ftp server (or proxy)" rpm alias --ftpport --define '_ftpport !#:+' @@ -165,6 +165,7 @@ rpm exec --verifydb rpmd --verifydb rpm exec --addsign rpmk --addsign rpm exec -K rpmk -K rpm exec --checksig rpmk --checksig +rpm exec --import rpmk --import rpm exec --resign rpmk --resign rpm exec -q rpmq -q @@ -182,8 +183,8 @@ rpm alias --without --define "_without_!#:+ --without-!#:+" \ --POPTargs=$"