[OE-core] [PATCH 31/36] image.bbclass: do not uninstall update-alternatives from readonly rootfs

André Draszik git at andred.net
Wed Feb 15 10:12:31 UTC 2017


On Mon, 2017-02-13 at 17:06 +0200, Alexander Kanavin wrote:
> dnf insists that it cannot be done:
> 
> Error: package libglib-2.0-0-1:2.50.2-r0.i586 requires /bin/sh, but none
> of the providers can be installed
>   - package libdnf1-0.2.3+git0+367545629c-r0.i586 requires libglib-2.0-0
> >= 2.50.2, but none of the providers can be installed
>   - package bash-4.3.30-r0.i586 requires update-alternatives-opkg, but
> none of the providers can be installed
>   - package busybox-1.24.1-r0.i586 requires update-alternatives-opkg, but
> none of the providers can be installed
>   - package dnf-2.0.0+git0+f0093d672d-r0.i586 requires libdnf1, but none
> of the providers can be installed
>   - conflicting requests
>   - problem with installed package dnf-2.0.0+git0+f0093d672d-r0.i586

Can this change be made dependent on DNF, please?

Update-alternatives once run is not useful on read-only rootfs, and its
database wastes a lot of space (in the target file system) for no benefit.

Cheers,
Andre'



> 
> Signed-off-by: Alexander Kanavin <alexander.kanavin at linux.intel.com>
> ---
>  meta/classes/image.bbclass             | 2 +-
>  meta/lib/oeqa/selftest/buildoptions.py | 4 ++--
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass
> index b5a4fb4a337..ca0d0a8c0d1 100644
> --- a/meta/classes/image.bbclass
> +++ b/meta/classes/image.bbclass
> @@ -33,7 +33,7 @@ ROOTFS_BOOTSTRAP_INSTALL = "${@bb.utils.contains("IMAGE_
> FEATURES", "package-mana
>  
>  # These packages will be removed from a read-only rootfs after all other
>  # packages have been installed
> -ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow ${VIRTUAL-
> RUNTIME_update-alternatives} ${ROOTFS_BOOTSTRAP_INSTALL}"
> +ROOTFS_RO_UNNEEDED = "update-rc.d base-passwd shadow
> ${ROOTFS_BOOTSTRAP_INSTALL}"
>  
>  # packages to install from features
>  FEATURE_INSTALL = "${@'
> '.join(oe.packagegroup.required_packages(oe.data.typed_value('IMAGE_FEATUR
> ES', d), d))}"
> diff --git a/meta/lib/oeqa/selftest/buildoptions.py
> b/meta/lib/oeqa/selftest/buildoptions.py
> index d40eb007ded..1801511913b 100644
> --- a/meta/lib/oeqa/selftest/buildoptions.py
> +++ b/meta/lib/oeqa/selftest/buildoptions.py
> @@ -22,12 +22,12 @@ class ImageOptionsTests(oeSelfTest):
>          bitbake("core-image-minimal")
>          log_data_file = os.path.join(get_bb_var("WORKDIR", "core-image-
> minimal"), "temp/log.do_rootfs")
>          log_data_created = ftools.read_file(log_data_file)
> -        incremental_created = re.search("NOTE: load old install solution
> for incremental install\nNOTE: old install solution not exist\nNOTE:
> creating new install solution for incremental install(\n.*)*NOTE:
> Installing the following packages:.*packagegroup-core-ssh-openssh",
> log_data_created)
> +        incremental_created = re.search("Installing  : packagegroup-core-
> ssh-openssh", log_data_created)
>          self.remove_config('IMAGE_FEATURES += "ssh-server-openssh"')
>          self.assertTrue(incremental_created, msg = "Match failed in:\n%s"
> % log_data_created)
>          bitbake("core-image-minimal")
>          log_data_removed = ftools.read_file(log_data_file)
> -        incremental_removed = re.search("NOTE: load old install solution
> for incremental install\nNOTE: creating new install solution for
> incremental install(\n.*)*NOTE: incremental removed:.*openssh-sshd-.*",
> log_data_removed)
> +        incremental_removed = re.search("Erasing     : packagegroup-core-
> ssh-openssh", log_data_removed)
>          self.assertTrue(incremental_removed, msg = "Match failed in:\n%s"
> % log_data_removed)
>  
>      @testcase(286)
> -- 
> 2.11.0
> 



More information about the Openembedded-core mailing list