util-linux: create nativesdk lib packages
cover util-linux: create nativesdk lib packages
Dear maintainer,
This patch fixes the following error:
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 following changes since commit 4469acdf1d0338220f3fe2ecb5e079eea6fda375:
lib/oe/utils: remove param_bool() (2017-12-02 11:25:34 +0000)
are available in the Git repository at:
git://git.yoctoproject.org/poky-contrib gportay/util-linux-create-nativesdk-lib-packages
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=gportay/util-linux-create-nativesdk-lib-packages
Regards,
Gaël PORTAY (1):
util-linux: create nativesdk lib packages
meta/recipes-core/util-linux/util-linux.inc | 7 +++++++ 1 file changed, 7 insertions(+)
Signature · 1 line
2.15.0
PATCH 1/1 util-linux: create nativesdk lib packages
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
--- meta/recipes-core/util-linux/util-linux.inc | 7 +++++++ 1 file changed, 7 insertions(+)
meta/recipes-core/util-linux/util-linux.inc +7 -0
@@ -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"
Signature · 1 line
2.15.0
meta/recipes-core/util-linux/util-linux.inc python populate_packages_prepend() { · line 307
Quoted 7 lines · Gaël PORTAY
meta/recipes-core/util-linux/util-linux.inc +6
-0+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) +}
The existing populate_packages is good, it should just use ${PN} instead of util-linux.
Ross
Hi Ross,
Quoted 14 lines · Ross
meta/recipes-core/util-linux/util-linux.inc python populate_packages_prepend() { · line 307
Quoted 7 lines · Gaël PORTAY
meta/recipes-core/util-linux/util-linux.inc +6
-0+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) +}The existing
populate_packagesis good, it should just use ${PN} instead of util-linux.
Quoted 1 line
Ross
Well... I am not sure I get it :/
How can I solve the following issue:
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.
When I build the nativesdk image, the image needs this dependency (nativesdk-util-linux-libuuid) but it is not build because of the libuuid.so is located under /usr on nativesdk while it is located under / on cross.
Regards,
Gael
Quoted 33 lines · Gaël PORTAY
Hi Ross,
Quoted 1 line · Ross
On 7 December 2017 at 22:29, Gaël PORTAY <gael.portay@savoirfairelinux.
com>
Quoted 7 lines
meta/recipes-core/util-linux/util-linux.inc python populate_packages_prepend() {
Quoted 5 lines · wrote:
meta/recipes-core/util-linux/util-linux.inc +5
-0+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)
Quoted 4 lines
Quoted 2 lines
+}
The existing
populate_packagesis good, it should just use ${PN} insteadof
Quoted 3 lines
util-linux.
Ross
Well... I am not sure I get it :/
How can I solve the following issue:
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.
Quoted 5 lines
When I build the nativesdk image, the image needs this dependency (nativesdk-util-linux-libuuid) but it is not build because of the libuuid.so is located under /usr on nativesdk while it is located under / on cross.
Ah, I thought the problem was the naming of the packages, not the libdir.
Well, one fix would be to stop moving files around for target, it's not like the /lib vs /usr/lib split is actually useful...
Ross