diff options
author | Florian Festi <ffesti@redhat.com> | 2017-03-09 12:12:32 +0100 |
---|---|---|
committer | Florian Festi <ffesti@redhat.com> | 2017-03-09 12:12:32 +0100 |
commit | e4349ef7292578a7286bfca2e68a150422e65c3c (patch) | |
tree | 3c62cb5d3d378aa5ba85e4b1fea43ea5900673ee | |
parent | e6bdf7a807ea5ca30bc467345dd1e07198945603 (diff) | |
download | rpm-e4349ef7292578a7286bfca2e68a150422e65c3c.tar.gz |
Fix check whether to allow rich deps in a given tag
Broken with 9d5bbd9774d00f50749bb045217eaf91c87b6de0
-rw-r--r-- | build/parseReqs.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/build/parseReqs.c b/build/parseReqs.c index 7373f8550..cea557cb3 100644 --- a/build/parseReqs.c +++ b/build/parseReqs.c @@ -129,6 +129,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN, rpmTagVal nametag = RPMTAG_NOT_FOUND; rpmsenseFlags Flags; rpmRC rc = RPMRC_FAIL; /* assume failure */ + int allow_richdeps = 0; if (!cbdata) cbdata = pkg; @@ -142,9 +143,11 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN, case RPMTAG_SUGGESTNAME: case RPMTAG_SUPPLEMENTNAME: case RPMTAG_ENHANCENAME: + case RPMTAG_CONFLICTNAME: + allow_richdeps = 1; + /* fall through */ case RPMTAG_PROVIDENAME: case RPMTAG_OBSOLETENAME: - case RPMTAG_CONFLICTNAME: case RPMTAG_ORDERNAME: nametag = tagN; break; @@ -152,6 +155,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN, /* XXX map legacy PreReq into Requires(pre,preun) */ nametag = RPMTAG_REQUIRENAME; tagflags |= (RPMSENSE_SCRIPT_PRE|RPMSENSE_SCRIPT_PREUN); + allow_richdeps = 1; break; case RPMTAG_TRIGGERPREIN: nametag = RPMTAG_TRIGGERNAME; @@ -212,9 +216,7 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN, if (r[0] == '(') { struct parseRCPOTRichData data; - if (nametag != RPMTAG_REQUIRENAME && nametag != RPMTAG_CONFLICTNAME && - nametag != RPMTAG_RECOMMENDNAME && nametag != RPMTAG_SUPPLEMENTNAME && - nametag != RPMTAG_SUGGESTNAME && nametag != RPMTAG_ENHANCENAME) { + if (!allow_richdeps) { rasprintf(&emsg, _("No rich dependencies allowed for this type")); goto exit; } |