]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-5.4.10-unpackaged_subdirs_terminate_build.patch
Release: 29
[packages/rpm.git] / rpm-5.4.10-unpackaged_subdirs_terminate_build.patch
CommitLineData
70f8787d
JR
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
4 * /A/B/C/D
5 * Now directories "/A/B" and "/A/B/C" should also be packaged.
6 */
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
13 }
14 unpackaged = _free(unpackaged);
15
16- rpmlog(RPMLOG_WARNING,
17+ rpmlog(_unpackaged_subdirs_terminate_build ? RPMLOG_ERR : RPMLOG_WARNING,
18 _("Unpackaged subdir(s) in %s:\n%s"),
19 N, rpmiobStr(list));
20
21@@ -3119,7 +3119,7 @@ static int pkgUnpackagedSubdirs(Package
22 * @param spec spec file control structure
23 * @return number of unpackaged subdirectories
24 */
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
31 Package pkg;
32
33 for (pkg = spec->packages; pkg; pkg = pkg->next)
34- n += pkgUnpackagedSubdirs(pkg, buildrootL);
35+ n += pkgUnpackagedSubdirs(pkg, buildrootL, _unpackaged_subdirs_terminate_build);
36 return n;
37 }
38
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)
46 res = RPMRC_FAIL;
47 if (checkDuplicateFiles(spec, buildrootL, _duplicate_files_terminate_build) > 0 &&
48 _duplicate_files_terminate_build)
49 res = RPMRC_FAIL;
50- (void) checkUnpackagedSubdirs(spec, buildrootL);
51+ if (checkUnpackagedSubdirs(spec, buildrootL, _unpackaged_subdirs_terminate_build) > 0 &&
52+ _unpackaged_subdirs_terminate_build)
53+ res = RPMRC_FAIL;
54 }
55
56 return res;
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
61
62 %_duplicate_files_terminate_build 1
63-
64+%_unpackaged_subdirs_terminate_build 0
65
66 %_build_pkgcheck_set /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
67 %_build_pkgcheck_srpm /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
This page took 0.034997 seconds and 4 git commands to generate.