Re: [yocto] Postinstallation script warnings in Yocto 2.4 Rocko
On 02/12/2018 01:40 PM, Diaz de Grenu, Jose wrote: Can you detail how this would be done? Is it possible to append to 'log_check_expected_regex' from the .bb recipe that generates the warning? Or the only option is to patch the poky layer? Is there any way to remove these warnings in rocko without modifying the poky layer? (I cannot modify community layers) You need to patch the layer, yes. But you can also send the patch to oe-core list, and it would be much less invasive than backporting the postinst_intercept stuff. Alex -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Postinstallation script warnings in Yocto 2.4 Rocko
> You can set self.log_check_expected_regexes in RpmRootfs class in > meta/lib/oe/rootfs.py, but > > a) depending on how broad your regex is, you might suppress real failures of > the scriptlets; > > b) it would be only your local hack until the issue is resolved properly. > > Alex Can you detail how this would be done? Is it possible to append to 'log_check_expected_regex' from the .bb recipe that generates the warning? Or the only option is to patch the poky layer? Is there any way to remove these warnings in rocko without modifying the poky layer? (I cannot modify community layers) Thanks. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Postinstallation script warnings in Yocto 2.4 Rocko
On 01/17/2018 07:10 PM, Diaz de Grenu, Jose wrote: The patches work, but I was wondering if we really need to mark this behavior as a WARNING. From my point of view, this may be confusing for a user, as it could lead to think that something is wrong. But I think that, even if image post processing during the build is preferable, there are some image post processing that just cannot be done there. Think for example of any HW identifier, like a MAC address that you might want to use. I think a bb.note should be enough. At least an option per recipe to skip the warning, so that expected on-target-postprocessing warnings can be hidden. I agree, I'll change it to a note. The excessive use of bb.warn pre-dates my patchset though. I'll resend the patchset tomorrow. Also, is there any chance this could end up in rocky? As it is, any postprocessing for the target causes ugly WARNINGS with '-1 error code' messages. Thanks again for the patches! First, let's get it to master. I had a bit of trouble convincing the community that this needs to be done last time (about one year ago), so I appreciate the support :) Alex -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Postinstallation script warnings in Yocto 2.4 Rocko
-Original Message- From: Alexander Kanavin [mailto:alexander.kana...@linux.intel.com] Sent: Monday, January 8, 2018 1:20 PM On 01/08/2018 01:44 PM, Diaz de Grenu, Jose wrote: > > Thanks for the information. I guess this fix will be for Yocto 2.5? > Maybe; I'm working right now on the patchset, and will post it to oe-core > list later today. Last time it was a bit controversial, so I'd appreciate if > you a) try and test it; b) express your > support for the changes ;) > Work in progress here: > https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4-postinst-fix Unfortunately I am not able to follow the conversation in oe-core, as I subscribed after you sent the patchset. I have tested your patchset by cherry-picking the commits to the rocko branch. There was only a minor conflict. With those changes I get a message like this: WARNING: core-image-base-1.0-r0 do_rootfs: The postinstalls for the following packages will be postponed for first boot: init-ifupdown u-boot-fw-utils The patches work, but I was wondering if we really need to mark this behavior as a WARNING. From my point of view, this may be confusing for a user, as it could lead to think that something is wrong. But I think that, even if image post processing during the build is preferable, there are some image post processing that just cannot be done there. Think for example of any HW identifier, like a MAC address that you might want to use. I think a bb.note should be enough. At least an option per recipe to skip the warning, so that expected on-target-postprocessing warnings can be hidden. Also, is there any chance this could end up in rocky? As it is, any postprocessing for the target causes ugly WARNINGS with '-1 error code' messages. Thanks again for the patches! -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Postinstallation script warnings in Yocto 2.4 Rocko
On 01/08/2018 02:31 PM, Martin Hundebøll wrote: On 2018-01-08 13:19, Alexander Kanavin wrote: The problem is that in Yocto 2.4 then any build which requires on-target postinstallation script is going to trigger warning, even if it is completely correct. Is there no way around this? Is there a way to at least hide them? You can set self.log_check_expected_regexes in RpmRootfs class in meta/lib/oe/rootfs.py, but a) depending on how broad your regex is, you might suppress real failures of the scriptlets; b) it would be only your local hack until the issue is resolved properly. Would changing to dpkg/opkg be a work-around? A workaround for the annoying warning, maybe, a work-around for the issue at hand (how to defer to first boot), no. Alex -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Postinstallation script warnings in Yocto 2.4 Rocko
On 2018-01-08 13:19, Alexander Kanavin wrote: The problem is that in Yocto 2.4 then any build which requires on-target postinstallation script is going to trigger warning, even if it is completely correct. Is there no way around this? Is there a way to at least hide them? You can set self.log_check_expected_regexes in RpmRootfs class in meta/lib/oe/rootfs.py, but a) depending on how broad your regex is, you might suppress real failures of the scriptlets; b) it would be only your local hack until the issue is resolved properly. Would changing to dpkg/opkg be a work-around? -- MARTIN HUNDEBØLL, Prevas A/S Software Developer Hedeager 3, DK-8200 Aarhus N Phone +45 87438070 Mobile +45 25562438 martin.hundeb...@prevas.dk www.prevas.com -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Postinstallation script warnings in Yocto 2.4 Rocko
On 01/08/2018 01:44 PM, Diaz de Grenu, Jose wrote: Thanks for the information. I guess this fix will be for Yocto 2.5? Maybe; I'm working right now on the patchset, and will post it to oe-core list later today. Last time it was a bit controversial, so I'd appreciate if you a) try and test it; b) express your support for the changes ;) Work in progress here: https://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=akanavin/dnf-rpm4-postinst-fix The problem is that in Yocto 2.4 then any build which requires on-target postinstallation script is going to trigger warning, even if it is completely correct. Is there no way around this? Is there a way to at least hide them? You can set self.log_check_expected_regexes in RpmRootfs class in meta/lib/oe/rootfs.py, but a) depending on how broad your regex is, you might suppress real failures of the scriptlets; b) it would be only your local hack until the issue is resolved properly. Alex -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Postinstallation script warnings in Yocto 2.4 Rocko
-Original Message- From: Alexander Kanavin [mailto:alexander.kana...@linux.intel.com] On 01/08/2018 11:14 AM, Diaz de Grenu, Jose wrote: > Nope, 'exit 1' is the currently correct way to defer to first boot. On the > other hand, it's also a correct way to indicate that the script has failed, > and rpm is right in reporting it as such. This is a design defect in Yocto, > and I plan to fix it, so that instead you would simply write your fragment as > follows: > > > pkg_postinst_ontarget_PACKAGENAME() { ># Actions to carry out on the device go here > > } Thanks for the information. I guess this fix will be for Yocto 2.5? The problem is that in Yocto 2.4 then any build which requires on-target postinstallation script is going to trigger warning, even if it is completely correct. Is there no way around this? Is there a way to at least hide them? Thanks again. -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Postinstallation script warnings in Yocto 2.4 Rocko
On 01/08/2018 11:14 AM, Diaz de Grenu, Jose wrote: I am trying to create a recipe with a post installation script. I am using the following fragment of code (as documented in http://www.yoctoproject.org/docs/2.4/mega-manual/mega-manual.html#new-recipe-post-installation-scripts ): pkg_postinst_PACKAGENAME() { if [ x"$D" = "x" ]; then # Actions to carry out on the device go here else exit 1 fi } This was working fine in Yocto 2.2, but now in Yocto 2.4 I am getting these warnings: WARNING: core-image-base-1.0-r0 do_rootfs: [log_check] core-image-base: found 3 warning messages in the logfile: [log_check] warning: %post(init-ifupdown-1.0-r7.0.cortexa7hf_neon) scriptlet failed, exit status 1 How can I clean these warnings in Yocto 2.4? Is that still the correct way to create post installation script that must run on the target? Should I just replace 'exit 1' by 'exit 0'? Nope, 'exit 1' is the currently correct way to defer to first boot. On the other hand, it's also a correct way to indicate that the script has failed, and rpm is right in reporting it as such. This is a design defect in Yocto, and I plan to fix it, so that instead you would simply write your fragment as follows: pkg_postinst_ontarget_PACKAGENAME() { # Actions to carry out on the device go here } Alex -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Postinstallation script warnings in Yocto 2.4 Rocko
Hi, I posted this question in the poky mailing list, but I realize now that this may be the correct place for it. Sorry for reposting. I am trying to create a recipe with a post installation script. I am using the following fragment of code (as documented in http://www.yoctoproject.org/docs/2.4/mega-manual/mega-manual.html#new-recipe-post-installation-scripts ): pkg_postinst_PACKAGENAME() { if [ x"$D" = "x" ]; then # Actions to carry out on the device go here else exit 1 fi } This was working fine in Yocto 2.2, but now in Yocto 2.4 I am getting these warnings: WARNING: core-image-base-1.0-r0 do_rootfs: [log_check] core-image-base: found 3 warning messages in the logfile: [log_check] warning: %post(init-ifupdown-1.0-r7.0.cortexa7hf_neon) scriptlet failed, exit status 1 How can I clean these warnings in Yocto 2.4? Is that still the correct way to create post installation script that must run on the target? Should I just replace 'exit 1' by 'exit 0'? Thanks -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto