diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/psm.c | 16 | ||||
-rw-r--r-- | lib/query.c | 2 | ||||
-rw-r--r-- | lib/rpminstall.c | 6 | ||||
-rw-r--r-- | lib/transaction.c | 2 | ||||
-rw-r--r-- | lib/verify.c | 2 |
5 files changed, 16 insertions, 12 deletions
@@ -1850,20 +1850,24 @@ assert(psm->mi == NULL); fi->h = rpmdbNextIterator(psm->mi); if (fi->h) fi->h = headerLink(fi->h); -else { -fprintf(stderr, "*** PSM_RDB_LOAD: header #%u not found\n", fi->record); -} + psm->mi = rpmdbFreeIterator(psm->mi); rc = (fi->h ? RPMRC_OK : RPMRC_FAIL); break; case PSM_RPMDB_ADD: if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST) break; - if (fi->h != NULL) /* XXX can't happen */ - rc = rpmdbAdd(rpmtsGetRdb(ts), rpmtsGetTid(ts), fi->h, NULL, NULL); + if (fi->h == NULL) break; /* XXX can't happen */ + if (!(rpmtsVerifySigFlags(ts) & _RPMTS_VSF_NOHDRCHK)) + rc = rpmdbAdd(rpmtsGetRdb(ts), rpmtsGetTid(ts), fi->h, + ts, headerCheck); + else + rc = rpmdbAdd(rpmtsGetRdb(ts), rpmtsGetTid(ts), fi->h, + NULL, NULL); break; case PSM_RPMDB_REMOVE: if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST) break; - rc = rpmdbRemove(rpmtsGetRdb(ts), rpmtsGetTid(ts), fi->record, NULL, NULL); + rc = rpmdbRemove(rpmtsGetRdb(ts), rpmtsGetTid(ts), fi->record, + NULL, NULL); break; default: diff --git a/lib/query.c b/lib/query.c index ad823e1f8..9b4172de7 100644 --- a/lib/query.c +++ b/lib/query.c @@ -926,7 +926,7 @@ int rpmcliQuery(rpmts ts, QVA_t qva, const char ** argv) if (qva->qva_showPackage == NULL) qva->qva_showPackage = showQueryPackage; - vsflags = rpmExpandNumeric("%{_vsflags_query}"); + vsflags = rpmExpandNumeric("%{?_vsflags_query}"); if (qva->qva_flags & VERIFY_DIGEST) vsflags |= _RPMTS_VSF_NODIGESTS; if (qva->qva_flags & VERIFY_SIGNATURE) diff --git a/lib/rpminstall.c b/lib/rpminstall.c index d1e267280..5c6a89641 100644 --- a/lib/rpminstall.c +++ b/lib/rpminstall.c @@ -244,9 +244,9 @@ int rpmInstall(rpmts ts, ts->goal = TSM_INSTALL; if (ia->installInterfaceFlags & INSTALL_UPGRADE) - vsflags = rpmExpandNumeric("%{_vsflags_erase}"); + vsflags = rpmExpandNumeric("%{?_vsflags_erase}"); else - vsflags = rpmExpandNumeric("%{_vsflags_install}"); + vsflags = rpmExpandNumeric("%{?_vsflags_install}"); if (ia->qva_flags & VERIFY_DIGEST) vsflags |= _RPMTS_VSF_NODIGESTS; if (ia->qva_flags & VERIFY_SIGNATURE) @@ -648,7 +648,7 @@ int rpmErase(rpmts ts, if (argv == NULL) return 0; - vsflags = rpmExpandNumeric("%{_vsflags_erase}"); + vsflags = rpmExpandNumeric("%{?_vsflags_erase}"); if (ia->qva_flags & VERIFY_DIGEST) vsflags |= _RPMTS_VSF_NODIGESTS; if (ia->qva_flags & VERIFY_SIGNATURE) diff --git a/lib/transaction.c b/lib/transaction.c index d765dfceb..c38aaa951 100644 --- a/lib/transaction.c +++ b/lib/transaction.c @@ -1399,7 +1399,7 @@ rpmMessage(RPMMESS_DEBUG, _("install/erase %d elements\n"), rpmtsNElements(ts)); rpmRC rpmrc; rpmrc = rpmReadPackageFile(ts, rpmteFd(p), - "rpmtsRun", &p->h); + rpmteNEVR(p), &p->h); if (!(rpmrc == RPMRC_OK || rpmrc == RPMRC_BADSIZE)) { /*@-noeffectuncon@*/ /* FIX: notify annotations */ diff --git a/lib/verify.c b/lib/verify.c index ad109ac37..d9689ae32 100644 --- a/lib/verify.c +++ b/lib/verify.c @@ -471,7 +471,7 @@ int rpmcliVerify(rpmts ts, QVA_t qva, const char ** argv) qva->qva_showPackage = showVerifyPackage; /* XXX verify flags are inverted from query. */ - vsflags = rpmExpandNumeric("%{_vsflags_verify}"); + vsflags = rpmExpandNumeric("%{?_vsflags_verify}"); if (!(qva->qva_flags & VERIFY_DIGEST)) vsflags |= _RPMTS_VSF_NODIGESTS; if (!(qva->qva_flags & VERIFY_SIGNATURE)) |