Skip to contentSkip to conversation

nativesdk-postinst-intercept: remove the recipe

PATCH In review Alexander Kanavin 2 participants 9 messages Apr 3, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 nativesdk-postinst-intercept: remove the recipe

Its use required a script from an external repo which hasn't been updated in 4 years, the recipe itself is out of date (doesn't install all intercepts), and there is no oe-selftest or documentation for this. If anyone still wants this, please do it in a separate layer.

---
 meta/conf/distro/include/distro_alias.inc              |  1 -
 meta/conf/distro/include/maintainers.inc               |  1 -
 .../packagegroups/nativesdk-packagegroup-sdk-host.bb   |  1 -
 .../nativesdk-postinst-intercept_1.0.bb                | 18 ------------------
 4 files changed, 21 deletions(-)
 delete mode 100644 meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb
meta/conf/distro/include/distro_alias.inc +0 -1
index 8ec623befbd..13c7e652bc7 100644
@@ -313,7 +313,6 @@ DISTRO_PN_ALIAS_pn-pkgconfig = "Ubuntu=pkg-config Fedora=pkgconfig"
 DISTRO_PN_ALIAS_pn-pointercal-xinput = "OE-Core"
 DISTRO_PN_ALIAS_pn-pong-clock = "OpenedHand"
 DISTRO_PN_ALIAS_pn-portmap = "Debian=rpcbind Fedora=rpcbind"
-DISTRO_PN_ALIAS_pn-postinst-intercept = "OE-Core"
 DISTRO_PN_ALIAS_pn-powertop = "Meego=powertop Fedora=powertop Debian=powertop OpenSuSE=powertop Mandriva=powertop"
 DISTRO_PN_ALIAS_pn-ppp-dialin = "OE-Core"
 DISTRO_PN_ALIAS_pn-presentproto = "Debian=x11proto-present-dev Fedora=xorg-x11-proto-devel"
meta/conf/distro/include/maintainers.inc +0 -1
index e471891f2ce..48aff9537e4 100644
@@ -527,7 +527,6 @@ RECIPE_MAINTAINER_pn-nativesdk-buildtools-perl-dummy = "Richard Purdie <richard.
 RECIPE_MAINTAINER_pn-nativesdk-libtool = "Richard Purdie <[email protected]>"
 RECIPE_MAINTAINER_pn-nativesdk-packagegroup-sdk-host = "Ross Burton <[email protected]>"
 RECIPE_MAINTAINER_pn-nativesdk-qemu-helper = "Juro Bystricky <[email protected]>"
-RECIPE_MAINTAINER_pn-nativesdk-postinst-intercept = "Alexander Kanavin <[email protected]>"
 RECIPE_MAINTAINER_pn-ncurses = "Hongxu Jia <[email protected]>"
 RECIPE_MAINTAINER_pn-neard = "Maxin B. John <[email protected]>"
 RECIPE_MAINTAINER_pn-neon = "Maxin B. John <[email protected]>"
meta/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bb +0 -1
index 88e7c648b64..e2f61699946 100644
@@ -23,7 +23,6 @@ RDEPENDS_${PN} = "\
     nativesdk-makedevs \
     nativesdk-dnf \
     nativesdk-cmake \
-    nativesdk-postinst-intercept \
     ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'nativesdk-wayland', '', d)} \
     nativesdk-sdk-provides-dummy \
     "
meta/recipes-devtools/postinst-intercept/nativesdk-postinst-intercept_1.0.bb deleted +0 -18
deleted file mode 100644
index 938ac8ad7b3..00000000000
@@ -1,18 +0,0 @@
-SUMMARY = "Postinstall scriptlets"
-LICENSE = "MIT"
-
-FILES_${PN}_append = " ${datadir}/postinst-intercepts/*"
-
-do_configure[noexec] = "1"
-do_compile[noexec] = "1"
-
-do_install() {
-	install -d ${D}${datadir}/postinst-intercepts
-	install -m 755 ${COREBASE}/scripts/postinst-intercepts/postinst_intercept ${D}${datadir}/postinst-intercepts/
-	install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_font_cache ${D}${datadir}/postinst-intercepts/
-	install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_icon_cache ${D}${datadir}/postinst-intercepts/
-	install -m 755 ${COREBASE}/scripts/postinst-intercepts/update_pixbuf_cache ${D}${datadir}/postinst-intercepts/
-}
-
-inherit nativesdk
-INHIBIT_DEFAULT_DEPS = "1"
Signature · 1 line
2.16.1
#1 lore raw

PATCH 2/8 package_manager.py: move target_rootfs property to common ancestor class

This will be useful when also moving postinst_intercept handling to package manager class from rootfs class.

---
 meta/lib/oe/package_manager.py | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
meta/lib/oe/package_manager.py +7 -9
index e006dc6215d..e0a114c3325 100644
@@ -326,8 +326,9 @@ class PackageManager(object, metaclass=ABCMeta):
     This is an abstract class. Do not instantiate this directly.
     """
 
-    def __init__(self, d):
+    def __init__(self, d, target_rootfs):
         self.d = d
+        self.target_rootfs = target_rootfs
         self.deploy_dir = None
         self.deploy_lock = None
 
@@ -585,8 +586,7 @@ class RpmPM(PackageManager):
                  os_var=None,
                  rpm_repo_workdir="oe-rootfs-repo",
                  filterbydependencies=True):
-        super(RpmPM, self).__init__(d)
-        self.target_rootfs = target_rootfs
+        super(RpmPM, self).__init__(d, target_rootfs)
         self.target_vendor = target_vendor
         self.task_name = task_name
         if arch_var == None:
@@ -919,11 +919,11 @@ class RpmPM(PackageManager):
 
 
 class OpkgDpkgPM(PackageManager):
-    def __init__(self, d):
+    def __init__(self, d, target_rootfs):
         """
         This is an abstract class. Do not instantiate this directly.
         """
-        super(OpkgDpkgPM, self).__init__(d)
+        super(OpkgDpkgPM, self).__init__(d, target_rootfs)
 
     def package_info(self, pkg, cmd):
         """
@@ -988,9 +988,8 @@ class OpkgDpkgPM(PackageManager):
 
 class OpkgPM(OpkgDpkgPM):
     def __init__(self, d, target_rootfs, config_file, archs, task_name='target'):
-        super(OpkgPM, self).__init__(d)
+        super(OpkgPM, self).__init__(d, target_rootfs)
 
-        self.target_rootfs = target_rootfs
         self.config_file = config_file
         self.pkg_archs = archs
         self.task_name = task_name
@@ -1367,8 +1366,7 @@ class OpkgPM(OpkgDpkgPM):
 
 class DpkgPM(OpkgDpkgPM):
     def __init__(self, d, target_rootfs, archs, base_archs, apt_conf_dir=None):
-        super(DpkgPM, self).__init__(d)
-        self.target_rootfs = target_rootfs
+        super(DpkgPM, self).__init__(d, target_rootfs)
         self.deploy_dir = self.d.getVar('DEPLOY_DIR_DEB')
         if apt_conf_dir is None:
             self.apt_conf_dir = self.d.expand("${APTCONF_TARGET}/apt")
Signature · 1 line
2.16.1
#2 lore raw

PATCH 3/8 package_manager.py: move postinst_intercept dir initialization from RootFS to PackageManager class

In reply to Alexander Kanavin

This will allow handling postinst_intercepts when populating SDKs (which use PackageManager class directly, and do not utilize RootFS class).

---
 meta/lib/oe/package_manager.py | 25 +++++++++++++++++++------
 meta/lib/oe/rootfs.py          | 13 +------------
 2 files changed, 20 insertions(+), 18 deletions(-)
meta/lib/oe/package_manager.py +19 -6
index e0a114c3325..5b52fc9e713 100644
@@ -12,6 +12,7 @@ import oe.utils
 import oe.path
 import string
 from oe.gpg_sign import get_signer
+import hashlib
 
 # this can be used by all PM backends to create the index files in parallel
 def create_index(arg):
@@ -331,6 +332,21 @@ class PackageManager(object, metaclass=ABCMeta):
         self.target_rootfs = target_rootfs
         self.deploy_dir = None
         self.deploy_lock = None
+        self._initialize_intercepts()
+
+    def _initialize_intercepts(self):
+        bb.note("Initializing intercept dir for %s" % self.target_rootfs)
+        postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR")
+        if not postinst_intercepts_dir:
+            postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts")
+        # As there might be more than one instance of PackageManager operating at the same time
+        # we need to isolate the intercept_scripts directories from each other,
+        # hence the ugly hash digest in dir name.
+        self.intercepts_dir = os.path.join(self.d.getVar('WORKDIR'),
+                                      "intercept_scripts-%s" %(hashlib.sha256(self.target_rootfs.encode()).hexdigest()) )
+
+        bb.utils.remove(self.intercepts_dir, True)
+        shutil.copytree(postinst_intercepts_dir, self.intercepts_dir)
 
     @abstractmethod
     def update(self):
@@ -699,8 +715,7 @@ class RpmPM(PackageManager):
         os.environ['OFFLINE_ROOT'] = self.target_rootfs
         os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
         os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = oe.path.join(self.d.getVar('WORKDIR'),
-                                                   "intercept_scripts")
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
         os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
 
 
@@ -1178,8 +1193,7 @@ class OpkgPM(OpkgDpkgPM):
         os.environ['OFFLINE_ROOT'] = self.target_rootfs
         os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
         os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR'),
-                                                   "intercept_scripts")
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
         os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
 
         try:
@@ -1440,8 +1454,7 @@ class DpkgPM(OpkgDpkgPM):
         os.environ['OFFLINE_ROOT'] = self.target_rootfs
         os.environ['IPKG_OFFLINE_ROOT'] = self.target_rootfs
         os.environ['OPKG_OFFLINE_ROOT'] = self.target_rootfs
-        os.environ['INTERCEPT_DIR'] = os.path.join(self.d.getVar('WORKDIR'),
-                                                   "intercept_scripts")
+        os.environ['INTERCEPT_DIR'] = self.intercepts_dir
         os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE')
 
         failed_pkgs = []
meta/lib/oe/rootfs.py +1 -12
index bf2aea2b25a..600a685d68f 100644
@@ -178,20 +178,10 @@ class Rootfs(object, metaclass=ABCMeta):
         post_process_cmds = self.d.getVar("ROOTFS_POSTPROCESS_COMMAND")
         rootfs_post_install_cmds = self.d.getVar('ROOTFS_POSTINSTALL_COMMAND')
 
-        postinst_intercepts_dir = self.d.getVar("POSTINST_INTERCEPTS_DIR")
-        if not postinst_intercepts_dir:
-            postinst_intercepts_dir = self.d.expand("${COREBASE}/scripts/postinst-intercepts")
-        intercepts_dir = os.path.join(self.d.getVar('WORKDIR'),
-                                      "intercept_scripts")
-
-        bb.utils.remove(intercepts_dir, True)
-
         bb.utils.mkdirhier(self.image_rootfs)
 
         bb.utils.mkdirhier(self.deploydir)
 
-        shutil.copytree(postinst_intercepts_dir, intercepts_dir)
-
         execute_pre_post_process(self.d, pre_process_cmds)
 
         if self.progress_reporter:
@@ -312,8 +302,7 @@ class Rootfs(object, metaclass=ABCMeta):
 
 
     def _run_intercepts(self):
-        intercepts_dir = os.path.join(self.d.getVar('WORKDIR'),
-                                      "intercept_scripts")
+        intercepts_dir = self.pm.intercepts_dir
 
         bb.note("Running intercept scripts:")
         os.environ['D'] = self.image_rootfs
Signature · 1 line
2.16.1
#3 lore raw

PATCH 4/8 package_manager.py: move intercept running logic from rootfs class to PackageManager class

In reply to Alexander Kanavin

This allows running the intercepts when creating SDKs, which previously wasn't possible, as SDK code does not use the rootfs class, and calls into PackageManager methods directly.

---
 meta/lib/oe/package_manager.py | 58 ++++++++++++++++++++++++++++++++++++++
 meta/lib/oe/rootfs.py          | 64 +-----------------------------------------
 2 files changed, 59 insertions(+), 63 deletions(-)
meta/lib/oe/package_manager.py +58 -0
index 5b52fc9e713..6c85a6d2c78 100644
@@ -348,6 +348,54 @@ class PackageManager(object, metaclass=ABCMeta):
         bb.utils.remove(self.intercepts_dir, True)
         shutil.copytree(postinst_intercepts_dir, self.intercepts_dir)
 
+    @abstractmethod
+    def _handle_intercept_failure(self, failed_script):
+        pass
+
+    def _postpone_to_first_boot(self, postinst_intercept_hook):
+        with open(postinst_intercept_hook) as intercept:
+            registered_pkgs = None
+            for line in intercept.read().split("\n"):
+                m = re.match("^##PKGS:(.*)", line)
+                if m is not None:
+                    registered_pkgs = m.group(1).strip()
+                    break
+
+            if registered_pkgs is not None:
+                bb.note("If an image is being built, the postinstalls for the following packages "
+                        "will be postponed for first boot: %s" %
+                        registered_pkgs)
+
+                # call the backend dependent handler
+                self._handle_intercept_failure(registered_pkgs)
+
+
+    def run_intercepts(self):
+        intercepts_dir = self.intercepts_dir
+
+        bb.note("Running intercept scripts:")
+        os.environ['D'] = self.target_rootfs
+        os.environ['STAGING_DIR_NATIVE'] = self.d.getVar('STAGING_DIR_NATIVE')
+        for script in os.listdir(intercepts_dir):
+            script_full = os.path.join(intercepts_dir, script)
+
+            if script == "postinst_intercept" or not os.access(script_full, os.X_OK):
+                continue
+
+            if script == "delay_to_first_boot":
+                self._postpone_to_first_boot(script_full)
+                continue
+
+            bb.note("> Executing %s intercept ..." % script)
+
+            try:
+                output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
+                if output: bb.note(output.decode("utf-8"))
+            except subprocess.CalledProcessError as e:
+                bb.warn("The postinstall intercept hook '%s' failed, details in log.do_rootfs" % script)
+                bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
+                self._postpone_to_first_boot(script_full)
+
     @abstractmethod
     def update(self):
         """
@@ -897,6 +945,14 @@ class RpmPM(PackageManager):
         open(saved_script_name, 'w').write(output)
         os.chmod(saved_script_name, 0o755)
 
+    def _handle_intercept_failure(self, registered_pkgs):
+        rpm_postinsts_dir = self.target_rootfs + self.d.expand('${sysconfdir}/rpm-postinsts/')
+        bb.utils.mkdirhier(rpm_postinsts_dir)
+
+        # Save the package postinstalls in /etc/rpm-postinsts
+        for pkg in registered_pkgs.split():
+            self.save_rpmpostinst(pkg)
+
     def extract(self, pkg):
         output = self._invoke_dnf(["repoquery", "--queryformat", "%{location}", pkg])
         pkg_name = output.splitlines()[-1]
@@ -1000,6 +1056,8 @@ class OpkgDpkgPM(PackageManager):
 
         return tmp_dir
 
+    def _handle_intercept_failure(self, registered_pkgs):
+        self.mark_packages("unpacked", registered_pkgs.split())
 
 class OpkgPM(OpkgDpkgPM):
     def __init__(self, d, target_rootfs, config_file, archs, task_name='target'):
meta/lib/oe/rootfs.py +1 -63

100 lines not on this page · raw message

Signature · 1 line
2.16.1
#4 lore raw

PATCH 5/8 package_manager.py: do not hardcode the task name when referring to log files

In reply to Alexander Kanavin

This can be do_rootfs or do_populate_sdk, or anything else.

---
 meta/lib/oe/package_manager.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
meta/lib/oe/package_manager.py +4 -4
index 6c85a6d2c78..840a7bc34c5 100644
@@ -392,7 +392,7 @@ class PackageManager(object, metaclass=ABCMeta):
                 output = subprocess.check_output(script_full, stderr=subprocess.STDOUT)
                 if output: bb.note(output.decode("utf-8"))
             except subprocess.CalledProcessError as e:
-                bb.warn("The postinstall intercept hook '%s' failed, details in log.do_rootfs" % script)
+                bb.warn("The postinstall intercept hook '%s' failed, details in %s/log.do_%s" % (script, self.d.getVar('T'), self.d.getVar('BB_CURRENTTASK')))
                 bb.note("Exit code %d. Output:\n%s" % (e.returncode, e.output.decode("utf-8")))
                 self._postpone_to_first_boot(script_full)
 
@@ -789,7 +789,7 @@ class RpmPM(PackageManager):
                 failed_scriptlets_pkgnames[line.split()[-1]] = True
 
         if len(failed_scriptlets_pkgnames) > 0:
-            failed_postinsts_warn(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_rootfs"))
+            failed_postinsts_warn(list(failed_scriptlets_pkgnames.keys()), self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
         for pkg in failed_scriptlets_pkgnames.keys():
             self.save_rpmpostinst(pkg)
 
@@ -1265,7 +1265,7 @@ class OpkgPM(OpkgDpkgPM):
                     bb.warn(line)
                     failed_pkgs.append(line.split(".")[0])
             if failed_pkgs:
-                failed_postinsts_warn(failed_pkgs, self.d.expand("${T}/log.do_rootfs"))
+                failed_postinsts_warn(failed_pkgs, self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
         except subprocess.CalledProcessError as e:
             (bb.fatal, bb.warn)[attempt_only]("Unable to install packages. "
                                               "Command '%s' returned %d:\n%s" %
@@ -1530,7 +1530,7 @@ class DpkgPM(OpkgDpkgPM):
                         bb.warn("%s for package %s failed with %d:\n%s" %
                                 (control_script.name, pkg_name, e.returncode,
                                     e.output.decode("utf-8")))
-                        failed_postinsts_warn([pkg_name], self.d.expand("${T}/log.do_rootfs"))
+                        failed_postinsts_warn([pkg_name], self.d.expand("${T}/log.do_${BB_CURRENTTASK}"))
                         failed_pkgs.append(pkg_name)
                         break
 
Signature · 1 line
2.16.1
#5 lore raw

PATCH 6/8 sdk.py: run postinst intercepts

In reply to Alexander Kanavin

Previously this wasn't done, and so any packages installed from populate_sdk would not have the postinsts fully executed (particularly generation of various caches via running nativesdk or target binaries with qemu wasn't working).

[YOCTO #12630]

---
 meta/classes/populate_sdk_base.bbclass |  2 +-
 meta/lib/oe/sdk.py                     | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)
meta/classes/populate_sdk_base.bbclass +1 -1
index 60a5abc7dc8..77ec8aaec27 100644
@@ -46,7 +46,7 @@ TOOLCHAIN_TARGET_TASK_ATTEMPTONLY ?= ""
 TOOLCHAIN_OUTPUTNAME ?= "${SDK_NAME}-toolchain-${SDK_VERSION}"
 
 SDK_RDEPENDS = "${TOOLCHAIN_TARGET_TASK} ${TOOLCHAIN_HOST_TASK}"
-SDK_DEPENDS = "virtual/fakeroot-native pixz-native cross-localedef-native"
+SDK_DEPENDS = "virtual/fakeroot-native pixz-native cross-localedef-native ${MLPREFIX}qemuwrapper-cross"
 SDK_DEPENDS_append_libc-glibc = " nativesdk-glibc-locale"
 
 # We want the MULTIARCH_TARGET_SYS to point to the TUNE_PKGARCH, not PACKAGE_ARCH as it
meta/lib/oe/sdk.py +12 -0
index 6cd4115202f..d6a503372a3 100644
@@ -209,6 +209,8 @@ class RpmSdk(Sdk):
 
         self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
 
+        self.target_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
 
         if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -218,6 +220,8 @@ class RpmSdk(Sdk):
         self._populate_sysroot(self.host_pm, self.host_manifest)
         self.install_locales(self.host_pm)
 
+        self.host_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
 
         if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -293,6 +297,8 @@ class OpkgSdk(Sdk):
 
         self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
 
+        self.target_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
 
         if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -302,6 +308,8 @@ class OpkgSdk(Sdk):
         self._populate_sysroot(self.host_pm, self.host_manifest)
         self.install_locales(self.host_pm)
 
+        self.host_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
 
         if not bb.utils.contains("SDKIMAGE_FEATURES", "package-management", True, False, self.d):
@@ -378,6 +386,8 @@ class DpkgSdk(Sdk):
 
         self.target_pm.install_complementary(self.d.getVar('SDKIMAGE_INSTALL_COMPLEMENTARY'))
 
+        self.target_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_TARGET_COMMAND"))
 
         self._copy_apt_dir_to(os.path.join(self.sdk_target_sysroot, "etc", "apt"))
@@ -389,6 +399,8 @@ class DpkgSdk(Sdk):
         self._populate_sysroot(self.host_pm, self.host_manifest)
         self.install_locales(self.host_pm)
 
+        self.host_pm.run_intercepts()
+
         execute_pre_post_process(self.d, self.d.getVar("POPULATE_SDK_POST_HOST_COMMAND"))
 
         self._copy_apt_dir_to(os.path.join(self.sdk_output, self.sdk_native_path,
Signature · 1 line
2.16.1
#6 lore raw

PATCH 7/8 gio-module-cache.bbclass: pass in ${libexecdir}

In reply to Alexander Kanavin

When it was something else than /usr/libexec (e.g. when installing native SDK packages), things broke down.

---
 meta/classes/gio-module-cache.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/gio-module-cache.bbclass +1 -0
index a8190b7b89a..e429bd31976 100644
@@ -9,6 +9,7 @@ if [ "x$D" != "x" ]; then
             mlprefix=${MLPREFIX} \
             binprefix=${MLPREFIX} \
             libdir=${libdir} \
+            libexecdir=${libexecdir} \
             base_libdir=${base_libdir} \
             bindir=${bindir}
 else
Signature · 1 line
2.16.1
#7 lore raw

PATCH 8/8 glib-2.0/glib.inc: apply MLPREFIX renaming to all package classes

In reply to Alexander Kanavin

Now that we have postinst intercept execution working for SDK generation, adding MLPREFIX again makes sense in all cases, as the intercepts do require that it is there.

This reverts commit 4ffb728df4bdf21daef31d89cfa5771eaf0d90f8.

---
 meta/recipes-core/glib-2.0/glib.inc | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
meta/recipes-core/glib-2.0/glib.inc +5 -5
index 7e062eeb5da..b7c32e64bc8 100644
@@ -104,6 +104,11 @@ do_install_append () {
 	if [ -e ${D}${libdir}/charset.alias ]; then
 		rm -f ${D}${libdir}/charset.alias
 	fi
+
+        # Make sure gio-querymodules is unique among multilibs
+        if test "x${MLPREFIX}" != "x"; then
+                mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules
+        fi
 }
 
 do_install_append_class-target () {
@@ -114,11 +119,6 @@ do_install_append_class-target () {
 			rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test
 		fi
 	fi
-
-	# Make sure gio-querymodules is unique among multilibs
-	if test "x${MLPREFIX}" != "x"; then
-		mv ${D}${libexecdir}/gio-querymodules ${D}${libexecdir}/${MLPREFIX}gio-querymodules
-	fi
 }
 
 CODEGEN_PYTHON_RDEPENDS = "python3 python3-distutils python3-xml"
Signature · 1 line
2.16.1
#8 lore raw

✗ patchtest: failure for "nativesdk-postinst-intercept: ..." and 7 more

In reply to Alexander Kanavin

== Series Details ==

Series: "nativesdk-postinst-intercept: ..." and 7 more
Revision: 1
URL : https://patchwork.openembedded.org/series/11661/
State : failure

== Summary ==

Thank you for submitting this patch series to OpenEmbedded Core. This is an automated response. Several tests have been executed on the proposed series by patchtest resulting in the following failures:

* Patch            [3/8] package_manager.py: move postinst_intercept dir initialization from RootFS to PackageManager class
 Issue             Commit shortlog is too long [test_shortlog_length] 
  Suggested fix    Edit shortlog so that it is 90 characters or less (currently 98 characters)

If you believe any of these test results are incorrect, please reply to the mailing list ([email protected]) raising your concerns. Otherwise we would appreciate you correcting the issues and submitting a new version of the patchset if applicable. Please ensure you add/increment the version number when sending the new version (i.e. [PATCH] -> [PATCH v2] -> [PATCH v3] -> ...).

---

Guidelines:     https://www.openembedded.org/wiki/Commit_Patch_Message_Guidelines
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite:     http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe