From b669dad0f5175b1983cc1991dedca6a7a1182711 Mon Sep 17 00:00:00 2001 From: marc Date: Thu, 29 Aug 1996 18:32:01 +0000 Subject: [PATCH] added AutoReqProv: logic CVS patchset: 995 CVS date: 1996/08/29 18:32:01 --- build/pack.c | 4 +++- build/spec.c | 16 ++++++++++++++++ build/specP.h | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/build/pack.c b/build/pack.c index 33e64c1..0b943fb 100644 --- a/build/pack.c +++ b/build/pack.c @@ -556,7 +556,9 @@ int packageBinaries(Spec s, char *passPhrase, int doPackage) /* Generate any automatic require/provide entries */ /* Then add the whole thing to the header */ - generateAutoReqProv(outHeader, pr); + if (s->autoReqProv) { + generateAutoReqProv(outHeader, pr); + } processReqProv(outHeader, pr); /* And add the final Header entry */ diff --git a/build/spec.c b/build/spec.c index b1c119a..1bc25e5 100644 --- a/build/spec.c +++ b/build/spec.c @@ -655,6 +655,7 @@ struct preamble_line { {RPMTAG_CONFLICTFLAGS, 0, "conflicts"}, {RPMTAG_DEFAULTPREFIX, 0, "prefix"}, {RPMTAG_BUILDROOT, 0, "buildroot"}, + {RPMTAG_AUTOREQPROV, 0, "autoreqprov"}, {0, 0, 0} }; @@ -830,6 +831,7 @@ Spec parseSpec(FILE *f, char *specfile, char *buildRootOverride) spec->numNoSource = 0; spec->numNoPatch = 0; spec->buildroot = NULL; + spec->autoReqProv = 1; sb = newStringBuf(); reset_spec(); /* Reset the parser */ @@ -1118,6 +1120,20 @@ Spec parseSpec(FILE *f, char *specfile, char *buildRootOverride) return NULL; } break; + case RPMTAG_AUTOREQPROV: + s1 = strtok(s, " \t\n"); + if (!s1) { + spec->autoReqProv = 0; + } else if (s1[0] == 'n' || s1[0] == 'N') { + spec->autoReqProv = 0; + } else if (!strcasecmp(s1, "false")) { + spec->autoReqProv = 0; + } else if (!strcasecmp(s1, "off")) { + spec->autoReqProv = 0; + } else if (!strcmp(s1, "0")) { + spec->autoReqProv = 0; + } + break; default: /* message(MESS_DEBUG, "Skipping: %s\n", line); */ /* This shouldn't happen? */ diff --git a/build/specP.h b/build/specP.h index 871e387..86baeac 100644 --- a/build/specP.h +++ b/build/specP.h @@ -33,6 +33,8 @@ struct SpecRec { int_32 *noSource; int_32 *noPatch; + int autoReqProv; + StringBuf prep; StringBuf build; StringBuf install; -- 2.7.4