diff mbox series

[linux-snap,Xenial,Bionic,1/1] Fix version matching for signed re-uploads

Message ID 20200207153228.21779-2-kleber.souza@canonical.com
State New
Headers show
Series Fix snap build failure | expand

Commit Message

Kleber Sacilotto de Souza Feb. 7, 2020, 3:32 p.m. UTC
When a signed package needs to be re-uploaded keeping the same ABI
number, a '+signedN' suffix is added to its version number. This is
causing problems for the snap build which detects a mismatch with the
version requested by the snapcraft.yaml file. Fix it by considering
any '+*' suffix as valid suffix when performing the match with the
installed linux image package.

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
---
 Makefile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 0b1de06..cb94949 100644
--- a/Makefile
+++ b/Makefile
@@ -194,8 +194,9 @@  versioncheck:
 	KIMGVER="$$(dpkg --root=chroot -l | awk '/$(KIMGDEB)/ {print $$3}')"; \
 	echo $$KIMGVER; \
 	[ ! $$KIMGVER ] && echo "Unable to extract KIMGVER, exit" && exit 1; \
-	if [ $$KIMGVER != $(SNAPCRAFT_PROJECT_VERSION) ]; then \
-	  echo "Version mismatch:\nInstalled: $$KIMGVER Requested: $(SNAPCRAFT_PROJECT_VERSION)"; \
-	  exit 1; \
-	fi; \
+	case "$$KIMGVER" in \
+	$(SNAPCRAFT_PROJECT_VERSION)|$(SNAPCRAFT_PROJECT_VERSION)+*) ;; \
+	*)  echo "Version mismatch:\nInstalled: $$KIMGVER Requested: $(SNAPCRAFT_PROJECT_VERSION)"; \
+	    exit 1; \
+	esac; \
 	}