summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-12-12 19:16:45 +0000
committerjbj <devnull@localhost>2002-12-12 19:16:45 +0000
commitd5a81771b690eca36a7b4efde27ef874204452c9 (patch)
tree2952cca45375f4e2d74480c066346fa924d96ea3 /build
parent8681309f1a19ebe597464aa3d1304bef06d3790e (diff)
downloadrpm-d5a81771b690eca36a7b4efde27ef874204452c9.tar.gz
rpm-d5a81771b690eca36a7b4efde27ef874204452c9.tar.bz2
rpm-d5a81771b690eca36a7b4efde27ef874204452c9.zip
- fix: add rpmlib(VersionedDependencies) if versioned Provides: found.
CVS patchset: 5937 CVS date: 2002/12/12 19:16:45
Diffstat (limited to 'build')
-rw-r--r--build/parseReqs.c2
-rw-r--r--build/rpmfc.c14
-rw-r--r--build/rpmfc.h5
3 files changed, 18 insertions, 3 deletions
diff --git a/build/parseReqs.c b/build/parseReqs.c
index 0290febe4..46feb9508 100644
--- a/build/parseReqs.c
+++ b/build/parseReqs.c
@@ -153,7 +153,7 @@ int parseRCPOT(Spec spec, Package pkg, const char *field, int tag,
case RPMTAG_PROVIDEFLAGS:
case RPMTAG_OBSOLETEFLAGS:
/* Add prereq on rpmlib that has versioned dependencies. */
- if (!rpmExpandNumeric("%{_noVersionedDependencies}"))
+ if (!rpmExpandNumeric("%{?_noVersionedDependencies}"))
(void) rpmlibNeedsFeature(h, "VersionedDependencies", "3.0.3-1");
/*@switchbreak@*/ break;
default:
diff --git a/build/rpmfc.c b/build/rpmfc.c
index 427c4789f..a3e7621a4 100644
--- a/build/rpmfc.c
+++ b/build/rpmfc.c
@@ -389,7 +389,20 @@ assert(EVR != NULL);
}
/*@=branchstate@*/
+
+ /* Add tracking dependency for versioned Provides: */
+ if (!fc->tracked && deptype == 'P' && *EVR != '\0') {
+ this = rpmdsSingle(RPMTAG_REQUIRENAME,
+ "rpmlib(VersionedDependencies)", "3.0.3-1",
+ RPMSENSE_RPMLIB|(RPMSENSE_LESS|RPMSENSE_EQUAL));
+ xx = rpmdsMerge(&fc->requires, this);
+ this = rpmdsFree(this);
+ fc->tracked = 1;
+ }
+
this = rpmdsSingle(tagN, N, EVR, Flags);
+
+ /* Add to package dependencies. */
xx = rpmdsMerge(depsp, this);
/* Add to file dependencies. */
@@ -1355,6 +1368,7 @@ int rpmfcGenerateDepends(const Spec spec, Package pkg)
fc = rpmfcNew();
fc->skipProv = !pkg->autoProv;
fc->skipReq = !pkg->autoReq;
+ fc->tracked = 0;
/* Copy (and delete) manually generated dependencies to dictionary. */
if (!fc->skipProv) {
diff --git a/build/rpmfc.h b/build/rpmfc.h
index 984cc99b9..4413d2047 100644
--- a/build/rpmfc.h
+++ b/build/rpmfc.h
@@ -19,8 +19,9 @@ struct rpmfc_s {
int fknown; /*!< no. of classified files */
int fwhite; /*!< no. of "white" files */
int ix; /*!< current file index */
- int skipProv; /*!< don't auto-generate Provides:? */
- int skipReq; /*!< don't auto-generate Requires:? */
+ int skipProv; /*!< Don't auto-generate Provides:? */
+ int skipReq; /*!< Don't auto-generate Requires:? */
+ int tracked; /*!< Versioned Provides: tracking dependency added? */
ARGV_t fn; /*!< (#files) file names */
ARGI_t fcolor; /*!< (#files) file colors */