Bug 10629 - package brought in by runtime dependency of a complementary package does not have its own complementary package installed
Summary: package brought in by runtime dependency of a complementary package does not ...
Status: RESOLVED WORKSFORME
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 2.2
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 4.99
Assignee: Unassigned
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-11-09 06:42 UTC by Chen Qi
Modified: 2022-10-19 03:54 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chen Qi 2016-11-09 06:42:29 UTC
When we have 'pkgs-dbg' or 'pkgs-ptest' in IMAGE_FEATURES, we would expect that if a package is installed on target at rootfs time, its complementary packages (in this case *-dbg and *-ptest) are also installed.

However, this is not the case. Let's look at an example that breaks the above expectation.

1. Add in local.conf:
EXTRA_IMAGE_FEATURES += "pkgs-dbg pkgs-ptest"
IMAGE_INSTALL_append = " rsyslog"

2. bitbake core-image-minimal

3. Check the image to see if valgrind is installed, and if valgrind-dbg is installed or not.

The result of the above example is that valgrind is installed, but valgrind-dbg is not installed.
This is because valgrind is a runtime dependency for rsyslog-ptest.

So in summary, our complementary package handling has the following flaw.
If B is brought in by A's complementary package's runtime dependency, then B's complementary packages are not installed.
Comment 1 Jose Perez C 2016-12-21 18:19:22 UTC
This is making ptest fail for valgrind on commit 573c646d4cc62dcd0c230381df4940bdf314d495

---------------------------------------
BEGIN: /usr/lib/valgrind/ptest
ERROR: Exit status is 32256
END: /usr/lib/valgrind/ptest
----------------------------------------
Comment 2 Mark 2022-10-15 19:04:47 UTC
Chin Qi, I am tempted to mark this as RESOLVED, for a few reasons. 

1. First and foremost this does not appear to be a problem any longer. Use your example, but first do a build before adding 'rsyslog' to the image you will find no 'curl' or related packages in the rootfs. Then add 'rsyslog' to the image and build core-image-minimal again, 'curl', 'curl-dbg' and 'curl-ptest' are all included in the image now. 'curl' is a RDEPENDS of rsyslog-ptest *only* so complimentary packages are being included. (I use curl since valgrind is not a dependency of rsyslog-ptest)

2. As far as I can tell at the time you raised the bug 'valgrind' was not an RDEPENDS of rsyslog-ptest, it was a RRECOMMENDS -- RRECOMMENDS_${PN}-ptest += "${TCLIBC}-dbg ${VALGRIND}" -- so I suspect the bug might have been more related to the rsyslog recipe than the images classes and the use of image features.

Unless you can show otherwise I will mark this as RESOLVED shortly.
Comment 3 Chen Qi 2022-10-17 02:24:01 UTC
(In reply to comment #2)
> Chin Qi, I am tempted to mark this as RESOLVED, for a few reasons. 
> 
> 1. First and foremost this does not appear to be a problem any longer. Use
> your example, but first do a build before adding 'rsyslog' to the image you
> will find no 'curl' or related packages in the rootfs. Then add 'rsyslog' to
> the image and build core-image-minimal again, 'curl', 'curl-dbg' and
> 'curl-ptest' are all included in the image now. 'curl' is a RDEPENDS of
> rsyslog-ptest *only* so complimentary packages are being included. (I use
> curl since valgrind is not a dependency of rsyslog-ptest)
> 
> 2. As far as I can tell at the time you raised the bug 'valgrind' was not an
> RDEPENDS of rsyslog-ptest, it was a RRECOMMENDS -- RRECOMMENDS_${PN}-ptest
> += "${TCLIBC}-dbg ${VALGRIND}" -- so I suspect the bug might have been more
> related to the rsyslog recipe than the images classes and the use of image
> features.
> 
> Unless you can show otherwise I will mark this as RESOLVED shortly.

The issue is about dependencies of complementary packages.
e.g.
A's complementary package A-dev depends on B. Then B-dev is not not installed. That's the problem.

The rsyslog & curl example above is the case that has always been supported. That is, if A depends on B, then A-dev and B-dev are both installed.

Above stated, this is not a serious bug. In fact, if we add some doc, I think the current situation is acceptable.
Comment 4 Mark 2022-10-19 03:54:43 UTC
Per my previous comment I suspect the issue was related to the rsyslog recipe and how it ended up including valgrind.

If you perform the same test today, configuring with

EXTRA_IMAGE_FEATURES += "ptest-pkgs dbg-pkgs"
IMAGE_INSTALL:append = " rsyslog"

you will get for example 'nettle-dbg' and 'nettle-ptest' installed in the rootfs. This is an indirect dependency as the reporter had stipulated, ie. rsyslog -> librelp -> gnutls -> nettle.

I see no changes which would have caused this to go from working to not working, again the suspect changes which might have caused the conditions to raise this bug are most likely related to the syslog recipe.