[packages/rpm-build-tools] builder: unbreak rpm5 detection

atler atler at pld-linux.org
Sun Nov 22 11:52:12 CET 2020


commit 30e78ca0b942bf5e64e1418d9f2f29129854bafd
Author: Jan Palus <atler at pld-linux.org>
Date:   Sun Nov 22 11:50:43 2020 +0100

    builder: unbreak rpm5 detection

 builder.sh | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/builder.sh b/builder.sh
index ed2184b..b657e0d 100755
--- a/builder.sh
+++ b/builder.sh
@@ -480,7 +480,7 @@ is_rpmorg() {
 
 	v=$(rpm --version 2>&1)
 	v=${v#RPM version } # rpm 4
-	v=${v#rpm (RPM) } # rpm 5
+	v=${v#rpm \(RPM\) } # rpm 5
 
 	case "$v" in
 		4.5|5.*)
@@ -489,6 +489,9 @@ is_rpmorg() {
 		4.*)
 			return 0;
 			;;
+		*)
+			echo "ERROR: unsupported RPM version $v" >&2
+			exit 1
 	esac
 }
 
================================================================

---- gitweb:

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



More information about the pld-cvs-commit mailing list