From e37e4308e78e4dbcf958b0bc37542facb5b3af24ccf764b79f1935cde0e13a62 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 5 Aug 2013 15:46:31 +0000 Subject: [PATCH] - weakdeps.diff: readd support for recommends, suggests, enhances supplements OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=284 --- rpm.changes | 6 +++ weakdeps.diff | 114 +++++++++++++++++++++++++++++++------------------- 2 files changed, 77 insertions(+), 43 deletions(-) diff --git a/rpm.changes b/rpm.changes index 4083d54..7e70ff4 100644 --- a/rpm.changes +++ b/rpm.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Aug 5 15:45:38 UTC 2013 - dmueller@suse.com + +- weakdeps.diff: readd support for recommends, suggests, enhances + supplements + ------------------------------------------------------------------- Thu Aug 1 15:34:49 CEST 2013 - mls@suse.de diff --git a/weakdeps.diff b/weakdeps.diff index 027eac3..474843b 100644 --- a/weakdeps.diff +++ b/weakdeps.diff @@ -7,16 +7,16 @@ A) use RPMTAG_SUGGESTS and RPMTAG_ENHANCES to store them. tags because I wanted to be compatible. The point is that applications that don't know about the new MISSINGOK semantics will mis-interpret the provides/requires otherwise, which - I deemed to risky. + I deemed too risky. B) use RPMSENSE_STRONG to support a "strong" version, "Recommends" instead of "Suggests" and "Supplements" instead of "Enhances". Needs extcond.diff for query operations. ---- ./build/parsePreamble.c.orig 2013-06-27 09:28:49.000000000 +0000 -+++ ./build/parsePreamble.c 2013-07-12 11:32:45.000000000 +0000 -@@ -341,6 +341,8 @@ static struct tokenBits_s const installS +--- build/parsePreamble.c ++++ build/parsePreamble.c +@@ -341,6 +341,8 @@ { "verify", RPMSENSE_SCRIPT_VERIFY }, { "pretrans", RPMSENSE_PRETRANS }, { "posttrans", RPMSENSE_POSTTRANS }, @@ -25,7 +25,7 @@ Needs extcond.diff for query operations. { NULL, 0 } }; -@@ -795,6 +797,18 @@ static rpmRC handlePreambleTag(rpmSpec s +@@ -795,6 +797,18 @@ if (parseRCPOT(spec, spec->sourcePackage, field, tag, 0, tagflags)) goto exit; break; @@ -44,7 +44,7 @@ Needs extcond.diff for query operations. case RPMTAG_EXCLUDEARCH: case RPMTAG_EXCLUSIVEARCH: case RPMTAG_EXCLUDEOS: -@@ -903,6 +917,14 @@ static struct PreambleRec_s const preamb +@@ -903,6 +917,14 @@ {RPMTAG_BUGURL, 0, 0, LEN_AND_STR("bugurl")}, {RPMTAG_COLLECTIONS, 0, 0, LEN_AND_STR("collections")}, {RPMTAG_ORDERFLAGS, 2, 0, LEN_AND_STR("orderwithrequires")}, @@ -59,9 +59,9 @@ Needs extcond.diff for query operations. {0, 0, 0, 0} }; ---- ./build/parseReqs.c.orig 2013-06-10 15:55:10.000000000 +0000 -+++ ./build/parseReqs.c 2013-07-12 11:32:45.000000000 +0000 -@@ -92,6 +92,18 @@ rpmRC parseRCPOT(rpmSpec spec, Package p +--- build/parseReqs.c ++++ build/parseReqs.c +@@ -92,6 +92,18 @@ case RPMTAG_BUILDCONFLICTS: nametag = RPMTAG_CONFLICTNAME; break; @@ -80,9 +80,9 @@ Needs extcond.diff for query operations. } for (r = field; *r != '\0'; r = re) { ---- ./build/reqprov.c.orig 2013-06-10 15:55:10.000000000 +0000 -+++ ./build/reqprov.c 2013-07-12 11:32:45.000000000 +0000 -@@ -81,6 +81,16 @@ int addReqProv(Package pkg, rpmTagVal ta +--- build/reqprov.c ++++ build/reqprov.c +@@ -81,6 +81,18 @@ extra = Flags & RPMSENSE_TRIGGER; dsp = &pkg->triggers; break; @@ -90,18 +90,31 @@ Needs extcond.diff for query operations. + versiontag = RPMTAG_SUGGESTSVERSION; + flagtag = RPMTAG_SUGGESTSFLAGS; + extra = Flags & _ALL_REQUIRES_MASK; ++ dsp = &pkg->suggests; + break; + case RPMTAG_ENHANCESNAME: + versiontag = RPMTAG_ENHANCESVERSION; + flagtag = RPMTAG_ENHANCESFLAGS; + extra = Flags & _ALL_REQUIRES_MASK; ++ dsp = &pkg->enhances; + break; case RPMTAG_REQUIRENAME: default: tagN = RPMTAG_REQUIRENAME; ---- ./build/rpmfc.c.orig 2013-06-10 15:55:10.000000000 +0000 -+++ ./build/rpmfc.c 2013-07-12 11:32:45.000000000 +0000 -@@ -1087,6 +1087,12 @@ static struct DepMsg_s depMsgs[] = { +--- build/rpmbuild_internal.h ++++ build/rpmbuild_internal.h +@@ -97,6 +97,8 @@ + rpmds obsoletes; + rpmds triggers; + rpmds order; ++ rpmds suggests; ++ rpmds enhances; + rpmfi cpioList; + rpm_loff_t cpioArchiveSize; + +--- build/rpmfc.c ++++ build/rpmfc.c +@@ -1087,6 +1087,12 @@ { "Obsoletes", { "%{?__find_obsoletes}", NULL, NULL, NULL }, RPMTAG_OBSOLETENAME, RPMTAG_OBSOLETEVERSION, RPMTAG_OBSOLETEFLAGS, 0, -1 }, @@ -114,7 +127,7 @@ Needs extcond.diff for query operations. { NULL, { NULL, NULL, NULL, NULL }, 0, 0, 0, 0, 0 } }; -@@ -1163,6 +1169,14 @@ static rpmRC rpmfcGenerateDependsHelper( +@@ -1163,6 +1169,14 @@ continue; tagflags = RPMSENSE_FIND_REQUIRES; break; @@ -129,9 +142,20 @@ Needs extcond.diff for query operations. default: continue; break; ---- ./lib/formats.c.orig 2012-11-18 08:21:06.000000000 +0000 -+++ ./lib/formats.c 2013-07-12 11:32:45.000000000 +0000 -@@ -486,6 +486,19 @@ static char * depflagsFormat(rpmtd td) +--- build/spec.c ++++ build/spec.c +@@ -141,6 +141,8 @@ + pkg->obsoletes = rpmdsFree(pkg->obsoletes); + pkg->triggers = rpmdsFree(pkg->triggers); + pkg->order = rpmdsFree(pkg->order); ++ pkg->suggests = rpmdsFree(pkg->suggests); ++ pkg->enhances = rpmdsFree(pkg->enhances); + pkg->fileList = argvFree(pkg->fileList); + pkg->fileFile = argvFree(pkg->fileFile); + pkg->policyList = argvFree(pkg->policyList); +--- lib/formats.c ++++ lib/formats.c +@@ -486,6 +486,19 @@ return val; } @@ -151,7 +175,7 @@ Needs extcond.diff for query operations. /** * Return tag container array size. * @param td tag data container -@@ -591,6 +604,7 @@ static const struct headerFormatFunc_s r +@@ -591,6 +604,7 @@ { RPMTD_FORMAT_VFLAGS, "vflags", vflagsFormat }, { RPMTD_FORMAT_EXPAND, "expand", expandFormat }, { RPMTD_FORMAT_FSTATUS, "fstatus", fstatusFormat }, @@ -159,9 +183,9 @@ Needs extcond.diff for query operations. { -1, NULL, NULL } }; ---- ./lib/rpmds.c.orig 2013-06-10 15:55:10.000000000 +0000 -+++ ./lib/rpmds.c 2013-07-12 11:32:45.000000000 +0000 -@@ -70,6 +70,10 @@ static int dsType(rpmTagVal tag, +--- lib/rpmds.c ++++ lib/rpmds.c +@@ -70,6 +70,14 @@ t = "Trigger"; evr = RPMTAG_TRIGGERVERSION; f = RPMTAG_TRIGGERFLAGS; @@ -169,12 +193,16 @@ Needs extcond.diff for query operations. + t = "Enhances"; + evr = RPMTAG_ENHANCESVERSION; + f = RPMTAG_ENHANCESFLAGS; ++ } else if (tag == RPMTAG_SUGGESTSNAME) { ++ t = "Suggests"; ++ evr = RPMTAG_SUGGESTSVERSION; ++ f = RPMTAG_SUGGESTSFLAGS; } else { rc = 1; } ---- ./lib/rpmds.h.orig 2013-06-10 15:55:10.000000000 +0000 -+++ ./lib/rpmds.h 2013-07-12 11:32:45.000000000 +0000 -@@ -48,7 +48,7 @@ enum rpmsenseFlags_e { +--- lib/rpmds.h ++++ lib/rpmds.h +@@ -48,7 +48,7 @@ RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ RPMSENSE_KEYRING = (1 << 26), @@ -183,7 +211,7 @@ Needs extcond.diff for query operations. RPMSENSE_CONFIG = (1 << 28) }; -@@ -70,6 +70,7 @@ typedef rpmFlags rpmsenseFlags; +@@ -70,6 +70,7 @@ RPMSENSE_FIND_REQUIRES | \ RPMSENSE_RPMLIB | \ RPMSENSE_KEYRING | \ @@ -191,9 +219,9 @@ Needs extcond.diff for query operations. RPMSENSE_PRETRANS | \ RPMSENSE_POSTTRANS | \ RPMSENSE_PREREQ | \ ---- ./lib/rpmtag.h.orig 2012-11-18 08:21:06.000000000 +0000 -+++ ./lib/rpmtag.h 2013-07-12 11:32:45.000000000 +0000 -@@ -217,14 +217,14 @@ typedef enum rpmTag_e { +--- lib/rpmtag.h ++++ lib/rpmtag.h +@@ -217,14 +217,14 @@ RPMTAG_PRETRANSPROG = 1153, /* s[] */ RPMTAG_POSTTRANSPROG = 1154, /* s[] */ RPMTAG_DISTTAG = 1155, /* s */ @@ -216,9 +244,9 @@ Needs extcond.diff for query operations. RPMTAG_PRIORITY = 1162, /* i[] extension placeholder (unimplemented) */ RPMTAG_CVSID = 1163, /* s (unimplemented) */ #define RPMTAG_SVNID RPMTAG_CVSID /* s (unimplemented) */ ---- ./lib/rpmtd.h.orig 2012-11-18 08:21:06.000000000 +0000 -+++ ./lib/rpmtd.h 2013-07-12 11:32:45.000000000 +0000 -@@ -228,6 +228,7 @@ typedef enum rpmtdFormats_e { +--- lib/rpmtd.h ++++ lib/rpmtd.h +@@ -228,6 +228,7 @@ RPMTD_FORMAT_VFLAGS = 17, /* file verify flags (int types) */ RPMTD_FORMAT_EXPAND = 18, /* macro expansion (string types) */ RPMTD_FORMAT_FSTATUS = 19, /* file verify status (int types) */ @@ -226,9 +254,9 @@ Needs extcond.diff for query operations. } rpmtdFormats; /** \ingroup rpmtd ---- ./python/rpmmodule.c.orig 2012-11-18 08:21:06.000000000 +0000 -+++ ./python/rpmmodule.c 2013-07-12 11:32:45.000000000 +0000 -@@ -393,6 +393,7 @@ static int initModule(PyObject *m) +--- python/rpmmodule.c ++++ python/rpmmodule.c +@@ -393,6 +393,7 @@ REGISTER_ENUM(RPMSENSE_RPMLIB); REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); REGISTER_ENUM(RPMSENSE_KEYRING); @@ -236,9 +264,9 @@ Needs extcond.diff for query operations. REGISTER_ENUM(RPMSENSE_CONFIG); REGISTER_ENUM(RPMTRANS_FLAG_TEST); ---- ./rpmpopt.in.orig 2012-12-18 15:50:36.000000000 +0000 -+++ ./rpmpopt.in 2013-07-12 11:32:45.000000000 +0000 -@@ -67,6 +67,22 @@ rpm alias --requires --qf \ +--- rpmpopt.in ++++ rpmpopt.in +@@ -67,6 +67,22 @@ --POPTdesc=$"list capabilities required by package(s)" rpm alias -R --requires @@ -261,9 +289,9 @@ Needs extcond.diff for query operations. rpm alias --info --qf '\ Name : %{NAME}\n\ %|EPOCH?{Epoch : %{EPOCH}\n}|\ ---- ./tests/rpmgeneral.at.orig 2012-11-18 08:21:06.000000000 +0000 -+++ ./tests/rpmgeneral.at 2013-07-12 11:32:45.000000000 +0000 -@@ -79,6 +79,10 @@ DISTTAG +--- tests/rpmgeneral.at ++++ tests/rpmgeneral.at +@@ -79,6 +79,10 @@ DISTURL DSAHEADER E @@ -274,7 +302,7 @@ Needs extcond.diff for query operations. EPOCH EPOCHNUM EVR -@@ -219,6 +223,10 @@ SOURCE +@@ -219,6 +223,10 @@ SOURCEPACKAGE SOURCEPKGID SOURCERPM