Skip to contentSkip to conversation

usbmuxd: Stop using gitpkgv

PATCH New Khem Raj 1 participant 4 messages Oct 28

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 usbmuxd: Stop using gitpkgv

PKGV = "${GITPKGVTAG}" relies on "git describe --tags --exact-match", which never matches here since SRCREV is not a tag, so PKGV fell back to 0.0-<commit count>-g<hash>, below every release. With shallow clones the count is always 1 as well, and gitpkgv warns:

WARNING: usbmuxd: Shallow cloning enabled - gitpkgv.bbclass will not generate sortable versions

Drop gitpkgv and let PKGV default to PV, to which the fetcher appends the PR server AUTOINC and the revision (1.1.2+git0+01c94c77f5). That is sortable with or without shallow clones.

---
 meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta-oe/recipes-connectivity/usbmuxd/usbmuxd_git.bb +1 -2
index 6258bc5134..f45c68949f 100644
@@ -6,9 +6,8 @@ LIC_FILES_CHKSUM = "file://COPYING.GPLv2;md5=ebb5c50ab7cab4baeffba14977030c07 \
 
 DEPENDS = "udev libusb1 libplist libimobiledevice-glue"
 
-inherit autotools pkgconfig gitpkgv systemd useradd
+inherit autotools pkgconfig systemd useradd
 
-PKGV = "${GITPKGVTAG}"
 PV = "1.1.2+git"
 
 SRCREV = "01c94c77f59404924f1c46d99c4e5e0c7817281b"
author
#1 lore raw

PATCH 2/4 libusbmuxd: Stop using gitpkgv

Both recipes set PKGV = "${GITPKGVTAG}". With shallow clones there are no tags or history, so the 2.1.1 recipe, whose SRCREV is exactly the 2.1.1 tag, got PKGV 0.0-1-g<hash>, a downgrade from 2.1.1, and gitpkgv warns:

WARNING: libusbmuxd: Shallow cloning enabled - gitpkgv.bbclass will not generate sortable versions

Drop gitpkgv. PKGV now defaults to PV: 2.1.1 for the release recipe, and 2.0.2+git<AUTOINC>+<hash> for the git recipe.

---
 meta-oe/recipes-extended/libimobiledevice/libusbmuxd_2.1.1.bb | 4 +---
 meta-oe/recipes-extended/libimobiledevice/libusbmuxd_git.bb   | 3 +--
 2 files changed, 2 insertions(+), 5 deletions(-)
meta-oe/recipes-extended/libimobiledevice/libusbmuxd_2.1.1.bb +1 -3
index 7869fc1941..40293e1521 100644
@@ -4,9 +4,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6ab17b41640564434dda85c06b7124f7"
 
 DEPENDS = "udev libusb1 libplist libimobiledevice-glue"
 
-inherit autotools pkgconfig gitpkgv
-
-PKGV = "${GITPKGVTAG}"
+inherit autotools pkgconfig
 
 SRCREV = "adf9c22b9010490e4b55eaeb14731991db1c172c"
 SRC_URI = "git://github.com/libimobiledevice/libusbmuxd;protocol=https;branch=master"
meta-oe/recipes-extended/libimobiledevice/libusbmuxd_git.bb +1 -2
index 76759fe69d..de480dacbf 100644
@@ -4,9 +4,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=6ab17b41640564434dda85c06b7124f7"
 
 DEPENDS = "udev libusb1 libplist libimobiledevice-glue"
 
-inherit autotools pkgconfig gitpkgv
+inherit autotools pkgconfig
 
-PKGV = "${GITPKGVTAG}"
 PV = "2.0.2+git"
 
 SRCREV = "36ffb7ab6e2a7e33bd1b56398a88895b7b8c615a"
author
#2 lore raw

PATCH 3/4 freerdp: Stop using gitpkgv

In reply to Khem Raj

SRCREV is the 2.11.8 tag, so PKGV = "${GITPKGVTAG}" only evaluates to 2.11.8 with a full clone. With shallow clones it becomes 0.0-1-g<hash>, a downgrade, and gitpkgv warns:

WARNING: freerdp: Shallow cloning enabled - gitpkgv.bbclass will not generate sortable versions

Drop gitpkgv and let PKGV default to PV.

---
 meta-oe/recipes-support/freerdp/freerdp_2.11.8.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
meta-oe/recipes-support/freerdp/freerdp_2.11.8.bb +1 -2
index 2cc8dc6cf2..4cb71e0fc1 100644
@@ -8,12 +8,11 @@ SECTION = "net"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-inherit pkgconfig cmake gitpkgv ptest
+inherit pkgconfig cmake ptest
 
 RDEPENDS:${PN}-ptest += "coreutils pcsc-lite-lib"
 
 PE = "1"
-PKGV = "${GITPKGVTAG}"
 
 SRCREV = "9b678b6d5a40ce01607d8c3b1b1416437c8416c4"
 SRC_URI = "git://github.com/FreeRDP/FreeRDP.git;branch=stable-2.0;protocol=https \
author
#3 lore raw

PATCH 4/4 tvheadend: Stop using gitpkgv

In reply to Khem Raj

PKGV = "4.3+git${GITPKGV}" counts the commits up to SRCREV, which is always 1 with shallow clones, so successive SRCREVs only compare by hash and gitpkgv warns:

WARNING: tvheadend: Shallow cloning enabled - gitpkgv.bbclass will not generate sortable versions

Drop gitpkgv and let PKGV default to PV, to which the fetcher appends the PR server AUTOINC and the revision (4.3+git0+cc60283368). The AUTOINC starts below the commit count used so far, so bump PE to keep the upgrade path from existing packages.

---
 meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-multimedia/recipes-dvb/tvheadend/tvheadend_git.bb +5 -2
index 6a7f6c3f5d..4752e30e13 100644
@@ -1,7 +1,7 @@
 SUMMARY = "Tvheadend: TV streaming server and recorder"
 HOMEPAGE = "https://tvheadend.org/"
 
-inherit autotools-brokensep gettext gitpkgv pkgconfig
+inherit autotools-brokensep gettext pkgconfig
 
 DEPENDS = "avahi cmake-native dvb-apps libdvbcsa libpcre2 openssl uriparser zlib"
 
@@ -14,7 +14,10 @@ SRC_URI = "git://github.com/tvheadend/tvheadend.git;branch=master;protocol=https
 
 SRCREV = "cc602833684953fc3e6f1c89d4f08f6dfef179e3"
 PV = "4.3+git"
-PKGV = "4.3+git${GITPKGV}"
+# PKGV used to be 4.3+git<commit count>+<hash> from gitpkgv; the PR
+# server AUTOINC that replaces the count starts lower, so bump PE to keep
+# the upgrade path.
+PE = "1"
 
 
 EXTRA_OECONF += "--arch=${TARGET_ARCH} \