Skip to contentSkip to conversation

shared-mime-info: embed PV in the filename

PATCH New Richard Purdie 1 participant 2 messages Nov 22, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 shared-mime-info: embed PV in the filename

From: Ross Burton <[email protected]>

As this recipe tracks the release tags we can embed the PV in the filename.

---
 .../{shared-mime-info_git.bb => shared-mime-info_2.4.bb}        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-support/shared-mime-info/{shared-mime-info_git.bb => shared-mime-info_2.4.bb} (98%)
meta/recipes-support/shared-mime-info/shared-mime-info_2.4.bb renamed from meta/recipes-support/shared-mime-info/shared-mime-info_git.bb +1 -1
similarity index 98%
rename from meta/recipes-support/shared-mime-info/shared-mime-info_git.bb
rename to meta/recipes-support/shared-mime-info/shared-mime-info_2.4.bb
index 937428221ef..5ba40236096 100644
@@ -10,7 +10,7 @@ DEPENDS = "libxml2 itstool-native glib-2.0 shared-mime-info-native xmlto-native"
 
 SRC_URI = "git://gitlab.freedesktop.org/xdg/shared-mime-info.git;protocol=https;branch=master"
 SRCREV = "9a6d6b8e963935f145f3a1ef446552de6996dada"
-PV = "2.4"
+
 S = "${WORKDIR}/git"
 
 inherit meson pkgconfig gettext python3native mime
Signature · 1 line
2.39.2
#1 lore raw

PATCH 2/2 package_ipk: Fix Source: field variable dependency

The Source: variable is generated from FILE but this is excluded from checksums normally which results in a reproduciubility issue when the filename changes.

Add in a dependency by reworking the code a little to avoid this.

---
 meta/classes-global/package_ipk.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes-global/package_ipk.bbclass +5 -1
index 1ca1308967c..71ffdd522ac 100644
@@ -47,6 +47,10 @@ python do_package_ipk () {
 do_package_ipk[vardeps] += "ipk_write_pkg"
 do_package_ipk[vardepsexclude] = "BB_NUMBER_THREADS"
 
+# FILE isn't included by default but we want the recipe to change if basename() changes
+IPK_RECIPE_FILE = "${@os.path.basename(d.getVar('FILE'))}"
+IPK_RECIPE_FILE[vardepvalue] = "${IPK_RECIPE_FILE}"
+
 def ipk_write_pkg(pkg, d):
     import re, copy
     import subprocess
@@ -62,7 +66,7 @@ def ipk_write_pkg(pkg, d):
 
     outdir = d.getVar('PKGWRITEDIRIPK')
     pkgdest = d.getVar('PKGDEST')
-    recipesource = os.path.basename(d.getVar('FILE'))
+    recipesource = d.getVar('IPK_RECIPE_FILE')
 
     localdata = bb.data.createCopy(d)
     root = "%s/%s" % (pkgdest, pkg)
Signature · 1 line
2.39.2