Andrew Geissler <[email protected]> escreveu no dia quarta, 2/08/2023 à(s) 17:08:
> On Wed, Aug 2, 2023 at 06:38 AM, Bruce Ashfield wrote: > > On Wed, Aug 2, 2023 at 9:15 AM Joel Stanley <[email protected]> wrote: > > On Wed, 2 Aug 2023 at 12:45, Frédéric Martinsons > <[email protected]> wrote: > > > > On Wed, 2 Aug 2023 at 13:47, Joel Stanley <[email protected]> wrote: > > The one liner tests using `[ ] && action` need to have || true after the > action, > otherwise the line returns false and the recipie fails. > > Signed-off-by: Joel Stanley <[email protected]> > --- > meta/classes-recipe/kernel.bbclass | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/meta/classes-recipe/kernel.bbclass > b/meta/classes-recipe/kernel.bbclass > index 247ef4a48aa7..f1bc41e82be8 100644 > --- a/meta/classes-recipe/kernel.bbclass > +++ b/meta/classes-recipe/kernel.bbclass > @@ -486,7 +486,7 @@ kernel_do_install() { > install -m 0644 System.map > ${D}/${KERNEL_IMAGEDEST}/System.map-${KERNEL_VERSION} > install -m 0644 .config ${D}/${KERNEL_IMAGEDEST}/config-${KERNEL_VERSION} > install -m 0644 vmlinux ${D}/${KERNEL_IMAGEDEST}/vmlinux-${KERNEL_VERSION} > - [ -e Module.symvers ] && install -m 0644 Module.symvers > ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION} > + [ -e Module.symvers ] && install -m 0644 Module.symvers > ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION} || true > } > > By doing that, you simply silent possible error of the action after the > test, below is a little snippet showing that > > Sure. But the test is looking for the file, so if it doesn't exist > then the command install won't run. > > I think using an if solves the issue: if [ -e Module.symvers ]; then install -m 0644 Module.symvers ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION} fi or something to invert the logic: ! [ -e Module.symvers ] || install -m 0644 Module.symvers ${D}/${KERNEL_IMAGEDEST}/Module.symvers-${KERNEL_VERSION} Jose Something doesn't seem quite right, that test for Module.symvers (there > and in the shared workdir code) were put in place for the scenario > you are mentioning .. if Modules are disabled and hence Module.symvers > doesn't > exist. > > At one point, we even tested that sort of configuration. > > I didn't dig more through the logs, but maybe we had lines after that > command > previously, so the last return code wasn't a failure and hence no task > failure. > > Yep, this is what happened, there used to be these 2 lines after it: > > install -d ${D}${sysconfdir}/modprobe.d > install -d ${D}${sysconfdir}/modules-load.d > > > > https://gerrit.openbmc.org/c/openbmc/openbmc/+/65313/3/poky/meta/classes-recipe/kernel.bbclass > > Once these were removed we started hitting this failure over in OpenBMC. > > > -- Best regards, José Quaresma
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#185416): https://lists.openembedded.org/g/openembedded-core/message/185416 Mute This Topic: https://lists.openembedded.org/mt/100503145/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
