From 37d0ee567a49fd2afcd80e734efd69d47a832b85 Mon Sep 17 00:00:00 2001 From: jbj Date: Wed, 31 Mar 1999 13:16:08 +0000 Subject: [PATCH] Restore check on BuildRoot != "/". CVS patchset: 2927 CVS date: 1999/03/31 13:16:08 --- build/parsePreamble.c | 12 ++++++------ po/rpm.pot | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/build/parsePreamble.c b/build/parsePreamble.c index dde87b3..da497f8 100644 --- a/build/parsePreamble.c +++ b/build/parsePreamble.c @@ -418,12 +418,6 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, char *macro, break; case RPMTAG_BUILDROOT: SINGLE_TOKEN_ONLY; - if (!strcmp(spec->buildRoot, "/")) { - rpmError(RPMERR_BADSPEC, - _("line %d: BuildRoot can not be \"/\": %s"), - spec->lineNum, spec->line); - return RPMERR_BADSPEC; - } if (spec->buildRoot == NULL) { const char *buildroot = rpmGetPath("%{buildroot}", NULL); if (buildroot && *buildroot != '%') { @@ -436,6 +430,12 @@ static int handlePreambleTag(Spec spec, Package pkg, int tag, char *macro, } else { macro = NULL; } + if (!strcmp(spec->buildRoot, "/")) { + rpmError(RPMERR_BADSPEC, + _("line %d: BuildRoot can not be \"/\": %s"), + spec->lineNum, spec->line); + return RPMERR_BADSPEC; + } spec->gotBuildRoot = 1; break; case RPMTAG_PREFIXES: diff --git a/po/rpm.pot b/po/rpm.pot index 498fb57..617ec20 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-03-30 18:57-0500\n" +"POT-Creation-Date: 1999-03-31 08:13-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -2007,52 +2007,52 @@ msgstr "" msgid "line %d: Illegal char '-' in %s: %s" msgstr "" -#: ../build/parsePreamble.c:441 +#: ../build/parsePreamble.c:435 #, c-format msgid "line %d: BuildRoot can not be \"/\": %s" msgstr "" -#: ../build/parsePreamble.c:454 +#: ../build/parsePreamble.c:448 #, c-format msgid "line %d: Prefixes must not end with \"/\": %s" msgstr "" -#: ../build/parsePreamble.c:466 +#: ../build/parsePreamble.c:460 #, c-format msgid "line %d: Docdir must begin with '/': %s" msgstr "" -#: ../build/parsePreamble.c:477 +#: ../build/parsePreamble.c:472 #, c-format msgid "line %d: Epoch/Serial field must be a number: %s" msgstr "" -#: ../build/parsePreamble.c:542 +#: ../build/parsePreamble.c:537 #, c-format msgid "line %d: Bad BuildArchitecture format: %s" msgstr "" -#: ../build/parsePreamble.c:552 +#: ../build/parsePreamble.c:547 #, c-format msgid "Internal error: Bogus tag %d" msgstr "" -#: ../build/parsePreamble.c:697 +#: ../build/parsePreamble.c:692 #, c-format msgid "Bad package specification: %s" msgstr "" -#: ../build/parsePreamble.c:703 +#: ../build/parsePreamble.c:698 #, c-format msgid "Package already exists: %s" msgstr "" -#: ../build/parsePreamble.c:730 +#: ../build/parsePreamble.c:725 #, c-format msgid "line %d: Unknown tag: %s" msgstr "" -#: ../build/parsePreamble.c:755 +#: ../build/parsePreamble.c:750 msgid "Spec file can't use BuildRoot" msgstr "" -- 2.7.4