Revert fix for rhbz#442105, it has unwanted side effects
authorJindrich Novy <jnovy@redhat.com>
Wed, 18 Feb 2009 07:11:18 +0000 (08:11 +0100)
committerJindrich Novy <jnovy@redhat.com>
Wed, 18 Feb 2009 07:11:18 +0000 (08:11 +0100)
- mainly RPMTAG_BUILDARCHS missing from SRPM in case of BuildArch: noarch

build/parsePreamble.c

index c34f80d..9b8de0e 100644 (file)
@@ -859,14 +859,8 @@ int parsePreamble(rpmSpec spec, int initialPackage)
                    goto exit;
                }
                if (spec->BANames && !spec->recursing) {
-                   /* Ignore BuildArch tags for anyarch actions */
-                   if (spec->anyarch) {
-                       spec->BANames = _free(spec->BANames);
-                       spec->BACount = 0;
-                   } else {
-                       res = PART_BUILDARCHITECTURES;
-                       goto exit;
-                   }
+                   res = PART_BUILDARCHITECTURES;
+                   goto exit;
                }
            }
            if ((rc =
@@ -901,8 +895,8 @@ int parsePreamble(rpmSpec spec, int initialPackage)
        addMacro(spec->macros, "buildroot", NULL, spec->buildRoot, RMIL_SPEC);
     }
 
-    /* This check is harmless as BuildArch tags are ignored in case of anyarch != 0 */
-    if (checkForValidArchitectures(spec)) {
+    /* XXX Skip valid arch check if not building binary package */
+    if (!spec->anyarch && checkForValidArchitectures(spec)) {
        goto exit;
     }