Remove broken versioned provides rpmlib() tracking
authorPanu Matilainen <pmatilai@redhat.com>
Fri, 10 Dec 2010 08:36:45 +0000 (10:36 +0200)
committerPanu Matilainen <pmatilai@redhat.com>
Fri, 10 Dec 2010 15:05:22 +0000 (17:05 +0200)
- Every single package since rpm >= 3.0.4 or so has a versioned provide
  through the automatically added N = VR provide, which hasn't gotten
  tracked in all these years. Drop the useless dependency.
(cherry picked from commit 17445a390a8686de6d1532b03cd4dc8314850dd3)

build/parseReqs.c
build/rpmfc.c

index 8ffb3ed..12bcd47 100644 (file)
@@ -135,18 +135,6 @@ rpmRC parseRCPOT(rpmSpec spec, Package pkg, const char *field, rpmTagVal tagN,
                goto exit;
            }
 
-           switch(tagN) {
-           case RPMTAG_BUILDPREREQ:
-           case RPMTAG_PREREQ:
-           case RPMTAG_PROVIDEFLAGS:
-           case RPMTAG_OBSOLETEFLAGS:
-               /* Add prereq on rpmlib that has versioned dependencies. */
-               if (!rpmExpandNumeric("%{?_noVersionedDependencies}"))
-                   (void) rpmlibNeedsFeature(h, "VersionedDependencies", "3.0.3-1");
-               break;
-           default:
-               break;
-           }
            Flags |= rc->sense;
 
            /* now parse EVR */
index 96c8932..bddb865 100644 (file)
@@ -35,7 +35,6 @@ struct rpmfc_s {
     int ix;            /*!< current file index */
     int skipProv;      /*!< Don't auto-generate Provides:? */
     int skipReq;       /*!< Don't auto-generate Requires:? */
-    int tracked;       /*!< Versioned Provides: tracking dependency added? */
     char *buildRoot;   /*!< (Build) root dir */
     size_t brlen;      /*!< rootDir length */
 
@@ -483,17 +482,6 @@ assert(*s != '\0');
 assert(EVR != NULL);
            }
 
-
-           /* Add tracking dependency for versioned Provides: */
-           if (!fc->tracked && deptype == 'P' && *EVR != '\0') {
-               ds = rpmdsSingle(RPMTAG_REQUIRENAME,
-                       "rpmlib(VersionedDependencies)", "3.0.3-1",
-                       RPMSENSE_RPMLIB|(RPMSENSE_LESS|RPMSENSE_EQUAL));
-               xx = rpmdsMerge(&fc->requires, ds);
-               ds = rpmdsFree(ds);
-               fc->tracked = 1;
-           }
-
            ds = rpmdsSingle(tagN, N, EVR, Flags);
 
            /* Add to package dependencies. */
@@ -1221,7 +1209,6 @@ rpmRC rpmfcGenerateDepends(const rpmSpec spec, Package pkg)
     fc = rpmfcCreate(spec->buildRoot, 0);
     fc->skipProv = !pkg->autoProv;
     fc->skipReq = !pkg->autoReq;
-    fc->tracked = 0;
 
     /* Copy (and delete) manually generated dependencies to dictionary. */
     if (!fc->skipProv) {