[poky] [PATCH 1/1] util-linux: create nativesdk lib packages
    Gaël PORTAY 
    gael.portay at savoirfairelinux.com
       
    Thu Dec  7 14:29:18 PST 2017
    
    
  
The nativesdk class does not create lib<x> packages as its cross
counterpart does.
	libblkid
	libuuid
	libsmartcols
	libfdisk
	libmount...
Instead theses libraries are shipped into the nativesdk-util-linux
package.
This causes nativesdk images to fail at do_rootfs when a package depends
on util-linux-lib<x> because the nativesdk-util-linux-lib<x> is not
created.
The example below shows what the error looks like with the not created
package nativesdk-util-linux-libuuid.
    	Collected errors:
    	 * calculate_dependencies_for: Cannot satisfy the following dependencies for nativesdk-packagegroup-sdk-host:
    	 *     nativesdk-util-linux-libuuid *
    	 * opkg_solver_install: Cannot install package nativesdk-packagegroup-sdk-host.
The reason comes from the place where the libraries are installed.
Libraries are installed under ${base_libdir} (ie. /lib) for the cross
the package; but they are installed under ${libdir} (ie. /usr/lib) for
nativesdk (and native).
	EXTRA_OECONF = "${SHARED_EXTRA_OECONF} --libdir=${base_libdir}"
	EXTRA_OECONF_class-native = "${SHARED_EXTRA_OECONF} \
	                             --disable-fallocate \
				     --disable-use-tty-group \
	"
The populate_packages_prepend function dynamically creates lib<x>
packages that are installed under ${base_libdir} directory.
The new function populate_packages_prepend_class-nativesdk for nativesdk
mimics the behavior of the cross function.
It creates dynamically nativesdk-lib<x> packages for libraries that are
installed under the ${libdir} directory.
Improves:
	91c0f9e35d util-linux: move libraries to base_libdir
	4cff0bd254 util-linux: Fix QA warnings about ALTERNATIVES
	4571c9e963 util-linux: collect libs for related libxx-dev package
	a7572d7000 util-linux: split libraries dynamically
Signed-off-by: Gaël PORTAY <gael.portay at savoirfairelinux.com>
---
 meta/recipes-core/util-linux/util-linux.inc | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc
index 248e8bee957..4bae86433b1 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -299,6 +299,13 @@ python populate_packages_prepend() {
                       extra_depends='', prepend=True, allow_links=True)
 }
 
+python populate_packages_prepend_class-nativesdk() {
+    do_split_packages(d, '${libdir}', '^lib(.*)\.so\..*$',
+                      output_pattern='nativesdk-util-linux-lib%s',
+                      description='nativesdk-util-linux lib%s',
+                      extra_depends='', prepend=True, allow_links=True)
+}
+
 RDEPENDS_${PN}-bash-completion += "util-linux-lsblk"
 RDEPENDS_${PN}-ptest = "bash grep coreutils which util-linux-blkid util-linux-fsck btrfs-tools"
 
-- 
2.15.0
    
    
More information about the poky
mailing list