diff -up rpm-4.6.0/build/files.c.noarch-elf-check rpm-4.6.0/build/files.c
--- rpm-4.6.0/build/files.c.noarch-elf-check 2009-02-06 09:18:53.000000000 +0200
+++ rpm-4.6.0/build/files.c 2009-02-21 12:53:21.000000000 +0200
@@ -2174,17 +2174,27 @@ int processBinaryFiles(rpmSpec spec, int
check_fileList = newStringBuf();
for (pkg = spec->packages; pkg != NULL; pkg = pkg->next) {
- const char *n, *v, *r;
+ const char *n, *v, *r, *a;
if (pkg->fileList == NULL)
continue;
- (void) headerNVR(pkg->header, &n, &v, &r);
- rpmlog(RPMLOG_NOTICE, _("Processing files: %s-%s-%s\n"), n, v, r);
+ (void) headerNEVRA(pkg->header, &n, NULL, &v, &r, &a);
+ rpmlog(RPMLOG_NOTICE, _("Processing files: %s-%s-%s-%s\n"), n, v, r, a);
if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test)) != RPMRC_OK ||
(rc = rpmfcGenerateDepends(spec, pkg)) != RPMRC_OK)
goto exit;
+
+ if (strcmp(a, "noarch") == 0 && headerGetColor(pkg->header) != 0) {
+ int terminate = rpmExpandNumeric("%{?_binaries_in_noarch_packages_terminate_build}");
+ rpmlog(terminate ? RPMLOG_ERR : RPMLOG_WARNING,
+ _("Arch dependent binaries in noarch package\n"));
+ if (terminate) {
+ rc = RPMRC_FAIL;
+ goto exit;
+ }
+ }
}
/* Now we have in fileList list of files from all packages.
diff -up rpm-4.6.0/macros.in.noarch-elf-check rpm-4.6.0/macros.in
--- rpm-4.6.0/macros.in.noarch-elf-check 2009-02-21 12:41:20.000000000 +0200
+++ rpm-4.6.0/macros.in 2009-02-21 12:41:20.000000000 +0200
@@ -375,6 +375,9 @@ package or when debugging this package.\
# Note: The default value should be 0 for legacy compatibility.
%_missing_doc_files_terminate_build 1
+# Should binaries in noarch packages terminate a build?
+%_binaries_in_noarch_packages_terminate_build 1
+
#
# Should an ELF file processed by find-debuginfo.sh having no build ID
# terminate a build? This is left undefined to disable it and defined to