Bug 13338

Summary: SDK build fails if image contains bash
Product: [Yocto Project Subprojects] ADT Reporter: Teemu K <teemu.keskinarkaus>
Component: adtAssignee: Pavel Zhukov <pavel>
Status: IN PROGRESS REVIEW --- QA Contact:
Severity: normal    
Priority: Medium+ CC: akuster808, bluelightning, daniel.ammann, pavel, poky.adt.watcher, poky.watcher, randy.macleod, thomas, trung1.dothanh, twoerner
Version: 2.6.3   
Target Milestone: 6.99   
Hardware: x86   
OS: Multiple   
Whiteboard: backports
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Teemu K 2019-05-08 10:47:37 UTC
This issue is about 'normal' SDK not eSDK.

If you add 'bash' (IMAGE_INSTALL += "bash") to core-image-minimal and try to generate sdk for it with bitbake command 'populate_sdk' it ends to error:

--
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 target-sdk-provides-dummy : Conflicts: bash
E: Unable to correct problems, you have held broken packages.
--

Same happen with other packages, but this is easiest to reproduce and all are related to target-sdk-provides-dummy - file.

And just in case I put the version wrong it's latest 'thud' - branch.
Comment 4 Armin Kuster 2019-06-20 14:27:54 UTC
may I close this now ?
Comment 5 Trung Do 2019-06-25 04:33:56 UTC
Hi

I still got the same problem with the latest warrior.
Error occurs if add bash or coreutils or any packages, that are in DUMMYPROVIDES, into IMAGE_INSTALL.

My test rev: warrior:048c1467e2e077076213ec01c4f0d1f181434e4c

How to reproduce:
1. Change package class to 'deb' (build passed with 'rpm' but failed with 'deb'):
   PACKAGE_CLASSES ?= "package_deb"
2. Add 'bash' to IMAGE_INSTALL:
   IMAGE_INSTALL_append = " bash"
3. Build SDK with "bitbake -c populate_sdk core-image-base".
   (Build will pass if use "bitbake meta-toolchain" instead)

Error: 
--
ERROR: core-image-base-1.0-r0 do_populate_sdk: Unable to install packages. Command '/home/trungdt/build-po/tmp/work/qemuarm-poky-linux-gnueabi/core-image-base
/1.0-r0/recipe-sysroot-native/usr/bin/apt-get  install --force-yes --allow-unauthenticated bash packagegroup-base-extended packagegroup-core-boot packagegroup
-core-standalone-sdk-target psplash run-postinsts target-sdk-provides-dummy' returned 100:
Reading package lists...     
Building dependency tree...                         
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 target-sdk-provides-dummy : Conflicts: bash
E: Unable to correct problems, you have held broken packages.
--

Thanks,
Trung
Comment 6 daniel.ammann 2020-06-22 01:18:12 UTC
(In reply to comment #5)
> Hi
> 
> I still got the same problem with the latest warrior.
> Error occurs if add bash or coreutils or any packages, that are in
> DUMMYPROVIDES, into IMAGE_INSTALL.
> 
> My test rev: warrior:048c1467e2e077076213ec01c4f0d1f181434e4c
> 
> How to reproduce:
> 1. Change package class to 'deb' (build passed with 'rpm' but failed with
> 'deb'):
>    PACKAGE_CLASSES ?= "package_deb"
> 2. Add 'bash' to IMAGE_INSTALL:
>    IMAGE_INSTALL_append = " bash"
> 3. Build SDK with "bitbake -c populate_sdk core-image-base".
>    (Build will pass if use "bitbake meta-toolchain" instead)
> 
> Error: 
> --
> ERROR: core-image-base-1.0-r0 do_populate_sdk: Unable to install packages.
> Command
> '/home/trungdt/build-po/tmp/work/qemuarm-poky-linux-gnueabi/core-image-base
> /1.0-r0/recipe-sysroot-native/usr/bin/apt-get  install --force-yes
> --allow-unauthenticated bash packagegroup-base-extended
> packagegroup-core-boot packagegroup
> -core-standalone-sdk-target psplash run-postinsts target-sdk-provides-dummy'
> returned 100:
> Reading package lists...     
> Building dependency tree...                         
> Some packages could not be installed. This may mean that you have
> requested an impossible situation or if you are using the unstable
> distribution that some required packages have not yet been created
> or been moved out of Incoming.
> The following information may help to resolve the situation:
> 
> The following packages have unmet dependencies:
>  target-sdk-provides-dummy : Conflicts: bash
> E: Unable to correct problems, you have held broken packages.
> --
> 
> Thanks,
> Trung

This is still reproducible in master:29bfa17d6cab31dbf8f1d12e473ef83dd9e92519.
Comment 7 Paul Eggleton 2020-11-19 02:40:56 UTC
The linked patch does not look like it fixes the reported issue. Reopening for attention.
Comment 8 akuster 2021-01-14 16:07:26 UTC
At this point, no other work for this issue will be done.
Comment 9 Randy MacLeod 2021-10-28 15:09:42 UTC
See also https://bugzilla.yoctoproject.org/show_bug.cgi?id=14066
Comment 10 Randy MacLeod 2021-12-21 00:56:05 UTC
I suspect we should close this but I'm bumping it to M2 and will try to look at it when I have more time.
Comment 11 Trevor Woerner 2022-10-27 16:57:59 UTC
confirming that this issue appears to still exist

Build Configuration:
BB_VERSION           = "2.2.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "universal"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "4.1"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "master:cba4d320dc410ab68d01caab8fbc72bda80c27db"

ERROR: core-image-base-1.0-r0 do_populate_sdk: Unable to install packages. Command '/z/build-master/poky-qemux86-64/build/tmp/work/qemux86_64-poky-linux/core-image-base/1.0-r0/recipe-sysroot-native/usr/bin/apt-get  install --allow-downgrades --allow-remove-essential --allow-change-held-packages --allow-unauthenticated --no-remove  bash packagegroup-base-extended packagegroup-core-boot packagegroup-core-standalone-sdk-target psplash run-postinsts target-sdk-provides-dummy' returned 100:
Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 target-sdk-provides-dummy : Conflicts: bash
E: Unable to correct problems, you have held broken packages.
Comment 12 Trevor Woerner 2022-10-28 00:24:25 UTC
I would also like to point out that the above-suggested patches do
not seem to fix the issue since, at this point, they are already
integrated into the code; yet the error persists.
Comment 13 Thomas Roos 2023-09-29 14:06:27 UTC
Did just try to reproduce on master:
ubuntu@ip-172-31-25-148:~/data/yocto/yocto_master/build$ bitbake core-image-minimal -c populate_sdk                                                                                                                                                                                       
WARNING: You have included the meta-virtualization layer, but 'virtualization' has not been enabled in your DISTRO_FEATURES. Some bbappend files may not take effect. See the meta-virtualization README for details on enabling virtualization support.                                  
Loading cache: 100% |                                                                                                                                                                                                                                                     | ETA:  --:--:--
Loaded 0 entries from dependency cache.                                                                                                                                                                                                                                                   
Parsing recipes: 100% |####################################################################################################################################################################################################################################################| Time: 0:00:14
Parsing of 2927 .bb files complete (0 cached, 2927 parsed). 4753 targets, 146 skipped, 2 masked, 0 errors.                                                                                                                                                                                
NOTE: Resolving any missing task queue dependencies                                                                                                                                                                                                                                       
NOTE: Multiple providers are available for runtime ssh (dropbear, openssh)                                                                                                                                                                                                                
Consider defining a PREFERRED_RPROVIDER entry to match ssh                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                          
Build Configuration:                                                                                                                                                                                                                                                                      
BB_VERSION           = "2.6.0"                                                                                                                                                                                                                                                            
BUILD_SYS            = "aarch64-linux"                                                                                                                                                                                                                                                    
NATIVELSBSTRING      = "universal"                                                                                                                                                                                                                                                        
TARGET_SYS           = "x86_64-poky-linux"                                                                                                                                                                                                                                                
MACHINE              = "qemux86-64"                                                                                                                                                                                                                                                       
DISTRO               = "poky"                                                                                                                                                                                                                                                             
DISTRO_VERSION       = "4.2+snapshot-3b46d6a41a466e9af7d72b414bed9115f6ae1ad0"                                                                                                                                                                                                            
TUNE_FEATURES        = "m64 core2"                                                                                                                                                                                                                                                        
TARGET_FPU           = ""                                                                                                                                                                                                                                                                 
meta                                                                                                                                                                                                                                                                                      
meta-poky                                                                                                                                                                                                                                                                                 
meta-yocto-bsp       = "master:3b46d6a41a466e9af7d72b414bed9115f6ae1ad0"                                                                                                                                                                                                                  
meta-oe                                                                                                                                                                                                                                                                                   
meta-python                                                                                                                                                                                                                                                                               
meta-networking                                                                                                                                                                                                                                                                           
meta-multimedia                                                                                                                                                                                                                                                                           
meta-filesystems     = "master:41d6c0f7fc59569e3c3e1d501d5f6d735227721f"                                                                                                                                                                                                                  
meta-virtualization  = "master:ccddfb1f8b68cf9ab21bd416480f79d44a0a30f4"                                                                                                                                                                                                                  
meta-aws             = "2023-09-13_00-13-33_master-next_s2n:6075ebb9394007242e11819ad3ec0d7a0456c47c"                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                          
Initialising tasks: 100% |#################################################################################################################################################################################################################################################| Time: 0:00:02
Sstate summary: Wanted 2662 Local 0 Mirrors 0 Missed 2662 Current 0 (0% match, 0% complete)                                                                                                                                                                                               
Removing 172 stale sstate objects for arch qemux86_64: 100% |##############################################################################################################################################################################################################| Time: 0:00:01
Removing 742 stale sstate objects for arch core2-64: 100% |################################################################################################################################################################################################################| Time: 0:00:02
Removing 566 stale sstate objects for arch aarch64: 100% |#################################################################################################################################################################################################################| Time: 0:00:01
Removing 38 stale sstate objects for arch allarch: 100% |##################################################################################################################################################################################################################| Time: 0:00:00
NOTE: Executing Tasks
WARNING: freetype-2.13.2-r0 do_fetch: Failed to fetch URL https://download.savannah.nongnu.org/releases/freetype/freetype-2.13.2.tar.xz, attempting MIRRORS if available
NOTE: Tasks Summary: Attempted 5934 tasks of which 14 didn't need to be rerun and all succeeded.

-> do I miss something?
Comment 14 Pavel Zhukov 2023-10-02 05:53:21 UTC
The issue is still there.
Easily reproducible with:

PACKAGE_CLASSES = "package_deb"
IMAGE_INSTALL:append = " bash"

$ bitbake -c populate_sdk core-image-minimal

Build Configuration:
BB_VERSION           = "2.6.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "gentoo-2.14"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "4.2+snapshot-3edb9acca18171894771c36c19b0c2e905852ce5"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta                 
meta-poky            
meta-yocto-bsp       = "master:3edb9acca18171894771c36c19b0c2e905852ce5"


ERROR: core-image-minimal-1.0-r0 do_populate_sdk: Unable to install packages. Command '/mnt/builds/yocto/builds/build-sdk/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/recipe-sysroot-native/usr/bin/apt-get  install --allow-downgrades --allow-remove-essential --allow-change-held-packages --allow-unauthenticated --no-remove  bash packagegroup-core-boot packagegroup-core-standalone-sdk-target run-postinsts target-sdk-provides-dummy' returned 100:
Reading package lists...
Building dependency tree...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 target-sdk-provides-dummy : Conflicts: bash
E: Unable to correct problems, you have held broken packages.

ERROR: Logfile of failure stored in: /mnt/builds/yocto/builds/build-sdk/tmp/work/qemux86_64-poky-linux/core-image-minimal/1.0/temp/log.do_populate_sdk.3528087
ERROR: Task (/mnt/builds/yocto/sources/meta/recipes-core/images/core-image-minimal.bb:do_populate_sdk) failed with exit code '1'
Comment 15 Pavel Zhukov 2023-10-02 08:58:00 UTC
This bug as well as 14066 might be worked around with simple patch but that will not fix 14995 which has same root cause but it's more complicated. Still working of the 14995 to not submit workarounds instead of proper fixes.
Comment 16 Randy MacLeod 2024-10-31 15:09:21 UTC
Bulk move of 5.1 bugs to 5.2. -- YP bug review (Randy)