]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
apt: fix upstream version check
authorAlexander Kanavin <alex.kanavin@gmail.com>
Tue, 24 May 2022 17:36:22 +0000 (19:36 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 27 May 2022 22:47:20 +0000 (23:47 +0100)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/apt/apt_2.4.5.bb

index 95c25e30361be49409793ebe814f88c56ba31858..1d94dd118c3d5fd5d2108123c0a5bebf068dfeb5 100644 (file)
@@ -31,8 +31,14 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 # the package is taken from snapshots.debian.org; that source is static and goes stale
 # so we check the latest upstream from a directory that does get updated
 UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/"
-
-inherit cmake perlnative bash-completion upstream-version-is-even useradd
+# apt seems to follow a peculiar version policy, where every *other* even version
+# is considered stable, e.g. 1.0, 1.4, 1.8, 2.2, 2.6, etc. As there is no way
+# to express 'divisible by 4 plus 2' in regex (that I know of), let's hardcode a few.
+UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>((2\.2)|(2\.6)|(3\.0)|(3\.4)|(3\.8)|(4\.2))(\.\d+)+)\.tar"
+# needs be marked as unknown until 2.6 is out
+UPSTREAM_VERSION_UNKNOWN = "1"
+
+inherit cmake perlnative bash-completion useradd
 
 # User is added to allow apt to drop privs, will runtime warn without
 USERADD_PACKAGES = "${PN}"