Change in libosmocore[master]: Skip RPM checks if no *.spec.in available

laforge gerrit-no-reply at lists.osmocom.org
Fri Mar 26 18:44:33 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/23505 )

Change subject: Skip RPM checks if no *.spec.in available
......................................................................

Skip RPM checks if no *.spec.in available

Some projects don't necessarily have RPM packaging yet. Hence, avoid
running into unexpected check results in that case.

Related: OS#5094
Change-Id: Id306256af1ab3bf081b7df5a6c271628e3b8715c
---
M osmo-release.sh
1 file changed, 12 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/osmo-release.sh b/osmo-release.sh
index c0b0b4a..aecbfd1 100755
--- a/osmo-release.sh
+++ b/osmo-release.sh
@@ -73,6 +73,12 @@
 # Make sure that depedency requirement versions match in configure.ac vs contrib/*.spec.in.
 #eg: "PKG_CHECK_MODULES(LIBOSMOCORE, libosmocore >= 1.1.0)" vs "pkgconfig(libosmocore-dev) >= 1.0.0,"
 check_configureac_rpmspecin_deps_match() {
+	# Some projects don't have rpm spec files:
+	if [ "z$(find "${GIT_TOPDIR}/contrib" -name "*.spec.in" | wc -l)" = "z0" ]; then
+		echo "INFO: Project has no 'contrib/*.spec.in' files, skipping RPM specific configure.ac dependency version checks"
+		return
+	fi
+
 	get_configureac_pkg_check_modules_list | \
 	{ return_error=0
 	while read -r dep ver; do
@@ -169,6 +175,12 @@
 }
 
 libversion_rpmspecin_match() {
+	# Some projects don't have rpm spec files:
+	if [ "z$(find "${GIT_TOPDIR}/contrib" -name "*.spec.in" | wc -l)" = "z0" ]; then
+		echo "INFO: Project has no 'contrib/*.spec.in' files, skipping RPM specific LIBVERSION checks"
+		return
+	fi
+
 	echo "$LIBVERS" | while read -r line; do
 		libversion=$(echo "$line" | cut -d "=" -f 2 | tr -d "[:space:]")
 		major="$(libversion_to_lib_major "$libversion")"

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/23505
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Id306256af1ab3bf081b7df5a6c271628e3b8715c
Gerrit-Change-Number: 23505
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210326/bb256e15/attachment.htm>


More information about the gerrit-log mailing list