All of lore.kernel.org
 help / color / mirror / Atom feed
* "ptest-pkgs" image feature misses ptest package dependencies due to COMPLEMENTARY_GLOB ignoring all RRECOMMENDS
@ 2024-01-16  0:07 Lyu, William
  2024-01-16  8:30 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 2+ messages in thread
From: Lyu, William @ 2024-01-16  0:07 UTC (permalink / raw)
  To: openembedded-core; +Cc: MacLeod, Randy

When I try to build a core-image-minimal image with ptest for openssl installed using the following conf/local.conf modifications, the openssl-ptest is installed but with missing runtime dependencies.

    DISTRO_FEATURES:append = " ptest"
    EXTRA_IMAGE_FEATURES += " ptest-pkgs"
    PTEST_ENABLED = "1"
    IMAGE_INSTALL:append = " openssl"

When I boot the image and try to run the ptest for openssl, I get the following error complaining about missing dependencies in the output:

    # ptest-runner openssl -t 3000
    BEGIN: /usr/lib/openssl/ptest
    Can't locate File/Spec/Functions.pm in @INC ...
    ...

This error is due to package perl-module-file-spec-functions, along with some other perl-module-* packages, not being installed - these packages are missing in the .manifest file in the directory containing the built image. The dependency for these packages is as follows.

openssl-ptest --(RDEPENDS)--> perl-modules --(RRECOMMENDS)--> perl-module-file-spec-functions
                                           \-(RRECOMMENDS)--> some other perl-module-* packages

"ptest-pkgs" along with various other image features are defined as COMPLEMENTARY_GLOB in meta/classes-recipe/populate_sdk_base.bbclass in openembedded-core:

    COMPLEMENTARY_GLOB[ptest-pkgs] = '*-ptest ${MLPREFIX}ptest-runner'

Following this patch to package_manager referenced by link https://lists.openembedded.org/g/openembedded-core/message/167303, recommends relationships (set via RRECOMMENDS) are always ignored when installing complementary packages [1]. This causes the necessary runtime dependencies for openssl-ptest not being installed. I am not sure if this issue only pertains to openssl-ptest.

Note that, if I follow the alternative "more selective" [2] way to include the tests (see the following sample conf/local.conf), I can properly install openssl-ptest with all dependencies, as openssl-ptest is now explicitly declared as package-to-be-installed instead of implicitly discovered via the COMPLEMENTARY_GLOB "ptest-pkgs". I would say that this means that "ptest-pkgs" is not very robust to use.

    DISTRO_FEATURES:append = " ptest"
    PTEST_ENABLED = "1"
    IMAGE_INSTALL:append = " openssl openssl-ptest"

[1] https://docs.yoctoproject.org/dev/ref-manual/variables.html#term-COMPLEMENTARY_GLOB
[2] https://wiki.yoctoproject.org/wiki/Ptest#Adding_ptest_to_your_build

William


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [OE-core] "ptest-pkgs" image feature misses ptest package dependencies due to COMPLEMENTARY_GLOB ignoring all RRECOMMENDS
  2024-01-16  0:07 "ptest-pkgs" image feature misses ptest package dependencies due to COMPLEMENTARY_GLOB ignoring all RRECOMMENDS Lyu, William
@ 2024-01-16  8:30 ` Alexander Kanavin
  0 siblings, 0 replies; 2+ messages in thread
From: Alexander Kanavin @ 2024-01-16  8:30 UTC (permalink / raw)
  To: william.lyu; +Cc: openembedded-core, MacLeod, Randy

Yes, ptest-pkgs is not tested anywhere, and so isn't guaranteed to
work. But if you can fix it, that'd be welcome.

Alex

On Tue, 16 Jan 2024 at 01:07, Lyu, William via lists.openembedded.org
<william.lyu=windriver.com@lists.openembedded.org> wrote:
>
> When I try to build a core-image-minimal image with ptest for openssl installed using the following conf/local.conf modifications, the openssl-ptest is installed but with missing runtime dependencies.
>
>     DISTRO_FEATURES:append = " ptest"
>     EXTRA_IMAGE_FEATURES += " ptest-pkgs"
>     PTEST_ENABLED = "1"
>     IMAGE_INSTALL:append = " openssl"
>
> When I boot the image and try to run the ptest for openssl, I get the following error complaining about missing dependencies in the output:
>
>     # ptest-runner openssl -t 3000
>     BEGIN: /usr/lib/openssl/ptest
>     Can't locate File/Spec/Functions.pm in @INC ...
>     ...
>
> This error is due to package perl-module-file-spec-functions, along with some other perl-module-* packages, not being installed - these packages are missing in the .manifest file in the directory containing the built image. The dependency for these packages is as follows.
>
> openssl-ptest --(RDEPENDS)--> perl-modules --(RRECOMMENDS)--> perl-module-file-spec-functions
>                                            \-(RRECOMMENDS)--> some other perl-module-* packages
>
> "ptest-pkgs" along with various other image features are defined as COMPLEMENTARY_GLOB in meta/classes-recipe/populate_sdk_base.bbclass in openembedded-core:
>
>     COMPLEMENTARY_GLOB[ptest-pkgs] = '*-ptest ${MLPREFIX}ptest-runner'
>
> Following this patch to package_manager referenced by link https://lists.openembedded.org/g/openembedded-core/message/167303, recommends relationships (set via RRECOMMENDS) are always ignored when installing complementary packages [1]. This causes the necessary runtime dependencies for openssl-ptest not being installed. I am not sure if this issue only pertains to openssl-ptest.
>
> Note that, if I follow the alternative "more selective" [2] way to include the tests (see the following sample conf/local.conf), I can properly install openssl-ptest with all dependencies, as openssl-ptest is now explicitly declared as package-to-be-installed instead of implicitly discovered via the COMPLEMENTARY_GLOB "ptest-pkgs". I would say that this means that "ptest-pkgs" is not very robust to use.
>
>     DISTRO_FEATURES:append = " ptest"
>     PTEST_ENABLED = "1"
>     IMAGE_INSTALL:append = " openssl openssl-ptest"
>
> [1] https://docs.yoctoproject.org/dev/ref-manual/variables.html#term-COMPLEMENTARY_GLOB
> [2] https://wiki.yoctoproject.org/wiki/Ptest#Adding_ptest_to_your_build
>
> William
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#193807): https://lists.openembedded.org/g/openembedded-core/message/193807
> Mute This Topic: https://lists.openembedded.org/mt/103752398/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-16  8:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16  0:07 "ptest-pkgs" image feature misses ptest package dependencies due to COMPLEMENTARY_GLOB ignoring all RRECOMMENDS Lyu, William
2024-01-16  8:30 ` [OE-core] " Alexander Kanavin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.