commit a4825e488d44e01803c377ebc4fc054adcf42b3a
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Thu Oct 23 07:47:25 2008 +0300
Make noarch subpackages actually work
- noarch subpackages get their arch tag from parsePreamble() already,
don't stomp over it later in parseSpec()
diff --git a/build/parseSpec.c b/build/parseSpec.c
index 098bd2b..11e0622 100644
--- a/build/parseSpec.c
+++ b/build/parseSpec.c
@@ -592,7 +592,10 @@ int parseSpec(rpmts ts, const char *specFile, const char *rootDir,
}
headerPutString(pkg->header, RPMTAG_OS, os);
- headerPutString(pkg->header, RPMTAG_ARCH, arch);
+ /* noarch subpackages already have arch set here, leave it alone */
+ if (!headerIsEntry(pkg->header, RPMTAG_ARCH)) {
+ headerPutString(pkg->header, RPMTAG_ARCH, arch);
+ }
headerPutString(pkg->header, RPMTAG_PLATFORM, platform);
pkg->ds = rpmdsThis(pkg->header, RPMTAG_REQUIRENAME, RPMSENSE_EQUAL);