[packages/rpm/rpm.org] - replace 'cheating' bcond and patch with a macro to control this behavior

baggins baggins at pld-linux.org
Sat Oct 31 19:01:42 CET 2020


commit d727501f329f103ba067bdad163231197cafeb80
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Oct 31 19:01:03 2020 +0100

    - replace 'cheating' bcond and patch with a macro to control this behavior

 rpm-enable_cheating.patch | 14 --------------
 rpm.spec                  |  7 ++-----
 shortcircuited-deps.patch | 11 +++++++++++
 3 files changed, 13 insertions(+), 19 deletions(-)
---
diff --git a/rpm.spec b/rpm.spec
index 808ffeb..ae38728 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -8,7 +8,6 @@
 %bcond_without	plugins		# build plugins
 %bcond_without	recommends_tags	# build without Recommends tag (bootstrapping)
 %bcond_with	imaevm		# build with IMA/EVM support (requires libimaevm from ima-evm-utils)
-%bcond_with	cheating	# do not add spurious deps to short-circuited builds
 
 %define		db_ver		5.3.28.0
 %define		popt_ver	1.15
@@ -27,7 +26,7 @@ Summary(ru.UTF-8):	Менеджер пакетов от RPM
 Summary(uk.UTF-8):	Менеджер пакетів від RPM
 Name:		rpm
 Version:	4.16.0
-Release:	0.4
+Release:	0.5
 Epoch:		1
 License:	GPL v2 / LGPL v2.1
 Group:		Base
@@ -75,7 +74,7 @@ Patch19:	pkgconfig.patch
 Patch20:	uname-deps.patch
 Patch21:	aarch64.patch
 Patch22:	ix86-platforms.patch
-Patch23:	%{name}-enable_cheating.patch
+Patch23:	shortcircuited-deps.patch
 URL:		https://rpm.org/
 BuildRequires:	acl-devel
 BuildRequires:	db-devel >= %{db_ver}
@@ -564,9 +563,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch20 -p1
 %patch21 -p1
 %patch22 -p1
-%if %{with cheating}
 %patch23 -p1
-%endif
 
 install %{SOURCE15} scripts/perl.prov.in
 
diff --git a/rpm-enable_cheating.patch b/rpm-enable_cheating.patch
deleted file mode 100644
index bd032ed..0000000
--- a/rpm-enable_cheating.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --color -urN rpm-4.16.0.orig/build/pack.c rpm-4.16.0/build/pack.c
---- rpm-4.16.0.orig/build/pack.c	2020-06-23 14:13:01.894628368 +0200
-+++ rpm-4.16.0/build/pack.c	2020-10-30 21:38:40.630227852 +0100
-@@ -709,10 +709,6 @@
- 	headerPutBin(pkg->header, RPMTAG_SOURCEPKGID, spec->sourcePkgId,16);
-     }
- 
--    if (cheating) {
--	(void) rpmlibNeedsFeature(pkg, "ShortCircuited", "4.9.0-1");
--    }
--
-     if ((rc = getPkgFilename(pkg->header, filename)))
- 	return rc;
- 
diff --git a/shortcircuited-deps.patch b/shortcircuited-deps.patch
new file mode 100644
index 0000000..2fc2cc4
--- /dev/null
+++ b/shortcircuited-deps.patch
@@ -0,0 +1,11 @@
+--- rpm-4.16.0/build/build.c~	2020-05-28 12:04:24.000000000 +0200
++++ rpm-4.16.0/build/build.c	2020-10-31 18:57:03.678941782 +0100
+@@ -401,7 +401,7 @@
+ 		goto exit;
+ 
+ 	if (((what & RPMBUILD_PACKAGEBINARY) && !test) &&
+-	    (rc = packageBinaries(spec, cookie, (didBuild == 0))))
++	    (rc = packageBinaries(spec, cookie, ((didBuild == 0) && !rpmExpandNumeric("%{?disable_short_circuited_deps}")))))
+ 		goto exit;
+ 	
+ 	if ((what & RPMBUILD_CLEAN) &&
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/d727501f329f103ba067bdad163231197cafeb80



More information about the pld-cvs-commit mailing list