Skip to contentSkip to conversation

polkit-group-rule: Set S to UNPACKDIR

PATCH New Khem Raj 1 participant 2 messages Sep 11

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/2 polkit-group-rule: Set S to UNPACKDIR

It only install local files from SRC_URI, so nothing is ever unpacked into ${UNPACKDIR}/${BP} and the default S never exists, making do_unpack warn for each of them:

WARNING: polkit-group-rule-datetime-1.0-r0 do_unpack:
polkit-group-rule-datetime: the directory ${UNPACKDIR}/${BP} pointed to by the S variable doesn't exist - please set S within the recipe to point to where the source has been unpacked to

Point S at ${UNPACKDIR} in the shared include, which is what oe-core does for file-only recipes such as init-ifupdown and keymaps. This covers polkit-group-rule-{datetime,network,udisks2} in one place; the do_install tasks already reference ${UNPACKDIR} directly, so packaging is unchanged.

---
 meta-oe/recipes-extended/polkit/polkit-group-rule.inc | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-extended/polkit/polkit-group-rule.inc +2 -0
index e8bbf48c43..0c2531b3e6 100644
@@ -1,5 +1,7 @@
 HOMEPAGE = "https://www.yoctoproject.org/"
 
+S = "${UNPACKDIR}"
+
 # polkit must prepare polkitd group
 DEPENDS += "polkit"
 
author
#1 lore raw

PATCH 2/2 libdata-hexdump-perl: Drop the dangling hexdump alternative

Data-HexDump 0.02 installed a "hexdump" script via EXE_FILES in Makefile.PL, so registering ${bindir}/hexdump with update-alternatives was correct. Upstream 0.02_01 moved that script to eg/ and dropped EXE_FILES:

* Moved hexdump script to eg/, so it won't be installed. Addresses RT#123224 from KENTNL.

so since the 0.02 -> 0.04 upgrade the package installs nothing but Data/HexDump.pm and the alternative refers to a file that is never created:

WARNING: libdata-hexdump-perl-0.04-r0 do_package: libdata-hexdump-perl:
alternative target (/usr/bin/hexdump or /usr/bin/hexdump.libdata-hexdump-perl) does not exist, skipping...
WARNING: libdata-hexdump-perl-0.04-r0 do_package: libdata-hexdump-perl:
NOT adding alternative provide /usr/bin/hexdump:
/usr/bin/hexdump.libdata-hexdump-perl does not exist
WARNING: libdata-hexdump-perl-0.04-r0 do_package: libdata-hexdump-perl:
alt_link == alt_target: /usr/bin/hexdump == /usr/bin/hexdump

Drop the update-alternatives inherit and its settings to match what the recipe actually ships. The eg/hexdump example is deliberately not installed upstream, and util-linux/busybox already provide hexdump. Packaged file lists are unchanged; the package no longer carries the dead update-alternatives postinst/prerm.

---
 .../recipes-perl/libdata/libdata-hexdump-perl_0.04.bb      | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
meta-perl/recipes-perl/libdata/libdata-hexdump-perl_0.04.bb +1 -6
index 7f9b426f3d..82f2396f3b 100644
@@ -22,7 +22,7 @@ SRC_URI[sha256sum] = "bc36f404438ac36ad2b9295539227d36f99cd1623f1e347af77c594c40
 
 S = "${UNPACKDIR}/Data-HexDump-${PV}"
 
-inherit cpan ptest update-alternatives
+inherit cpan ptest
 
 do_install_ptest () {
     install -d ${D}${PTEST_PATH}/t
@@ -32,8 +32,3 @@ do_install_ptest () {
 RDEPENDS:${PN}-ptest += "perl-module-exporter perl-module-carp perl-module-filehandle"
 
 BBCLASSEXTEND = "native"
-
-ALTERNATIVES_PRIORITY = "100"
-ALTERNATIVE:${PN} = "hexdump"
-ALTERNATIVE_LINK_NAME[hexdump] = "${bindir}/hexdump"
-