summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorjbj <devnull@localhost>1998-09-24 20:36:54 +0000
committerjbj <devnull@localhost>1998-09-24 20:36:54 +0000
commit54b2849f61f86f75c1eb7481c6aa7ebd4acb6284 (patch)
tree16e51226467b4ffb186bc928b495d51a9b86c92c /build
parentd6a3e244e0aa5308844623f7973f03bd87dc3aaf (diff)
downloadlibrpm-tizen-54b2849f61f86f75c1eb7481c6aa7ebd4acb6284.tar.gz
librpm-tizen-54b2849f61f86f75c1eb7481c6aa7ebd4acb6284.tar.bz2
librpm-tizen-54b2849f61f86f75c1eb7481c6aa7ebd4acb6284.zip
skip arch checks if only packaging source rpm.
CVS patchset: 2352 CVS date: 1998/09/24 20:36:54
Diffstat (limited to 'build')
-rw-r--r--build/parsePreamble.c7
-rw-r--r--build/parseSpec.c7
-rw-r--r--build/rpmbuild.h4
3 files changed, 10 insertions, 8 deletions
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
index c4798635f..84d0fc8d6 100644
--- a/build/parsePreamble.c
+++ b/build/parsePreamble.c
@@ -626,7 +626,7 @@ static int findPreambleTag(Spec spec, int *tag, char **macro, char *lang)
return 0;
}
-int parsePreamble(Spec spec, int initialPackage)
+int parsePreamble(Spec spec, int initialPackage, int anyarch)
{
int nextPart;
int tag, rc;
@@ -705,8 +705,9 @@ int parsePreamble(Spec spec, int initialPackage)
return RPMERR_BADSPEC;
}
- if (checkForValidArchitectures(spec)) {
- return RPMERR_BADSPEC;
+ /* XXX Skip valid arch check if only doing -bs processing */
+ if (!anyarch && checkForValidArchitectures(spec)) {
+ return RPMERR_BADSPEC;
}
if (pkg == spec->packages) {
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 4b90462f9..b7668c2b9 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -214,7 +214,8 @@ void closeSpec(Spec spec)
int noLang = 0; /* XXX FIXME: pass as arg */
int parseSpec(Spec *specp, char *specFile, char *buildRoot,
- int inBuildArch, char *passPhrase, char *cookie)
+ int inBuildArch, char *passPhrase, char *cookie,
+ int anyarch)
{
int parsePart = PART_PREAMBLE;
int initialPackage = 1;
@@ -266,7 +267,7 @@ int parseSpec(Spec *specp, char *specFile, char *buildRoot,
while (parsePart != PART_NONE) {
switch (parsePart) {
case PART_PREAMBLE:
- parsePart = parsePreamble(spec, initialPackage);
+ parsePart = parsePreamble(spec, initialPackage, anyarch);
initialPackage = 0;
break;
case PART_PREP:
@@ -319,7 +320,7 @@ int parseSpec(Spec *specp, char *specFile, char *buildRoot,
rpmSetMachine(spec->buildArchitectures[x], NULL);
if (parseSpec(&(spec->buildArchitectureSpecs[index]),
specFile, buildRoot, 1,
- passPhrase, cookie)) {
+ passPhrase, cookie, anyarch)) {
spec->buildArchitectureCount = index;
freeSpec(spec);
return RPMERR_BADSPEC;
diff --git a/build/rpmbuild.h b/build/rpmbuild.h
index c8bd622e2..add90f57b 100644
--- a/build/rpmbuild.h
+++ b/build/rpmbuild.h
@@ -104,7 +104,7 @@ char *cleanFileName(char *name);
int parseChangelog(Spec spec);
int parseDescription(Spec spec);
int parseFiles(Spec spec);
-int parsePreamble(Spec spec, int initialPackage);
+int parsePreamble(Spec spec, int initialPackage, int anyarch);
int parsePrep(Spec spec);
int parseRequiresConflicts(Spec spec, Package pkg, char *field,
int tag, int index);
@@ -137,7 +137,7 @@ int processSourceFiles(Spec spec);
/* global entry points */
int parseSpec(Spec *specp, char *specFile, char *buildRoot,
- int inBuildArch, char *passPhrase, char *cookie);
+ int inBuildArch, char *passPhrase, char *cookie, int anyarch);
int buildSpec(Spec spec, int what, int test);
int packageBinaries(Spec spec);