mirror of
https://abf.rosa.ru/djam/rpm.git
synced 2025-02-23 18:33:04 +00:00
Experimental patch to improve error handling
This commit is contained in:
parent
86c83fe9e9
commit
7310aa8353
2 changed files with 77 additions and 1 deletions
73
rpm-5.4.10-postpone_subpackage_build_failures.patch
Normal file
73
rpm-5.4.10-postpone_subpackage_build_failures.patch
Normal file
|
@ -0,0 +1,73 @@
|
|||
--- ./build/files.c.subpackage_failures~ 2013-05-22 18:56:03.629212893 +0400
|
||||
+++ ./build/files.c 2013-05-22 19:07:50.697775045 +0400
|
||||
@@ -2513,8 +2513,8 @@
|
||||
|
||||
files = argvFree(files);
|
||||
|
||||
- if (fl.processingFailed)
|
||||
- goto exit;
|
||||
+/* if (fl.processingFailed)
|
||||
+ goto exit;*/
|
||||
|
||||
/* Verify that file attributes scope over hardlinks correctly. */
|
||||
if (checkHardLinks(&fl))
|
||||
@@ -3147,6 +3147,7 @@
|
||||
HE_t he = (HE_t) memset(alloca(sizeof(*he)), 0, sizeof(*he));
|
||||
Package pkg;
|
||||
rpmRC res = RPMRC_OK;
|
||||
+ short failed_once = 0;
|
||||
|
||||
char *buildroot = rpmExpand("%{?buildroot}", NULL);
|
||||
size_t buildrootL = strlen(buildroot);
|
||||
@@ -3167,22 +3168,23 @@
|
||||
he->p.ptr = _free(he->p.ptr);
|
||||
|
||||
if ((rc = processPackageFiles(spec, pkg, installSpecialDoc, test))) {
|
||||
- res = RPMRC_FAIL;
|
||||
- (void) headerMacrosUnload(pkg->header);
|
||||
- break;
|
||||
+ failed_once = 1;
|
||||
}
|
||||
|
||||
/* Finalize package scriptlets before extracting dependencies. */
|
||||
if ((rc = processScriptFiles(spec, pkg))) {
|
||||
res = rc;
|
||||
(void) headerMacrosUnload(pkg->header);
|
||||
- break;
|
||||
+ if (res == RPMRC_FAIL) {
|
||||
+ failed_once = 1;
|
||||
+ }
|
||||
+ else {
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
|
||||
if ((rc = rpmfcGenerateDepends(spec, pkg))) {
|
||||
- res = RPMRC_FAIL;
|
||||
- (void) headerMacrosUnload(pkg->header);
|
||||
- break;
|
||||
+ failed_once = 1;
|
||||
}
|
||||
|
||||
/* XXX this should be earlier for deps to be entirely sorted. */
|
||||
@@ -3191,7 +3193,10 @@
|
||||
(void) headerMacrosUnload(pkg->header);
|
||||
}
|
||||
|
||||
- if (res == RPMRC_OK) {
|
||||
+ if (failed_once == 1)
|
||||
+ res = RPMRC_FAIL;
|
||||
+
|
||||
+/* if (res == RPMRC_OK) {*/
|
||||
int _duplicate_files_terminate_build =
|
||||
rpmExpandNumeric("%{?_duplicate_files_terminate_build}");
|
||||
int _unpackaged_subdirs_terminate_build =
|
||||
@@ -3204,7 +3209,7 @@
|
||||
if (checkUnpackagedSubdirs(spec, buildrootL, _unpackaged_subdirs_terminate_build) > 0 &&
|
||||
_unpackaged_subdirs_terminate_build)
|
||||
res = RPMRC_FAIL;
|
||||
- }
|
||||
+/* }*/
|
||||
|
||||
return res;
|
||||
}
|
5
rpm.spec
5
rpm.spec
|
@ -59,7 +59,7 @@ Summary: The RPM package management system
|
|||
Name: rpm
|
||||
Epoch: 1
|
||||
Version: %{libver}.%{minorver}
|
||||
Release: %{?prereldate:0.%{prereldate}.}10
|
||||
Release: %{?prereldate:0.%{prereldate}.}11
|
||||
License: LGPLv2.1+
|
||||
Group: System/Configuration/Packaging
|
||||
URL: http://rpm5.org/
|
||||
|
@ -368,6 +368,8 @@ Patch502: rpm-5.4.9-package-name.patch
|
|||
# for specspo
|
||||
Patch503: rpm-5.4.9-specspo.patch
|
||||
|
||||
Patch504: rpm-5.4.10-postpone_subpackage_build_failures.patch
|
||||
|
||||
BuildRequires: autoconf >= 2.57
|
||||
BuildRequires: bzip2-devel
|
||||
BuildRequires: automake >= 1.8
|
||||
|
@ -735,6 +737,7 @@ This package contains the RPM API documentation generated in HTML format.
|
|||
%patch501 -p1 -b .rosa_vendor~
|
||||
%patch502 -p1 -b .package_name~
|
||||
%patch503 -p1 -b .specspo~
|
||||
%patch504 -p1 -b .postpone_errors~
|
||||
|
||||
#required by P55, P80, P81, P94..
|
||||
./autogen.sh
|
||||
|
|
Loading…
Add table
Reference in a new issue