From d160f45ab3ef5e78836ffb668c8c7887ae1081c1 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Mon, 29 Mar 2010 06:17:30 +0300 Subject: [PATCH] Drop "support" for per-scriptlet build-requires - Rpm has never done anything useful with "BuildRequires(prep): foo" style dependencies other than recorded them in src.rpms, nor is there much point in properly supporting this in the future either - Frees up four more bits from rpmsenseFlags for better uses --- build/parsePreamble.c | 23 ++--------------------- lib/rpmds.h | 9 +-------- python/rpmmodule.c | 4 ---- 3 files changed, 3 insertions(+), 33 deletions(-) diff --git a/build/parsePreamble.c b/build/parsePreamble.c index e31af74..f97d9b1 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -131,16 +131,6 @@ static struct tokenBits_s const installScriptBits[] = { /** */ -static const struct tokenBits_s const buildScriptBits[] = { - { "prep", RPMSENSE_SCRIPT_PREP }, - { "build", RPMSENSE_SCRIPT_BUILD }, - { "install", RPMSENSE_SCRIPT_INSTALL }, - { "clean", RPMSENSE_SCRIPT_CLEAN }, - { NULL, 0 } -}; - -/** - */ static int parseBits(const char * s, const tokenBits tokbits, rpmsenseFlags * bp) { @@ -621,17 +611,6 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, if ((rc = parseNoSource(spec, field, tag))) return rc; break; - case RPMTAG_BUILDPREREQ: - case RPMTAG_BUILDREQUIRES: - if ((rc = parseBits(lang, buildScriptBits, &tagflags))) { - rpmlog(RPMLOG_ERR, - _("line %d: Bad %s: qualifiers: %s\n"), - spec->lineNum, rpmTagGetName(tag), spec->line); - return rc; - } - if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) - return rc; - break; case RPMTAG_REQUIREFLAGS: case RPMTAG_PREREQ: if ((rc = parseBits(lang, installScriptBits, &tagflags))) { @@ -643,6 +622,8 @@ static int handlePreambleTag(rpmSpec spec, Package pkg, rpmTag tag, if ((rc = parseRCPOT(spec, pkg, field, tag, 0, tagflags))) return rc; break; + case RPMTAG_BUILDPREREQ: + case RPMTAG_BUILDREQUIRES: case RPMTAG_BUILDCONFLICTS: case RPMTAG_CONFLICTFLAGS: case RPMTAG_OBSOLETEFLAGS: diff --git a/lib/rpmds.h b/lib/rpmds.h index 0e618f5..f208fe4 100644 --- a/lib/rpmds.h +++ b/lib/rpmds.h @@ -43,10 +43,7 @@ typedef enum rpmsenseFlags_e { RPMSENSE_TRIGGERUN = (1 << 17), /*!< %triggerun dependency. */ RPMSENSE_TRIGGERPOSTUN = (1 << 18), /*!< %triggerpostun dependency. */ RPMSENSE_MISSINGOK = (1 << 19), /*!< suggests/enhances hint. */ - RPMSENSE_SCRIPT_PREP = (1 << 20), /*!< %prep build dependency. */ - RPMSENSE_SCRIPT_BUILD = (1 << 21), /*!< %build build dependency. */ - RPMSENSE_SCRIPT_INSTALL = (1 << 22),/*!< %install build dependency. */ - RPMSENSE_SCRIPT_CLEAN = (1 << 23), /*!< %clean build dependency. */ + /* bits 20-23 unused */ RPMSENSE_RPMLIB = (1 << 24), /*!< rpmlib(feature) dependency. */ RPMSENSE_TRIGGERPREIN = (1 << 25), /*!< %triggerprein dependency. */ RPMSENSE_KEYRING = (1 << 26), @@ -68,10 +65,6 @@ typedef enum rpmsenseFlags_e { RPMSENSE_SCRIPT_POSTUN | \ RPMSENSE_SCRIPT_VERIFY | \ RPMSENSE_FIND_REQUIRES | \ - RPMSENSE_SCRIPT_PREP | \ - RPMSENSE_SCRIPT_BUILD | \ - RPMSENSE_SCRIPT_INSTALL | \ - RPMSENSE_SCRIPT_CLEAN | \ RPMSENSE_RPMLIB | \ RPMSENSE_KEYRING | \ RPMSENSE_PREREQ) diff --git a/python/rpmmodule.c b/python/rpmmodule.c index c68c616..ef07aa1 100644 --- a/python/rpmmodule.c +++ b/python/rpmmodule.c @@ -368,10 +368,6 @@ static int initModule(PyObject *m) REGISTER_ENUM(RPMSENSE_TRIGGERIN); REGISTER_ENUM(RPMSENSE_TRIGGERUN); REGISTER_ENUM(RPMSENSE_TRIGGERPOSTUN); - REGISTER_ENUM(RPMSENSE_SCRIPT_PREP); - REGISTER_ENUM(RPMSENSE_SCRIPT_BUILD); - REGISTER_ENUM(RPMSENSE_SCRIPT_INSTALL); - REGISTER_ENUM(RPMSENSE_SCRIPT_CLEAN); REGISTER_ENUM(RPMSENSE_RPMLIB); REGISTER_ENUM(RPMSENSE_TRIGGERPREIN); REGISTER_ENUM(RPMSENSE_KEYRING); -- 2.7.4