mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-23 10:23:04 +00:00
67 lines
2.8 KiB
Diff
67 lines
2.8 KiB
Diff
--- rpm-5.4.10/build/files.c.subdir_terminate~ 2012-07-10 20:14:36.357058212 +0200
|
|
+++ rpm-5.4.10/build/files.c 2012-07-10 20:14:36.367058087 +0200
|
|
@@ -3025,7 +3025,7 @@ static inline int packagedDir(Package pk
|
|
* /A/B/C/D
|
|
* Now directories "/A/B" and "/A/B/C" should also be packaged.
|
|
*/
|
|
-static int pkgUnpackagedSubdirs(Package pkg, size_t buildrootL)
|
|
+static int pkgUnpackagedSubdirs(Package pkg, size_t buildrootL, int _unpackaged_subdirs_terminate_build)
|
|
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
|
|
/*@modifies pkg->header,
|
|
rpmGlobalMacroContext, fileSystem, internalState @*/
|
|
@@ -3103,7 +3103,7 @@ static int pkgUnpackagedSubdirs(Package
|
|
}
|
|
unpackaged = _free(unpackaged);
|
|
|
|
- rpmlog(RPMLOG_WARNING,
|
|
+ rpmlog(_unpackaged_subdirs_terminate_build ? RPMLOG_ERR : RPMLOG_WARNING,
|
|
_("Unpackaged subdir(s) in %s:\n%s"),
|
|
N, rpmiobStr(list));
|
|
|
|
@@ -3119,7 +3119,7 @@ static int pkgUnpackagedSubdirs(Package
|
|
* @param spec spec file control structure
|
|
* @return number of unpackaged subdirectories
|
|
*/
|
|
-static int checkUnpackagedSubdirs(Spec spec, size_t buildrootL)
|
|
+static int checkUnpackagedSubdirs(Spec spec, size_t buildrootL, int _unpackaged_subdirs_terminate_build)
|
|
/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
|
|
/*@modifies *spec->packages,
|
|
rpmGlobalMacroContext, fileSystem, internalState @*/
|
|
@@ -3128,7 +3128,7 @@ static int checkUnpackagedSubdirs(Spec s
|
|
Package pkg;
|
|
|
|
for (pkg = spec->packages; pkg; pkg = pkg->next)
|
|
- n += pkgUnpackagedSubdirs(pkg, buildrootL);
|
|
+ n += pkgUnpackagedSubdirs(pkg, buildrootL, _unpackaged_subdirs_terminate_build);
|
|
return n;
|
|
}
|
|
|
|
@@ -3185,12 +3185,16 @@ rpmRC processBinaryFiles(Spec spec, int
|
|
if (res == RPMRC_OK) {
|
|
int _duplicate_files_terminate_build =
|
|
rpmExpandNumeric("%{?_duplicate_files_terminate_build}");
|
|
+ int _unpackaged_subdirs_terminate_build =
|
|
+ rpmExpandNumeric("%{?_unpackaged_subdirs_terminate_build}");
|
|
if (checkUnpackagedFiles(spec) > 0)
|
|
res = RPMRC_FAIL;
|
|
if (checkDuplicateFiles(spec, buildrootL, _duplicate_files_terminate_build) > 0 &&
|
|
_duplicate_files_terminate_build)
|
|
res = RPMRC_FAIL;
|
|
- (void) checkUnpackagedSubdirs(spec, buildrootL);
|
|
+ if (checkUnpackagedSubdirs(spec, buildrootL, _unpackaged_subdirs_terminate_build) > 0 &&
|
|
+ _unpackaged_subdirs_terminate_build)
|
|
+ res = RPMRC_FAIL;
|
|
}
|
|
|
|
return res;
|
|
--- rpm-5.4.10/macros/mandriva.in.subdir_terminate~ 2012-07-10 20:14:36.000000000 +0200
|
|
+++ rpm-5.4.10/macros/mandriva.in 2012-07-10 20:14:57.333795967 +0200
|
|
@@ -127,7 +127,7 @@ end\
|
|
%_binary_payload w5.xzdio
|
|
|
|
%_duplicate_files_terminate_build 1
|
|
-
|
|
+%_unpackaged_subdirs_terminate_build 0
|
|
|
|
%_build_pkgcheck_set /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
|
|
%_build_pkgcheck_srpm /usr/bin/rpmlint -T -f %{_sourcedir}/%{name}.rpmlintrc
|