[packages/rpm-build-tools] - add support for rpmspec tool for fetching buidlrequires/conflict

adamg adamg at pld-linux.org
Tue May 11 12:22:29 CEST 2021


commit 9439a215500ef79bd92e3c1a8f80932c8c3ee57c
Author: Adam Gołębiowski <adamg at pld-linux.org>
Date:   Tue May 11 10:20:47 2021 +0000

    - add support for rpmspec tool for fetching buidlrequires/conflict

 builder.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/builder.sh b/builder.sh
index 428071e..1f522b0 100755
--- a/builder.sh
+++ b/builder.sh
@@ -151,9 +151,13 @@ REVERT_BROKEN_UPGRADE="yes"
 
 if rpm --specsrpm 2>/dev/null; then
 	FETCH_BUILD_REQUIRES_RPMSPECSRPM="yes"
+	FETCH_BUILD_REQUIRES_RPMSPEC_BINARY="no"
 	FETCH_BUILD_REQUIRES_RPMGETDEPS="no"
-else
+elif [ -x /usr/bin/rpmspec ]; then
 	FETCH_BUILD_REQUIRES_RPMSPECSRPM="no"
+	FETCH_BUILD_REQUIRES_RPMSPEC_BINARY="yes"
+	FETCH_BUILD_REQUIRES_RPMGETDEPS="no"
+else
 	if [ -x /usr/bin/rpm-getdeps ]; then
 		FETCH_BUILD_REQUIRES_RPMGETDEPS="yes"
 	else
@@ -2035,6 +2039,10 @@ install_build_requires_rpmdeps() {
 		CNFL=$(eval rpm-getdeps $BCOND $RPMOPTS $SPECFILE 2> /dev/null | awk '/^\-/ { print $3 } ' | _rpm_cnfl_check | xargs)
 		DEPS=$(eval rpm-getdeps $BCOND $RPMOPTS $SPECFILE 2> /dev/null | awk '/^\+/ { print $3 } ' | _rpm_prov_check | xargs)
 	fi
+	if [ "$FETCH_BUILD_REQUIRES_RPMSPEC_BINARY" = "yes" ]; then
+		CNFL=$(eval rpmspec --query --conflicts     $BCOND $RPMOPTS $SPECFILE 2> /dev/null | awk '{print $1}' | _rpm_cnfl_check | xargs);
+		DEPS=$(eval rpmspec --query --buildrequires $BCOND $RPMOPTS $SPECFILE 2> /dev/null | awk '{print $1}' | _rpm_prov_check | xargs);
+	fi
 	if [ "$FETCH_BUILD_REQUIRES_RPMSPECSRPM" = "yes" ]; then
 		CNFL=$(eval rpm -q --specsrpm --conflicts $BCOND $RPMOPTS $SPECFILE | awk '{print $1}' | _rpm_cnfl_check | xargs)
 		DEPS=$(eval rpm -q --specsrpm --requires $BCOND $RPMOPTS $SPECFILE | awk '{print $1}' | _rpm_prov_check | xargs)
@@ -2058,7 +2066,7 @@ fetch_build_requires()
 	fi
 
 	update_shell_title "fetch build requires"
-	if [ "$FETCH_BUILD_REQUIRES_RPMGETDEPS" = "yes" ] || [ "$FETCH_BUILD_REQUIRES_RPMSPECSRPM" = "yes" ]; then
+	if [ "$FETCH_BUILD_REQUIRES_RPMGETDEPS" = "yes" ] || [ "$FETCH_BUILD_REQUIRES_RPMSPECSRPM" = "yes" ] || [ "$FETCH_BUILD_REQUIRES_RPMSPEC_BINARY" = "yes" ]; then
 		install_build_requires_rpmdeps
 		return
 	fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/61dcea4f6ac3165b39ab50b32e6477e695137d79



More information about the pld-cvs-commit mailing list