Openembedded Core Discussions
 help / color / mirror / Atom feed
* Re: what is the closest alternative to red hat's ABRT in OE?
From: Maciej Borzęcki @ 2016-12-06 16:02 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list
In-Reply-To: <alpine.LFD.2.20.1612060948001.9434@ca624034.mitel.com>

On Tue, Dec 6, 2016 at 3:49 PM, Robert P. J. Day <rpjday@crashcourse.ca> wrote:
>
>   as in:
>
> https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-abrt.html
>
> specifically, to manage core files? i would have thought judicious use
> of "ulimit" would be the solution. others?
>

If you're using systemd there is systemd-coredump(8).

-- 
Maciej Borzecki
RnDity


^ permalink raw reply

* Re: [PATCH 3/6] keyutils: new recipe (version 1.5.9)
From: Andreas Oberritter @ 2016-12-06 16:03 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LZxQO7B6V=MK9+XE1is=jNDFut8Fq+q7S9Mrov7FrLX5g@mail.gmail.com>

On 06.12.2016 16:49, Burton, Ross wrote:
> 
> On 30 November 2016 at 22:43, Andreas Oberritter <obi@opendreambox.org
> <mailto:obi@opendreambox.org>> wrote:
> 
>     Used by nfs-utils for nfsidmap, if available.
> 
> 
> This breaks under musl:
> 
> | key.dns_resolver.c: In function 'afsdb_hosts_to_addrs':
> | key.dns_resolver.c:374:21: error: 'UINT_MAX' undeclared (first use in
> this function)
> |   unsigned int ttl = UINT_MAX, rr_ttl;
> |                      ^~~~~~~~
> | key.dns_resolver.c:374:21: note: each undeclared identifier is
> reported only once for each function it appears in
> | key.dns_resolver.c: In function 'dns_query_afsdb':
> | key.dns_resolver.c:456:22: error: 'ULONG_MAX' undeclared (first use in
> this function)
> |   unsigned long ttl = ULONG_MAX;
> |                       ^~~~~~~~~

Apparently there's a recipe in meta-ivi which already has a fix. I'm
going to merge both recipes and resubmit.

Regards,
Andreas


^ permalink raw reply

* Re: [PATCH 3/6] keyutils: new recipe (version 1.5.9)
From: Burton, Ross @ 2016-12-06 16:06 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core
In-Reply-To: <26165659-66e8-f334-2035-1b50001524cc@opendreambox.org>

[-- Attachment #1: Type: text/plain, Size: 331 bytes --]

On 6 December 2016 at 16:03, Andreas Oberritter <obi@opendreambox.org>
wrote:

> Apparently there's a recipe in meta-ivi which already has a fix. I'm
> going to merge both recipes and resubmit.
>

Thanks Andreas, feel free to just send v2 for just this patch, as the rest
are sitting in my staging branch already.

Ross

[-- Attachment #2: Type: text/html, Size: 777 bytes --]

^ permalink raw reply

* Re: [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives
From: Andreas Oberritter @ 2016-12-06 16:08 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LbCWZYmnaxDjKNr==nNvyXn0Y3nXnJanoQb5ccgZpWxpg@mail.gmail.com>

On 06.12.2016 16:39, Burton, Ross wrote:
> 
> On 6 December 2016 at 11:49, Andreas Oberritter <obi@opendreambox.org
> <mailto:obi@opendreambox.org>> wrote:
> 
>     +    sed -i -e 's|SYSCONFDIR|"/etc"|' ${S}/utils/update-alternatives.c
> 
> 
> Hardcoding /etc is bad, can't you just remove the native sysroot prefix
> from $sysconfdir?

I guess ${sysconfdir_native} should work, unless someone overrides
STAGING_ETCDIR_NATIVE. Would this be ok?

Regards,
Andreas


^ permalink raw reply

* Re: [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives
From: Burton, Ross @ 2016-12-06 16:12 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core
In-Reply-To: <eab1dd56-d37f-6e3d-f8f3-f5cfa1f99a52@opendreambox.org>

[-- Attachment #1: Type: text/plain, Size: 384 bytes --]

On 6 December 2016 at 16:08, Andreas Oberritter <obi@opendreambox.org>
wrote:

> I guess ${sysconfdir_native} should work, unless someone overrides
> STAGING_ETCDIR_NATIVE. Would this be ok?
>

If the recipe inherits native then the class reassigns:

sysconfdir = "${STAGING_ETCDIR_NATIVE}"

So you'll need to take sysconfdir, and strip off the staging directory.

Ross

[-- Attachment #2: Type: text/html, Size: 1019 bytes --]

^ permalink raw reply

* Re: [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives
From: Andreas Oberritter @ 2016-12-06 16:37 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0LZJ8J4RGY+MEes6+9A7_kygoyR4b0kXrj+6NS=jxzdTtA@mail.gmail.com>

On 06.12.2016 17:12, Burton, Ross wrote:
> 
> On 6 December 2016 at 16:08, Andreas Oberritter <obi@opendreambox.org
> <mailto:obi@opendreambox.org>> wrote:
> 
>     I guess ${sysconfdir_native} should work, unless someone overrides
>     STAGING_ETCDIR_NATIVE. Would this be ok?
> 
> 
> If the recipe inherits native then the class reassigns:
> 
> sysconfdir = "${STAGING_ETCDIR_NATIVE}"
> 
> So you'll need to take sysconfdir, and strip off the staging directory.

I was asking because the result after stripping would essentially equal
${sysconfdir_native}:

STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"

It wouldn't work if someone set it to "${STAGING_DIR_NATIVE}/foo"
without adjusting sysconfdir_native, but on the other hand someone could
just as well use "/path-outside-staging-dir-native/etc", which would
break attempts to strip the prefix, too. I'd guess the assumption that
STAGING_ETCDIR_NATIVE doesn't get changed alone should be safe.

Regards,
Andreas



^ permalink raw reply

* [PATCH v2] keyutils: new recipe (version 1.5.9)
From: Andreas Oberritter @ 2016-12-06 16:46 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <CAJTo0LYr1fUAPThGvLmWT_Jf0A+fzA302xHWfw4+NkY0d0FGGA@mail.gmail.com>

Used by nfs-utils for nfsidmap, if available. Includes a backported patch for
musl and a description text from meta-ivi.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 .../0001-Include-limits.h-for-UINT_MAX.patch       | 30 ++++++++++++++++++
 meta/recipes-support/keyutils/keyutils_1.5.9.bb    | 37 ++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 meta/recipes-support/keyutils/keyutils/0001-Include-limits.h-for-UINT_MAX.patch
 create mode 100644 meta/recipes-support/keyutils/keyutils_1.5.9.bb

diff --git a/meta/recipes-support/keyutils/keyutils/0001-Include-limits.h-for-UINT_MAX.patch b/meta/recipes-support/keyutils/keyutils/0001-Include-limits.h-for-UINT_MAX.patch
new file mode 100644
index 0000000..b17153c
--- /dev/null
+++ b/meta/recipes-support/keyutils/keyutils/0001-Include-limits.h-for-UINT_MAX.patch
@@ -0,0 +1,30 @@
+Upstream-Status: Backport [git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/keyutils.git master]
+
+From ab818a7f5818177a3da09fce6aa064ef648da372 Mon Sep 17 00:00:00 2001
+From: Felix Janda <felix.janda@posteo.de>
+Date: Sat, 4 Apr 2015 00:13:21 +0200
+Subject: [PATCH] Include <limits.h> for UINT_MAX
+
+Fixes building with musl libc.
+
+Signed-off-by: Felix Janda <felix.janda@posteo.de>
+Signed-off-by: David Howells <dhowells@redhat.com>
+---
+ key.dns_resolver.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/key.dns_resolver.c b/key.dns_resolver.c
+index c2a9fe5..9c9d458 100644
+--- a/key.dns_resolver.c
++++ b/key.dns_resolver.c
+@@ -42,6 +42,7 @@
+ #include <netinet/in.h>
+ #include <arpa/nameser.h>
+ #include <arpa/inet.h>
++#include <limits.h>
+ #include <resolv.h>
+ #include <getopt.h>
+ #include <sys/types.h>
+-- 
+1.9.1
+
diff --git a/meta/recipes-support/keyutils/keyutils_1.5.9.bb b/meta/recipes-support/keyutils/keyutils_1.5.9.bb
new file mode 100644
index 0000000..3c746d2
--- /dev/null
+++ b/meta/recipes-support/keyutils/keyutils_1.5.9.bb
@@ -0,0 +1,37 @@
+SUMMARY = "Linux Key Management Utilities"
+DESCRIPTION = "Keyutils is a set of utilities for managing the key retention \
+facility in the kernel, which can be used by filesystems, block devices and \
+more to gain and retain the authorization and encryption keys required to \
+perform secure operations."
+HOMEPAGE = "https://people.redhat.com/~dhowells/keyutils/"
+LICENSE = "GPLv2+ & LGPLv2.1+"
+LICENSE_${PN} = "GPLv2+"
+LICENSE_lib${PN} = "LGPLv2.1+"
+LIC_FILES_CHKSUM = "file://LICENCE.GPL;md5=5f6e72824f5da505c1f4a7197f004b45 \
+                    file://LICENCE.LGPL;md5=7d1cacaa3ea752b72ea5e525df54a21f"
+
+SRC_URI = "https://people.redhat.com/~dhowells/keyutils/${BP}.tar.bz2 \
+           file://0001-Include-limits.h-for-UINT_MAX.patch"
+SRC_URI[md5sum] = "7f8ac985c45086b5fbcd12cecd23cf07"
+SRC_URI[sha256sum] = "4da2c5552c688b65ab14d4fd40fbdf720c8b396d8ece643e040cf6e707e083ae"
+
+EXTRA_OEMAKE = " \
+    DESTDIR=${D} \
+    ETCDIR=${sysconfdir} \
+    BINDIR=${bindir} \
+    SBINDIR=${sbindir} \
+    SHAREDIR=${datadir}/${BPN} \
+    MANDIR=${mandir} \
+    INCLUDEDIR=${includedir} \
+    LIBDIR=${base_libdir} \
+    USRLIBDIR=${libdir} \
+    BUILDFOR= \
+"
+
+do_install() {
+    oe_runmake install
+}
+
+PACKAGES =+ "lib${PN}"
+
+FILES_lib${PN} = "${base_libdir}/lib*${SOLIBS}"
-- 
2.7.4



^ permalink raw reply related

* Re: [PATCH 03/33] dpkg-native: hardcode SYSCONFDIR to /etc in update-alternatives
From: Burton, Ross @ 2016-12-06 17:07 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core
In-Reply-To: <f71fad47-fad7-89f8-7b19-24840f4ff65f@opendreambox.org>

[-- Attachment #1: Type: text/plain, Size: 693 bytes --]

On 6 December 2016 at 16:37, Andreas Oberritter <obi@opendreambox.org>
wrote:

> I was asking because the result after stripping would essentially equal
> ${sysconfdir_native}:
>
> STAGING_ETCDIR_NATIVE = "${STAGING_DIR_NATIVE}${sysconfdir_native}"
>
> It wouldn't work if someone set it to "${STAGING_DIR_NATIVE}/foo"
> without adjusting sysconfdir_native, but on the other hand someone could
> just as well use "/path-outside-staging-dir-native/etc", which would
> break attempts to strip the prefix, too. I'd guess the assumption that
> STAGING_ETCDIR_NATIVE doesn't get changed alone should be safe.
>

Ah yes, I misread the order of evaluation.  That should work.

Ross

[-- Attachment #2: Type: text/html, Size: 1288 bytes --]

^ permalink raw reply

* [PATCH] postinst: Add a test case to verify postinst scripts behavior
From: jose.perez.carranza @ 2016-12-06 17:29 UTC (permalink / raw)
  To: openembedded-core

From: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>

Add test case that verify behavior of postinst scripts at
roofts time and when is delayed to the first boot directly
on the target.

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
---
 .../recipes-test/postinst/postinst_1.0.bb          |  2 +
 meta/lib/oeqa/selftest/runtime-test.py             | 61 ++++++++++++++++++++++
 2 files changed, 63 insertions(+)

diff --git a/meta-selftest/recipes-test/postinst/postinst_1.0.bb b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
index 97a1987..6d49734 100644
--- a/meta-selftest/recipes-test/postinst/postinst_1.0.bb
+++ b/meta-selftest/recipes-test/postinst/postinst_1.0.bb
@@ -24,6 +24,7 @@ RDEPENDS_${PN}-delayed-t = "${PN}-delayed-p"
 # Main recipe post-install
 pkg_postinst_${PN}-at-rootfs () {
     tfile="/etc/postinsta-test"
+    touch "$D"/this-was-created-at-rootfstime
     if test "x$D" != "x" then
         # Need to run on first boot
         exit 1
@@ -42,6 +43,7 @@ pkg_postinst_${PN}-delayed-a () {
       # Need to run on first boot
       exit 1
     else
+      touch /etc/this-was-created-at-first-boot
       if test -e $efile ; then
         echo 'success' > $tfile
       else
diff --git a/meta/lib/oeqa/selftest/runtime-test.py b/meta/lib/oeqa/selftest/runtime-test.py
index 1dbfae1..20caa97 100644
--- a/meta/lib/oeqa/selftest/runtime-test.py
+++ b/meta/lib/oeqa/selftest/runtime-test.py
@@ -155,3 +155,64 @@ postinst-delayed-t \
                     elif found:
                         self.assertEqual(idx, len(postinst_list), "Not found all postinsts")
                         break
+
+    @testcase(1545)
+    def test_postinst_roofs_and_boot(self):
+        """
+        Summary:        The purpose of this test case is to verify Post-installation
+                        scripts are called when roofs is created and also test
+                        that script can be delayed to run at first boot.
+        Dependencies:   NA
+        Steps:          1. Add proper configuration to local.conf file
+                        2. Build a "core-image-full-cmdline" image
+                        3. Verify that file created by postinst_rootfs recipe is
+                           present on rootfs dir.
+                        4. Boot the image created on qemu and verify that the file
+                           created by postinst_boot recipe is present on image.
+                        5. Clean the packages and image created to test with
+                           different package managers
+        Expected:       The files are successfully created during rootfs and boot
+                        time for 3 different package managers: rpm,ipk,deb and
+                        for initialization managers: sysvinit and systemd.
+
+        """
+        file_rootfs_name = "this-was-created-at-rootfstime"
+        fileboot_name = "this-was-created-at-first-boot"
+        rootfs_pkg = 'postinst-at-rootfs'
+        boot_pkg = 'postinst-delayed-a'
+        #Step 1
+        features = 'MACHINE = "qemux86"\n'
+        features += 'CORE_IMAGE_EXTRA_INSTALL += "%s %s "\n'% (rootfs_pkg, boot_pkg)
+        for init_manager in ("sysvinit", "systemd"):
+            #for sysvinit no extra configuration is needed,
+            if (init_manager is "systemd"):
+                features += 'DISTRO_FEATURES_append = " systemd"\n'
+                features += 'VIRTUAL-RUNTIME_init_manager = "systemd"\n'
+                features += 'DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"\n'
+                features += 'VIRTUAL-RUNTIME_initscripts = ""\n'
+            for classes in ("package_rpm package_deb package_ipk",
+                            "package_deb package_rpm package_ipk",
+                            "package_ipk package_deb package_rpm"):
+                features += 'PACKAGE_CLASSES = "%s"\n' % classes
+                self.write_config(features)
+
+                #Step 2
+                bitbake('core-image-full-cmdline')
+
+                #Step 3
+                file_rootfs_created = os.path.join(get_bb_var('IMAGE_ROOTFS',"core-image-full-cmdline"),
+                                                   file_rootfs_name)
+                found = os.path.isfile(file_rootfs_created)
+                self.assertTrue(found, "File %s was not created at rootfs time by %s" % \
+                                (file_rootfs_name, rootfs_pkg))
+
+                #Step 4
+                testcommand = 'ls /etc/'+fileboot_name
+                with runqemu('core-image-full-cmdline') as qemu:
+                    sshargs = '-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no'
+                    result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, testcommand))
+                    self.assertEqual(result.status, 0, 'File %s was not created at firts boot'% fileboot_name)
+
+                #Step 5
+                bitbake(' %s %s -c cleanall' % (rootfs_pkg, boot_pkg))
+                bitbake('core-image-full-cmdline -c cleanall')
-- 
2.1.4



^ permalink raw reply related

* Re: [PATCH] gstreamer1.0-plugins-bad: Add PKG_CONFIG_SYSROOT_DIR to output of pkg-config
From: Burton, Ross @ 2016-12-06 17:18 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
In-Reply-To: <6D6B8004-668B-4C5B-96BE-7A231F365788@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 670 bytes --]

On 5 December 2016 at 19:08, Khem Raj <raj.khem@gmail.com> wrote:

> having said that, there could be a multilib issue if pkgdatadir thats in
> .pc file from wayland-protocols package is using variables like ${libdir}
> which then are
> multilib dependent, if this is the case then we need to fix .pc file.
> however when I look at the <target-sysroot>/usr/share/pkgconfig/wayland-protocols.pc
> it has
>
> prefix=/usr
> datarootdir=${prefix}/share
> pkgdatadir=/usr/share/wayland-protocols
>
> seems to be free of multilib deps.
>

Funnily enough this just failed in multilib on the AB (
http://errors.yoctoproject.org/Errors/Details/111361/)

Ross

[-- Attachment #2: Type: text/html, Size: 1226 bytes --]

^ permalink raw reply

* Re: [PATCH 21/33] package_manager/deb: create Packages.xz
From: Burton, Ross @ 2016-12-06 17:22 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core
In-Reply-To: <1481024991-5882-22-git-send-email-obi@opendreambox.org>

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

On 6 December 2016 at 11:49, Andreas Oberritter <obi@opendreambox.org>
wrote:

> +        xz = bb.utils.which(os.getenv('PATH'), "xz")
>

Are the relevant dependencies present to ensure that xz-native has been
staged?  Is it always present because apt links to a library in xz so the
binaries get pulled in too?

Ross

[-- Attachment #2: Type: text/html, Size: 761 bytes --]

^ permalink raw reply

* Re: [PATCH 20/33] package_manager/deb: let apt-get handle postinst scripts
From: Burton, Ross @ 2016-12-06 17:26 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core
In-Reply-To: <1481024991-5882-21-git-send-email-obi@opendreambox.org>

[-- Attachment #1: Type: text/plain, Size: 6678 bytes --]

Can you elaborate on why the old code can be deleted?

Ross

On 6 December 2016 at 11:49, Andreas Oberritter <obi@opendreambox.org>
wrote:

> Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
> ---
>  meta/lib/oe/package_manager.py | 86 ++++--------------------------
> ------------
>  meta/lib/oe/rootfs.py          |  6 +--
>  2 files changed, 9 insertions(+), 83 deletions(-)
>
> diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.
> py
> index 4ef4f6d..12dff20 100644
> --- a/meta/lib/oe/package_manager.py
> +++ b/meta/lib/oe/package_manager.py
> @@ -1959,84 +1959,6 @@ class DpkgPM(OpkgDpkgPM):
>
>          self.indexer = DpkgIndexer(self.d, self.deploy_dir)
>
> -    """
> -    This function will change a package's status in /var/lib/dpkg/status
> file.
> -    If 'packages' is None then the new_status will be applied to all
> -    packages
> -    """
> -    def mark_packages(self, status_tag, packages=None):
> -        status_file = self.target_rootfs + "/var/lib/dpkg/status"
> -
> -        with open(status_file, "r") as sf:
> -            with open(status_file + ".tmp", "w+") as tmp_sf:
> -                if packages is None:
> -                    tmp_sf.write(re.sub(r"Package:
> (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)",
> -                                        r"Package: \1\n\2Status: \3%s" %
> status_tag,
> -                                        sf.read()))
> -                else:
> -                    if type(packages).__name__ != "list":
> -                        raise TypeError("'packages' should be a list
> object")
> -
> -                    status = sf.read()
> -                    for pkg in packages:
> -                        status = re.sub(r"Package:
> %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg,
> -                                        r"Package: %s\n\1Status: \2%s" %
> (pkg, status_tag),
> -                                        status)
> -
> -                    tmp_sf.write(status)
> -
> -        os.rename(status_file + ".tmp", status_file)
> -
> -    """
> -    Run the pre/post installs for package "package_name". If package_name
> is
> -    None, then run all pre/post install scriptlets.
> -    """
> -    def run_pre_post_installs(self, package_name=None):
> -        info_dir = self.target_rootfs + "/var/lib/dpkg/info"
> -        ControlScript = collections.namedtuple("ControlScript",
> ["suffix", "name", "argument"])
> -        control_scripts = [
> -                ControlScript(".preinst", "Preinstall", "install"),
> -                ControlScript(".postinst", "Postinstall", "configure")]
> -        status_file = self.target_rootfs + "/var/lib/dpkg/status"
> -        installed_pkgs = []
> -
> -        with open(status_file, "r") as status:
> -            for line in status.read().split('\n'):
> -                m = re.match("^Package: (.*)", line)
> -                if m is not None:
> -                    installed_pkgs.append(m.group(1))
> -
> -        if package_name is not None and not package_name in
> installed_pkgs:
> -            return
> -
> -        os.environ['D'] = self.target_rootfs
> -        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',
> True),
> -                                                   "intercept_scripts")
> -        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE',
> True)
> -
> -        failed_pkgs = []
> -        for pkg_name in installed_pkgs:
> -            for control_script in control_scripts:
> -                p_full = os.path.join(info_dir, pkg_name +
> control_script.suffix)
> -                if os.path.exists(p_full):
> -                    try:
> -                        bb.note("Executing %s for package: %s ..." %
> -                                 (control_script.name.lower(), pkg_name))
> -                        subprocess.check_output([p_full,
> control_script.argument],
> -                                stderr=subprocess.STDOUT)
> -                    except subprocess.CalledProcessError as e:
> -                        bb.note("%s for package %s failed with %d:\n%s" %
> -                                (control_script.name, pkg_name,
> e.returncode,
> -                                    e.output.decode("utf-8")))
> -                        failed_pkgs.append(pkg_name)
> -                        break
> -
> -        if len(failed_pkgs):
> -            self.mark_packages("unpacked", failed_pkgs)
> -
>      def update(self):
>          os.environ['APT_CONFIG'] = self.apt_conf_file
>
> @@ -2058,6 +1980,14 @@ class DpkgPM(OpkgDpkgPM):
>
>          os.environ['APT_CONFIG'] = self.apt_conf_file
>
> +        os.environ['D'] = self.target_rootfs
> +        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',
> True),
> +                                                   "intercept_scripts")
> +        os.environ['NATIVE_ROOT'] = self.d.getVar('STAGING_DIR_NATIVE',
> True)
> +
>          cmd = "%s %s install --force-yes --allow-unauthenticated %s" % \
>                (self.apt_get_cmd, self.apt_args, ' '.join(pkgs))
>
> diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
> index a348b97..4c82456 100644
> --- a/meta/lib/oe/rootfs.py
> +++ b/meta/lib/oe/rootfs.py
> @@ -685,10 +685,6 @@ class DpkgRootfs(DpkgOpkgRootfs):
>
>          self.pm.fix_broken_dependencies()
>
> -        self.pm.mark_packages("installed")
> -
> -        self.pm.run_pre_post_installs()
> -
>          execute_pre_post_process(self.d, deb_post_process_cmds)
>
>          if self.progress_reporter:
> @@ -708,7 +704,7 @@ class DpkgRootfs(DpkgOpkgRootfs):
>          return self._save_postinsts_common(dst_postinst_dir,
> src_postinst_dir)
>
>      def _handle_intercept_failure(self, registered_pkgs):
> -        self.pm.mark_packages("unpacked", registered_pkgs.split())
> +        pass
>
>      def _log_check(self):
>          self._log_check_warn()
> --
> 2.7.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

[-- Attachment #2: Type: text/html, Size: 8969 bytes --]

^ permalink raw reply

* [morty][PATCH 0/2] Resolve gdb-cross-canadian dependency on imp
From: George McCollister @ 2016-12-06 18:06 UTC (permalink / raw)
  To: openembedded-core

Add imp to python3-importlib. Make gdb-cross-canadian depend on
nativesdk-python3-importlib when python is enabled.

The following changes since commit c8d96b10ee3bc2eae0fd269d2564286fd0bc82ed:

  rm_work: Ensure we don't remove sigbasedata files (2016-11-16 10:34:34 +0000)

are available in the git repository at:

  git://github.com/gmccollister/openembedded-core morty-gdb-cross-canadian
  https://github.com/gmccollister/openembedded-core/tree/morty-gdb-cross-canadian

George McCollister (2):
  python-3.5-manifest: Add imp to importlib
  gdb-cross-canadian: Depend on nativesdk-python3-importlib

 meta/recipes-devtools/gdb/gdb-cross-canadian.inc     | 3 ++-
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.9.3



^ permalink raw reply

* [morty][PATCH 1/2] python-3.5-manifest: Add imp to importlib
From: George McCollister @ 2016-12-06 18:07 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481043778.git.george.mccollister@gmail.com>

The imp python module is the forerunner of importlib. Include imp in
the importlib subpackage instead of the misc subpackage so that it can
be depended on without bringing in a bunch of unrelated, unused modules.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 3046114..6c690db 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -115,7 +115,7 @@ FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/imghdr.* $
 
 SUMMARY_${PN}-importlib="Python import implementation library"
 RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib "
+FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/imp.* "
 
 SUMMARY_${PN}-io="Python low-level I/O"
 RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-- 
2.9.3



^ permalink raw reply related

* [morty][PATCH 2/2] gdb-cross-canadian: Depend on nativesdk-python3-importlib
From: George McCollister @ 2016-12-06 18:07 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481043778.git.george.mccollister@gmail.com>

Add missing dependency on nativesdk-python3-importlib so the imp Python
module is installed.

Before this patch, running gdb from the sdk would give the following
error:

Python Exception <class 'ImportError'> No module named 'imp':

Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index e53081d..3ff1989 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -14,7 +14,8 @@ GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 PACKAGECONFIG ??= "python readline"
 PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
                          nativesdk-python3-core nativesdk-python3-lang nativesdk-python3-re \
-                         nativesdk-python3-codecs nativesdk-python3-netclient"
+                         nativesdk-python3-codecs nativesdk-python3-netclient \
+                         nativesdk-python3-importlib"
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
 
 SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
-- 
2.9.3



^ permalink raw reply related

* [master][PATCH 0/2] Resolve gdb-cross-canadian dependency on imp
From: George McCollister @ 2016-12-06 18:08 UTC (permalink / raw)
  To: openembedded-core

Add imp to python3-importlib. Make gdb-cross-canadian depend on
nativesdk-python3-importlib when python is enabled.

The following changes since commit 11063a01d4511b2688ea7ba2d7359e4e07328c66:

  ruby: upgrade to 2.3.1 (2016-11-30 15:47:17 +0000)

are available in the git repository at:

  git://github.com/gmccollister/openembedded-core master-gdb-cross-canadian
  https://github.com/gmccollister/openembedded-core/tree/master-gdb-cross-canadian

George McCollister (2):
  python-3.5-manifest: Add imp to importlib
  gdb-cross-canadian: Depend on nativesdk-python3-importlib

 meta/recipes-devtools/gdb/gdb-cross-canadian.inc     | 3 ++-
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

-- 
2.9.3



^ permalink raw reply

* [master][PATCH 1/2] python-3.5-manifest: Add imp to importlib
From: George McCollister @ 2016-12-06 18:08 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481047167.git.george.mccollister@gmail.com>

The imp python module is the forerunner of importlib. Include imp in
the importlib subpackage instead of the misc subpackage so that it can
be depended on without bringing in a bunch of unrelated, unused modules.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 851f12e..7fcd871 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -115,7 +115,7 @@ FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/__pycache_
 
 SUMMARY_${PN}-importlib="Python import implementation library"
 RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/importlib/__pycache__ "
+FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/importlib/__pycache__ ${libdir}/python3.5/imp.* ${libdir}/python3.5/__pycache__/imp.* "
 
 SUMMARY_${PN}-io="Python low-level I/O"
 RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-- 
2.9.3



^ permalink raw reply related

* [master][PATCH 2/2] gdb-cross-canadian: Depend on nativesdk-python3-importlib
From: George McCollister @ 2016-12-06 18:08 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1481047167.git.george.mccollister@gmail.com>

Add missing dependency on nativesdk-python3-importlib so the imp Python
module is installed.

Before this patch, running gdb from the sdk would give the following
error:

Python Exception <class 'ImportError'> No module named 'imp':

Signed-off-by: George McCollister <george.mccollister@gmail.com>
---
 meta/recipes-devtools/gdb/gdb-cross-canadian.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
index e53081d..3ff1989 100644
--- a/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
+++ b/meta/recipes-devtools/gdb/gdb-cross-canadian.inc
@@ -14,7 +14,8 @@ GDBPROPREFIX = "--program-prefix='${TARGET_PREFIX}'"
 PACKAGECONFIG ??= "python readline"
 PACKAGECONFIG[python] = "--with-python=${WORKDIR}/python,--without-python,nativesdk-python3, \
                          nativesdk-python3-core nativesdk-python3-lang nativesdk-python3-re \
-                         nativesdk-python3-codecs nativesdk-python3-netclient"
+                         nativesdk-python3-codecs nativesdk-python3-netclient \
+                         nativesdk-python3-importlib"
 PACKAGECONFIG[readline] = "--with-system-readline,--without-system-readline,nativesdk-readline"
 
 SSTATE_DUPWHITELIST += "${STAGING_DATADIR}/gdb"
-- 
2.9.3



^ permalink raw reply related

* Re: [PATCH 20/33] package_manager/deb: let apt-get handle postinst scripts
From: Andreas Oberritter @ 2016-12-06 18:20 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0Lbx_TKJgWRnYGHHAja2uT8CNG+d=wyFJ-aBiZJ3zmWyFg@mail.gmail.com>

On 06.12.2016 18:26, Burton, Ross wrote:
> Can you elaborate on why the old code can be deleted?

With all required environment variables and configuration options in
apt.conf in place, apt-get is able to install packages offline, i.e.
when creating the rootfs, including the execution of postinst scripts
and updating the package database. This is new behaviour.

At the time the deleted code would have executed, its work was already
done by apt-get.

> 
> Ross
> 
> On 6 December 2016 at 11:49, Andreas Oberritter <obi@opendreambox.org
> <mailto:obi@opendreambox.org>> wrote:
> 
>     Signed-off-by: Andreas Oberritter <obi@opendreambox.org
>     <mailto:obi@opendreambox.org>>
>     ---
>      meta/lib/oe/package_manager.py | 86
>     ++++--------------------------------------
>      meta/lib/oe/rootfs.py          |  6 +--
>      2 files changed, 9 insertions(+), 83 deletions(-)
> 
>     diff --git a/meta/lib/oe/package_manager.py
>     b/meta/lib/oe/package_manager.py
>     index 4ef4f6d..12dff20 100644
>     --- a/meta/lib/oe/package_manager.py
>     +++ b/meta/lib/oe/package_manager.py
>     @@ -1959,84 +1959,6 @@ class DpkgPM(OpkgDpkgPM):
> 
>              self.indexer = DpkgIndexer(self.d, self.deploy_dir)
> 
>     -    """
>     -    This function will change a package's status in
>     /var/lib/dpkg/status file.
>     -    If 'packages' is None then the new_status will be applied to all
>     -    packages
>     -    """
>     -    def mark_packages(self, status_tag, packages=None):
>     -        status_file = self.target_rootfs + "/var/lib/dpkg/status"
>     -
>     -        with open(status_file, "r") as sf:
>     -            with open(status_file + ".tmp", "w+") as tmp_sf:
>     -                if packages is None:
>     -                    tmp_sf.write(re.sub(r"Package:
>     (.*?)\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)",
>     -                                        r"Package: \1\n\2Status:
>     \3%s" % status_tag,
>     -                                        sf.read()))
>     -                else:
>     -                    if type(packages).__name__ != "list":
>     -                        raise TypeError("'packages' should be a
>     list object")
>     -
>     -                    status = sf.read()
>     -                    for pkg in packages:
>     -                        status = re.sub(r"Package:
>     %s\n((?:[^\n]+\n)*?)Status: (.*)(?:unpacked|installed)" % pkg,
>     -                                        r"Package: %s\n\1Status:
>     \2%s" % (pkg, status_tag),
>     -                                        status)
>     -
>     -                    tmp_sf.write(status)
>     -
>     -        os.rename(status_file + ".tmp", status_file)
>     -
>     -    """
>     -    Run the pre/post installs for package "package_name". If
>     package_name is
>     -    None, then run all pre/post install scriptlets.
>     -    """
>     -    def run_pre_post_installs(self, package_name=None):
>     -        info_dir = self.target_rootfs + "/var/lib/dpkg/info"
>     -        ControlScript = collections.namedtuple("ControlScript",
>     ["suffix", "name", "argument"])
>     -        control_scripts = [
>     -                ControlScript(".preinst", "Preinstall", "install"),
>     -                ControlScript(".postinst", "Postinstall", "configure")]
>     -        status_file = self.target_rootfs + "/var/lib/dpkg/status"
>     -        installed_pkgs = []
>     -
>     -        with open(status_file, "r") as status:
>     -            for line in status.read().split('\n'):
>     -                m = re.match("^Package: (.*)", line)
>     -                if m is not None:
>     -                    installed_pkgs.append(m.group(1))
>     -
>     -        if package_name is not None and not package_name in
>     installed_pkgs:
>     -            return
>     -
>     -        os.environ['D'] = self.target_rootfs
>     -        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', True),
>     -                                                   "intercept_scripts")
>     -        os.environ['NATIVE_ROOT'] =
>     self.d.getVar('STAGING_DIR_NATIVE', True)
>     -
>     -        failed_pkgs = []
>     -        for pkg_name in installed_pkgs:
>     -            for control_script in control_scripts:
>     -                p_full = os.path.join(info_dir, pkg_name +
>     control_script.suffix)
>     -                if os.path.exists(p_full):
>     -                    try:
>     -                        bb.note("Executing %s for package: %s ..." %
>     -                                 (control_script.name.lower(),
>     pkg_name))
>     -                        subprocess.check_output([p_full,
>     control_script.argument],
>     -                                stderr=subprocess.STDOUT)
>     -                    except subprocess.CalledProcessError as e:
>     -                        bb.note("%s for package %s failed with
>     %d:\n%s" %
>     -                                (control_script.name
>     <http://control_script.name>, pkg_name, e.returncode,
>     -                                    e.output.decode("utf-8")))
>     -                        failed_pkgs.append(pkg_name)
>     -                        break
>     -
>     -        if len(failed_pkgs):
>     -            self.mark_packages("unpacked", failed_pkgs)
>     -
>          def update(self):
>              os.environ['APT_CONFIG'] = self.apt_conf_file
> 
>     @@ -2058,6 +1980,14 @@ class DpkgPM(OpkgDpkgPM):
> 
>              os.environ['APT_CONFIG'] = self.apt_conf_file
> 
>     +        os.environ['D'] = self.target_rootfs
>     +        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', True),
>     +                                                   "intercept_scripts")
>     +        os.environ['NATIVE_ROOT'] =
>     self.d.getVar('STAGING_DIR_NATIVE', True)
>     +
>              cmd = "%s %s install --force-yes --allow-unauthenticated
>     %s" % \
>                    (self.apt_get_cmd, self.apt_args, ' '.join(pkgs))
> 
>     diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
>     index a348b97..4c82456 100644
>     --- a/meta/lib/oe/rootfs.py
>     +++ b/meta/lib/oe/rootfs.py
>     @@ -685,10 +685,6 @@ class DpkgRootfs(DpkgOpkgRootfs):
> 
>              self.pm.fix_broken_dependencies()
> 
>     -        self.pm.mark_packages("installed")
>     -
>     -        self.pm.run_pre_post_installs()
>     -
>              execute_pre_post_process(self.d, deb_post_process_cmds)
> 
>              if self.progress_reporter:
>     @@ -708,7 +704,7 @@ class DpkgRootfs(DpkgOpkgRootfs):
>              return self._save_postinsts_common(dst_postinst_dir,
>     src_postinst_dir)
> 
>          def _handle_intercept_failure(self, registered_pkgs):
>     -        self.pm.mark_packages("unpacked", registered_pkgs.split())
>     +        pass
> 
>          def _log_check(self):
>              self._log_check_warn()
>     --
>     2.7.4
> 
>     --
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>     <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
> 
> 



^ permalink raw reply

* Re: [PATCH 20/33] package_manager/deb: let apt-get handle postinst scripts
From: Burton, Ross @ 2016-12-06 18:24 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core
In-Reply-To: <e18eec82-26dc-3e09-74ea-82e1dcae8fea@opendreambox.org>

[-- Attachment #1: Type: text/plain, Size: 421 bytes --]

On 6 December 2016 at 18:20, Andreas Oberritter <obi@opendreambox.org>
wrote:

> With all required environment variables and configuration options in
> apt.conf in place, apt-get is able to install packages offline, i.e.
> when creating the rootfs, including the execution of postinst scripts
> and updating the package database. This is new behaviour.
>

Can you update the commit with this rationale?

Ross

[-- Attachment #2: Type: text/html, Size: 833 bytes --]

^ permalink raw reply

* Re: [PATCH 01/33] dpkg: implement offline mode for update-alternatives
From: Burton, Ross @ 2016-12-06 18:31 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core
In-Reply-To: <1481024991-5882-2-git-send-email-obi@opendreambox.org>

[-- Attachment #1: Type: text/plain, Size: 682 bytes --]

On 6 December 2016 at 11:49, Andreas Oberritter <obi@opendreambox.org>
wrote:

> +++ b/meta/recipes-devtools/dpkg/dpkg/0003-update-alternatives-
> Implement-offline-mode.patch
> @@ -0,0 +1,399 @@
> +From b4f0f6ced469095a2b21ddddb01b59c7aded057e Mon Sep 17 00:00:00 2001
> +From: Andreas Oberritter <obi@opendreambox.org>
> +Date: Thu, 28 Aug 2014 05:20:21 +0200
> +Subject: [PATCH] update-alternatives: Implement offline mode
> +
> +Lets update-alternatives manage symlinks inside a cross-arch root
> +filesystem in a directory specified by DPKG_ROOT.
> +
> +Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
>

This patch needs an Upstream-Status.

Ross

[-- Attachment #2: Type: text/html, Size: 1211 bytes --]

^ permalink raw reply

* Re: [PATCH 21/33] package_manager/deb: create Packages.xz
From: Andreas Oberritter @ 2016-12-06 18:41 UTC (permalink / raw)
  To: Burton, Ross; +Cc: OE-core
In-Reply-To: <CAJTo0Lb2fVvMAtrTFLQwMjWhubMyF_Cbz7ccDxgsdHPmKnwruw@mail.gmail.com>

On 06.12.2016 18:22, Burton, Ross wrote:
> 
> On 6 December 2016 at 11:49, Andreas Oberritter <obi@opendreambox.org
> <mailto:obi@opendreambox.org>> wrote:
> 
>     +        xz = bb.utils.which(os.getenv('PATH'), "xz")
> 
> 
> Are the relevant dependencies present to ensure that xz-native has been
> staged?  Is it always present because apt links to a library in xz so
> the binaries get pulled in too?

That's a good question. I guess I didn't add anything, because there's
no direct dependency in place for gzip-native either.

I don't know if it counts, but there's a dependency on apt-native and
apt's source tarball, like many others, is compressed with xz. By
default, apt also depends on xz because of PACKAGECONFIG = "lzma", but
that may obviously get changed by users.

Regards,
Andreas


^ permalink raw reply

* Re: [PATCH 21/33] package_manager/deb: create Packages.xz
From: Burton, Ross @ 2016-12-06 18:46 UTC (permalink / raw)
  To: Andreas Oberritter; +Cc: OE-core
In-Reply-To: <022c6339-1f2f-bd63-c8dc-1a6f74fa1eb2@opendreambox.org>

[-- Attachment #1: Type: text/plain, Size: 706 bytes --]

On 6 December 2016 at 18:41, Andreas Oberritter <obi@opendreambox.org>
wrote:

> That's a good question. I guess I didn't add anything, because there's
> no direct dependency in place for gzip-native either.
>
> I don't know if it counts, but there's a dependency on apt-native and
> apt's source tarball, like many others, is compressed with xz. By
> default, apt also depends on xz because of PACKAGECONFIG = "lzma", but
> that may obviously get changed by users.
>

I guess the use of xz to create Packages.xz should depend on xz being
present, and then package_deb should explicitly add dependencies to the
relevant tasks (as it does for do_package and do_packageindex already).

Ross

[-- Attachment #2: Type: text/html, Size: 1157 bytes --]

^ permalink raw reply

* [PATCH] sysstat: fixup pkg_postinst to allow SYSTEMD_AUTO_ENABLE to work
From: Mark Asselstine @ 2016-12-06 19:25 UTC (permalink / raw)
  To: openembedded-core

The logic added to the pkg_postinst in commit 6bf82c26f953 has the
side effect of rendering SYSTEMD_AUTO_ENABLE ineffective. The systemd
service will not be configured as 'enabled' either offline(do_rootfs)
or during first boot. Since the volatiles, as used, in the
pkg_postinst are unused with systemd we can simply skip the
pkg_postinst when not using sysvinit.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
 meta/recipes-extended/sysstat/sysstat.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-extended/sysstat/sysstat.inc b/meta/recipes-extended/sysstat/sysstat.inc
index bb5629d..fce2804 100644
--- a/meta/recipes-extended/sysstat/sysstat.inc
+++ b/meta/recipes-extended/sysstat/sysstat.inc
@@ -42,7 +42,9 @@ do_install() {
 	sed -i -e 's#@LIBDIR@#${libdir}#g' ${D}${systemd_unitdir}/system/sysstat.service
 }
 
-pkg_postinst_${PN} () {
+OVERRIDES_append = "${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', ':sysvinit', '', d)}"
+
+pkg_postinst_${PN}_sysvinit () {
         if [ -n "$D" ]; then
                 exit 0
         fi
-- 
2.7.4



^ permalink raw reply related

* Re: [PATCH 0/4] kernel-yocto: consolidated pull request
From: Trevor Woerner @ 2016-12-06 19:32 UTC (permalink / raw)
  To: Bruce Ashfield; +Cc: openembedded-core
In-Reply-To: <cover.1480711764.git.bruce.ashfield@windriver.com>

On Fri 2016-12-02 @ 04:09:21 PM, Bruce Ashfield wrote:
> This pull request is mainly to fix a couple of bugs that were reported
> on the mailing list recently, but it also includes some kernel version
> updates that I *think* I sent previously.

Thanks Bruce, I've tested these and they look good.


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox