Drop "support" for per-scriptlet build-requires
authorPanu Matilainen <pmatilai@redhat.com>
Mon, 29 Mar 2010 03:17:30 +0000 (06:17 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Mon, 29 Mar 2010 03:21:10 +0000 (06:21 +0300)
- 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
lib/rpmds.h
python/rpmmodule.c

index e31af74..f97d9b1 100644 (file)
@@ -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:
index 0e618f5..f208fe4 100644 (file)
@@ -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)
index c68c616..ef07aa1 100644 (file)
@@ -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);