1 --- rpm-5.4.10/build/files.c.subdir_terminate~ 2012-07-10 20:14:36.357058212 +0200
2 +++ rpm-5.4.10/build/files.c 2012-07-10 20:14:36.367058087 +0200
3 @@ -3025,7 +3025,7 @@ static inline int packagedDir(Package pk
5 * Now directories "/A/B" and "/A/B/C" should also be packaged.
7 -static int pkgUnpackagedSubdirs(Package pkg, size_t buildrootL)
8 +static int pkgUnpackagedSubdirs(Package pkg, size_t buildrootL, int _unpackaged_subdirs_terminate_build)
9 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
10 /*@modifies pkg->header,
11 rpmGlobalMacroContext, fileSystem, internalState @*/
12 @@ -3103,7 +3103,7 @@ static int pkgUnpackagedSubdirs(Package
14 unpackaged = _free(unpackaged);
16 - rpmlog(RPMLOG_WARNING,
17 + rpmlog(_unpackaged_subdirs_terminate_build ? RPMLOG_ERR : RPMLOG_WARNING,
18 _("Unpackaged subdir(s) in %s:\n%s"),
21 @@ -3119,7 +3119,7 @@ static int pkgUnpackagedSubdirs(Package
22 * @param spec spec file control structure
23 * @return number of unpackaged subdirectories
25 -static int checkUnpackagedSubdirs(Spec spec, size_t buildrootL)
26 +static int checkUnpackagedSubdirs(Spec spec, size_t buildrootL, int _unpackaged_subdirs_terminate_build)
27 /*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
28 /*@modifies *spec->packages,
29 rpmGlobalMacroContext, fileSystem, internalState @*/
30 @@ -3128,7 +3128,7 @@ static int checkUnpackagedSubdirs(Spec s
33 for (pkg = spec->packages; pkg; pkg = pkg->next)
34 - n += pkgUnpackagedSubdirs(pkg, buildrootL);
35 + n += pkgUnpackagedSubdirs(pkg, buildrootL, _unpackaged_subdirs_terminate_build);
39 @@ -3185,12 +3185,16 @@ rpmRC processBinaryFiles(Spec spec, int
40 if (res == RPMRC_OK) {
41 int _duplicate_files_terminate_build =
42 rpmExpandNumeric("%{?_duplicate_files_terminate_build}");
43 + int _unpackaged_subdirs_terminate_build =
44 + rpmExpandNumeric("%{?_unpackaged_subdirs_terminate_build}");
45 if (checkUnpackagedFiles(spec) > 0)
47 if (checkDuplicateFiles(spec, buildrootL, _duplicate_files_terminate_build) > 0 &&
48 _duplicate_files_terminate_build)
50 - (void) checkUnpackagedSubdirs(spec, buildrootL);
51 + if (checkUnpackagedSubdirs(spec, buildrootL, _unpackaged_subdirs_terminate_build) > 0 &&
52 + _unpackaged_subdirs_terminate_build)
57 --- rpm-5.4.10/macros/mandriva.in.subdir_terminate~ 2012-07-10 20:14:36.000000000 +0200
58 +++ rpm-5.4.10/macros/mandriva.in 2012-07-10 20:14:57.333795967 +0200
59 @@ -127,7 +127,7 @@ end\
60 %_binary_payload w5.xzdio
62 %_duplicate_files_terminate_build 1
64 +%_unpackaged_subdirs_terminate_build 0
66 %_build_pkgcheck_set /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
67 %_build_pkgcheck_srpm /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc