Bug 5264

Summary: Way to install all PACKAGES of a recipe
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Robert Yang <liezhi.yang>
Component: coreAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: Medium CC: bluelightning, hongxu.jia, mark.hatle, meta.mr.watcher, meta.watcher, net147, richard.purdie, sgw
Version: 1.8   
Target Milestone: Future   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Robert Yang 2013-09-25 08:21:10 UTC
We have been asked many times on how to install all the PACKAGES of a recipe, we can only list them one by one in the RDPENDS (or IMAGE_INSTALL and so on) currently, or something like perl-modules, kernel-modules which depends on many other packages, but this is not easy to custom, maybe we can add such a config variable to do this, for example:

INSTALL_ALL_alsa-utils = "1"

Then the PACKAGES which generated by alsa-utils will be installed on the image, and will exclude the -dev/-staticdev/-dbg/-locale if they are not enabled by the features.
Comment 1 Robert Yang 2013-09-25 08:34:31 UTC
(In reply to comment #0)
> We have been asked many times on how to install all the PACKAGES of a
> recipe, we can only list them one by one in the RDPENDS (or IMAGE_INSTALL
> and so on) currently, or something like perl-modules, kernel-modules which
> depends on many other packages, but this is not easy to custom, maybe we can
> add such a config variable to do this, for example:
> 
> INSTALL_ALL_alsa-utils = "1"
> 
> Then the PACKAGES which generated by alsa-utils will be installed on the
> image, and will exclude the -dev/-staticdev/-dbg/-locale if they are not
> enabled by the features.

Just act as we add the package one by one. Usually, when the user wants to add a pkg, he doesn't care which sub package contains the file that he needs, and it would confuse him if he adds the pkg, but doesn't find what he needs, this will   be useful for him.
Comment 2 Jonathan Liu 2014-06-04 08:51:03 UTC
This would be useful if you want to install all the tzdata packages.
Comment 3 Hongxu Jia 2015-01-07 06:53:04 UTC
Here is the design:

1) According to the packages listed in PACKAGE_INSTALL, figure out recipes
   which produced them by invoking script oe-pkgdata-util;

2) Go on invoking script oe-pkgdata-util to list all available packages in
   these recipes except *-(doc|dbg|dev|staticdev|locale|ptest), and use them
   to replace packages in PACKAGE_INSTALL;

3) Packages installation at do_rootfs time as normal;

4) INSTALL_ALL is a global switch for all packages listed in PACKAGE_INSTALL,
   you also could assign INSTALL_ALL_pkgname ?= "1" for the particular
   package in PACKAGE_INSTALL;
Comment 4 Hongxu Jia 2015-01-07 06:54:11 UTC
Test Steps:

1. vim local.conf
...
MACHINE ?= "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
IMAGE_INSTALL_append = " busybox lib32-python3"
INSTALL_ALL_busybox ?= "1" 
INSTALL_ALL_lib32-python3 ?= "1"
...

2. Build core-image-minimal
$ bitbake core-image-minimal

3. Check installed_pkgs.txt, all available package of busybox and
lib32-python3 have been installed.
...
$ cat tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/installed_pkgs.txt
...
busybox core2-64
busybox-hwclock core2-64
busybox-syslog core2-64
busybox-udhcpc core2-64
busybox-udhcpd core2-64
...

4. Edit local.conf to assign INSTALL_ALL_busybox ?= "0"

5. build core-image-minimal

6. Check installed_pkgs.txt, busybox-udhcpd not installed
...
$ cat tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0-r0/installed_pkgs.txt
...
busybox core2-64
busybox-hwclock core2-64
busybox-syslog core2-64
busybox-udhcpc core2-64
...

//Hongxu
Comment 5 Hongxu Jia 2016-07-29 02:17:15 UTC
Rejected by Richard, it is not a good idea.