Skip to contentSkip to conversation

dpkg: drop suffix from version number

PATCH New Yi Zhao 1 participant 1 message Apr 18, 2025

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH 1/1 dpkg: drop suffix from version number

The current dpkg runtime version is generated by 'git describe' command in build-aux/get-version. But since we have made changes to git repo locally, it adds a -dirty suffix to the version number.

Add a .dist-version file in the source directory. Then get-version can determine the version through .dist-version instead of "git describe" command, thus removing the -dirty suffix.

Before the fix:

$ dpkg --version
Debian 'dpkg' package management program version 1.22.11-dirty (amd64).

After the fix:

$ dpkg --version
Debian 'dpkg' package management program version 1.22.11 (amd64).
---
 meta/recipes-devtools/dpkg/dpkg.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/dpkg/dpkg.inc +2 -0
index 4c1d42e0af..45b67bf168 100644
@@ -43,6 +43,8 @@ do_configure:prepend () {
         # update dselect/po and scripts/po
         cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/dselect/po/
         cp -f ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/scripts/po/
+
+        [ ! -e ${S}/.dist-version ] && echo ${PV} > ${S}/.dist-version
 }
 
 do_install:append () {
Signature · 1 line
2.34.1