From 822fe26c20549c1e891d874316cf91a7b244c23d Mon Sep 17 00:00:00 2001 From: MyungJoo Ham Date: Wed, 26 Oct 2016 17:32:32 +0900 Subject: Backporting weak dependencies Additional modifications to support weak dependencies (resolving errors from the cherry-pick) rebased. Change-Id: I34e9a5b11853dd4c0862dfbb119a3a5b7dd4f2bd Signed-off-by: MyungJoo Ham --- build/reqprov.c | 4 ---- lib/rpmtag.h | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/build/reqprov.c b/build/reqprov.c index cbfbe56b5..cc642cae5 100644 --- a/build/reqprov.c +++ b/build/reqprov.c @@ -89,25 +89,21 @@ int addReqProv(Header h, rpmTagVal tagN, versiontag = RPMTAG_RECOMMENDVERSION; flagtag = RPMTAG_RECOMMENDFLAGS; extra = Flags & _ALL_REQUIRES_MASK; - dsp = &pkg->recommends; break; case RPMTAG_SUGGESTNAME: versiontag = RPMTAG_SUGGESTVERSION; flagtag = RPMTAG_SUGGESTFLAGS; extra = Flags & _ALL_REQUIRES_MASK; - dsp = &pkg->suggests; break; case RPMTAG_SUPPLEMENTNAME: versiontag = RPMTAG_SUPPLEMENTVERSION; flagtag = RPMTAG_SUPPLEMENTFLAGS; extra = Flags & _ALL_REQUIRES_MASK; - dsp = &pkg->supplements; break; case RPMTAG_ENHANCENAME: versiontag = RPMTAG_ENHANCEVERSION; flagtag = RPMTAG_ENHANCEFLAGS; extra = Flags & _ALL_REQUIRES_MASK; - dsp = &pkg->enhances; break; case RPMTAG_REQUIRENAME: default: diff --git a/lib/rpmtag.h b/lib/rpmtag.h index 025a0a415..04d5a2c23 100644 --- a/lib/rpmtag.h +++ b/lib/rpmtag.h @@ -307,6 +307,26 @@ typedef enum rpmTag_e { RPMTAG_OBSOLETENEVRS = 5043, /* s[] extension */ RPMTAG_CONFLICTNEVRS = 5044, /* s[] extension */ RPMTAG_FILENLINKS = 5045, /* i[] extension */ + RPMTAG_RECOMMENDNAME = 5046, /* s[] */ +#define RPMTAG_RECOMMENDS RPMTAG_RECOMMENDNAME /* s[] */ + RPMTAG_RECOMMENDVERSION = 5047, /* s[] */ + RPMTAG_RECOMMENDFLAGS = 5048, /* i[] */ + RPMTAG_SUGGESTNAME = 5049, /* s[] */ +#define RPMTAG_SUGGESTS RPMTAG_SUGGESTNAME /* s[] */ + RPMTAG_SUGGESTVERSION = 5050, /* s[] extension */ + RPMTAG_SUGGESTFLAGS = 5051, /* i[] extension */ + RPMTAG_SUPPLEMENTNAME = 5052, /* s[] */ +#define RPMTAG_SUPPLEMENTS RPMTAG_SUPPLEMENTNAME /* s[] */ + RPMTAG_SUPPLEMENTVERSION = 5053, /* s[] */ + RPMTAG_SUPPLEMENTFLAGS = 5054, /* i[] */ + RPMTAG_ENHANCENAME = 5055, /* s[] */ +#define RPMTAG_ENHANCES RPMTAG_ENHANCENAME /* s[] */ + RPMTAG_ENHANCEVERSION = 5056, /* s[] */ + RPMTAG_ENHANCEFLAGS = 5057, /* i[] */ + RPMTAG_RECOMMENDNEVRS = 5058, /* s[] extension */ + RPMTAG_SUGGESTNEVRS = 5059, /* s[] extension */ + RPMTAG_SUPPLEMENTNEVRS = 5060, /* s[] extension */ + RPMTAG_ENHANCENEVRS = 5061, /* s[] extension */ RPMTAG_FIRSTFREE_TAG /*!< internal */ } rpmTag; -- cgit v1.2.3