diff options
-rw-r--r-- | Makefile.am | 2 | ||||
-rw-r--r-- | build/files.c | 4 | ||||
-rw-r--r-- | build/pack.c | 10 | ||||
-rw-r--r-- | build/parsePreamble.c | 2 | ||||
-rw-r--r-- | build/parseReqs.c | 7 | ||||
-rw-r--r-- | build/parseScript.c | 2 | ||||
-rw-r--r-- | build/reqprov.c | 19 | ||||
-rw-r--r-- | build/rpmbuild.h | 2 | ||||
-rw-r--r-- | lib/rpmlib.h | 1 | ||||
-rw-r--r-- | po/rpm.pot | 18 |
10 files changed, 35 insertions, 32 deletions
diff --git a/Makefile.am b/Makefile.am index eb63abe68..69e42c035 100644 --- a/Makefile.am +++ b/Makefile.am @@ -92,7 +92,7 @@ noconfig: .PHONY: archive archive: - @cvs -d `cat CVS/Root` diff >& /dev/null || { \ + @cvs -d `cat CVS/Root` diff 2>&1 > /dev/null || { \ echo " " ; \ echo "==> Please resolve differences between the repository and" ; \ echo "==> your rpm check out before tagging." ; \ diff --git a/build/files.c b/build/files.c index 0553e4b56..d44137c8f 100644 --- a/build/files.c +++ b/build/files.c @@ -1529,7 +1529,7 @@ static int generateAutoReqProv(Spec spec, Package pkg, freeStringBuf(readBuf); for (f = fsave; *f != NULL; f++) { if (**f) { - addReqProv(spec, pkg, RPMSENSE_PROVIDES, *f, NULL, 0); + addReqProv(spec, pkg->header, RPMSENSE_PROVIDES, *f, NULL, 0); } } freeSplitString(fsave); @@ -1555,7 +1555,7 @@ static int generateAutoReqProv(Spec spec, Package pkg, freeStringBuf(readBuf); for (f = fsave; *f != NULL; f++) { if (**f) { - addReqProv(spec, pkg, RPMSENSE_ANY, *f, NULL, 0); + addReqProv(spec, pkg->header, RPMSENSE_ANY, *f, NULL, 0); } } freeSplitString(fsave); diff --git a/build/pack.c b/build/pack.c index 5b49a7e60..8274db190 100644 --- a/build/pack.c +++ b/build/pack.c @@ -44,7 +44,7 @@ int packageSources(Spec spec) { CSA_t csabuf, *csa = &csabuf; HeaderIterator iter; - int_32 tag, count; + int_32 tag, type, count; char **ptr; int rc; @@ -65,10 +65,10 @@ int packageSources(Spec spec) /* Add the build restrictions */ iter = headerInitIterator(spec->buildRestrictions); - while (headerNextIterator(iter, &tag, NULL, (void **)&ptr, &count)) { - headerAddEntry(spec->sourceHeader, tag, - RPM_STRING_ARRAY_TYPE, ptr, count); - FREE(ptr); + while (headerNextIterator(iter, &tag, &type, (void **)&ptr, &count)) { + headerAddEntry(spec->sourceHeader, tag, type, ptr, count); + if (type == RPM_STRING_ARRAY_TYPE || type == RPM_I18NSTRING_TYPE) + FREE(ptr); } headerFreeIterator(iter); if (spec->buildArchitectureCount) { diff --git a/build/parsePreamble.c b/build/parsePreamble.c index 0d463ba99..62d4562e6 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -478,6 +478,7 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, char *macro, return rc; } break; + case RPMTAG_BUILDREQUIRES: case RPMTAG_REQUIREFLAGS: case RPMTAG_CONFLICTFLAGS: case RPMTAG_PREREQ: @@ -562,6 +563,7 @@ static struct PreambleRec { {RPMTAG_BUILDROOT, 0, 0, "buildroot"}, {RPMTAG_BUILDARCHS, 0, 0, "buildarchitectures"}, {RPMTAG_BUILDARCHS, 0, 0, "buildarch"}, + {RPMTAG_BUILDREQUIRES, 0, 0, "buildrequires"}, {RPMTAG_AUTOREQPROV, 0, 0, "autoreqprov"}, {RPMTAG_AUTOREQ, 0, 0, "autoreq"}, {RPMTAG_AUTOPROV, 0, 0, "autoprov"}, diff --git a/build/parseReqs.c b/build/parseReqs.c index 1aebb4119..9a31fe341 100644 --- a/build/parseReqs.c +++ b/build/parseReqs.c @@ -96,8 +96,9 @@ int parseRequiresConflicts(Spec spec, Package pkg, char *field, return RPMERR_BADSPEC; } - addReqProv(spec, pkg, flags, req, - (flags & RPMSENSE_SENSEMASK) ? version : NULL, index); + addReqProv(spec, + (tag == RPMTAG_BUILDREQUIRES ? spec->buildRestrictions : pkg->header), + flags, req, (flags & RPMSENSE_SENSEMASK) ? version : NULL, index); /* If there is no sense, we just read the next token */ req = (flags & RPMSENSE_SENSEMASK) ? NULL : version; @@ -141,7 +142,7 @@ int parseProvidesObsoletes(Spec spec, Package pkg, char *field, int tag) spec->line); return RPMERR_BADSPEC; } - addReqProv(spec, pkg, flags, prov, NULL, 0); + addReqProv(spec, pkg->header, flags, prov, NULL, 0); line = NULL; } diff --git a/build/parseScript.c b/build/parseScript.c index 5c4dd6784..03670d4e0 100644 --- a/build/parseScript.c +++ b/build/parseScript.c @@ -206,7 +206,7 @@ int parseScript(Spec spec, int parsePart) stripTrailingBlanksStringBuf(sb); p = getStringBuf(sb); - addReqProv(spec, pkg, RPMSENSE_PREREQ, prog, NULL, 0); + addReqProv(spec, pkg->header, RPMSENSE_PREREQ, prog, NULL, 0); /* Trigger script insertion is always delayed in order to */ /* get the index right. */ diff --git a/build/reqprov.c b/build/reqprov.c index 3ed4ad4ce..fc1012f80 100644 --- a/build/reqprov.c +++ b/build/reqprov.c @@ -4,7 +4,7 @@ #include "rpmbuild.h" -int addReqProv(Spec spec, Package pkg, +int addReqProv(Spec spec, Header h, int flag, const char *name, const char *version, int index) { const char **names; @@ -48,14 +48,14 @@ int addReqProv(Spec spec, Package pkg, version = ""; } - if (headerGetEntry(pkg->header, nametag, NULL, (void *) &names, &len)) { + if (headerGetEntry(h, nametag, NULL, (void *) &names, &len)) { if (flagtag) { - headerGetEntry(pkg->header, versiontag, NULL, + headerGetEntry(h, versiontag, NULL, (void *) &versions, NULL); - headerGetEntry(pkg->header, flagtag, NULL, (void *) &flags, NULL); + headerGetEntry(h, flagtag, NULL, (void *) &flags, NULL); } if (indextag) { - headerGetEntry(pkg->header, indextag, NULL, + headerGetEntry(h, indextag, NULL, (void *) &indexes, NULL); } while (len) { @@ -76,16 +76,15 @@ int addReqProv(Spec spec, Package pkg, FREE(versions); } - headerAddOrAppendEntry(pkg->header, nametag, - RPM_STRING_ARRAY_TYPE, &name, 1); + headerAddOrAppendEntry(h, nametag, RPM_STRING_ARRAY_TYPE, &name, 1); if (flagtag) { - headerAddOrAppendEntry(pkg->header, versiontag, + headerAddOrAppendEntry(h, versiontag, RPM_STRING_ARRAY_TYPE, &version, 1); - headerAddOrAppendEntry(pkg->header, flagtag, + headerAddOrAppendEntry(h, flagtag, RPM_INT32_TYPE, &flag, 1); } if (indextag) { - headerAddOrAppendEntry(pkg->header, indextag, + headerAddOrAppendEntry(h, indextag, RPM_INT32_TYPE, &index, 1); } diff --git a/build/rpmbuild.h b/build/rpmbuild.h index a8d03ead3..bbd5df6a8 100644 --- a/build/rpmbuild.h +++ b/build/rpmbuild.h @@ -128,7 +128,7 @@ void freePackage(/*@only@*/ Package p); /* from build/reqprov.h */ -int addReqProv(Spec spec, Package pkg, +int addReqProv(Spec spec, Header h, int flag, const char *name, const char *version, int index); /* from build/files.h */ diff --git a/lib/rpmlib.h b/lib/rpmlib.h index f2baf8ef7..5ad60e81e 100644 --- a/lib/rpmlib.h +++ b/lib/rpmlib.h @@ -130,6 +130,7 @@ extern const struct headerSprintfExtension rpmHeaderFormats[]; #define RPMTAG_CAPABILITY 1105 #define RPMTAG_SOURCEPACKAGE 1106 /* internal */ #define RPMTAG_ORIGFILENAMES 1107 +#define RPMTAG_BUILDREQUIRES 1108 /* internal */ #define RPMTAG_EXTERNAL_TAG 1000000 diff --git a/po/rpm.pot b/po/rpm.pot index bef4cf8da..698fbaade 100644 --- a/po/rpm.pot +++ b/po/rpm.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 1999-01-26 12:34-0500\n" +"POT-Creation-Date: 1999-01-26 16:30-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -1959,32 +1959,32 @@ msgstr "" msgid "line %d: Epoch/Serial field must be a number: %s" msgstr "" -#: ../build/parsePreamble.c:499 +#: ../build/parsePreamble.c:500 #, c-format msgid "line %d: Bad BuildArchitecture format: %s" msgstr "" -#: ../build/parsePreamble.c:509 +#: ../build/parsePreamble.c:510 #, c-format msgid "Internal error: Bogus tag %d" msgstr "" -#: ../build/parsePreamble.c:653 +#: ../build/parsePreamble.c:655 #, c-format msgid "Bad package specification: %s" msgstr "" -#: ../build/parsePreamble.c:659 +#: ../build/parsePreamble.c:661 #, c-format msgid "Package already exists: %s" msgstr "" -#: ../build/parsePreamble.c:686 +#: ../build/parsePreamble.c:688 #, c-format msgid "line %d: Unknown tag: %s" msgstr "" -#: ../build/parsePreamble.c:711 +#: ../build/parsePreamble.c:713 msgid "Spec file can't use BuildRoot" msgstr "" @@ -2063,12 +2063,12 @@ msgstr "" msgid "line %d: Version required in %s: %s" msgstr "" -#: ../build/parseReqs.c:122 +#: ../build/parseReqs.c:123 #, c-format msgid "line %d: No file names in %s: %s" msgstr "" -#: ../build/parseReqs.c:130 +#: ../build/parseReqs.c:131 #, c-format msgid "line %d: %s: tokens must begin with alpha-numeric: %s" msgstr "" |