Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-26 Thread Alexander Kanavin
On Thu, 26 Aug 2021 at 11:23, Robert P. J. Day wrote: > so, just to confirm the previous tidbits of information (thank you > for your patience), here's my current understanding so i can submit > updated docs: > > * pkg_postinst:${PN} is run at image creation time and *only* at image > creatio

Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-26 Thread Robert P. J. Day
On Thu, 26 Aug 2021, Alexander Kanavin wrote: > It used to be that 'exit 1' was the way to defer to boot time, but > that was changed long time ago to not be ambiguous like that and > cause a real failure at build time. Deferring to first boot needs to > be explicitly requested with _ontarget() (y

Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-26 Thread Robert P. J. Day
On Thu, 26 Aug 2021, Alexander Kanavin wrote: > It used to be that 'exit 1' was the way to defer to boot time, but > that was changed long time ago to not be ambiguous like that and > cause a real failure at build time. Deferring to first boot needs to > be explicitly requested with _ontarget() (y

Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-25 Thread Alexander Kanavin
It used to be that 'exit 1' was the way to defer to boot time, but that was changed long time ago to not be ambiguous like that and cause a real failure at build time. Deferring to first boot needs to be explicitly requested with _ontarget() (you can read the definition for it to see what really ha

Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-25 Thread Robert P. J. Day
Quoting Phil Blundell : That's testing for offline installation. If $D is not set, it's running on the target. p. one last query before i head off for dinner ... so what about pkg_postinst() routines that do double duty, like this one from dbus_1.12.20.bb: PACKAGE_WRITE_DEPS += "${@bb.

Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-25 Thread Alexander Kanavin
_ontarget() is basically syntactic sugar for $D test, but yes it's the new preferred form. If you see $D, that means the recipe hasn't been converted. Alex On Wed, 25 Aug 2021 at 23:27, Robert P. J. Day wrote: > > Quoting Phil Blundell : > > > That's testing for offline installation. If $D is n

Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-25 Thread Robert P. J. Day
Quoting Phil Blundell : That's testing for offline installation. If $D is not set, it's running on the target. p. right, that's exactly what i suspected in my original posting, i just wanted to make sure, which raises a couple issues. first, that distinction doesn't seem to be mention

Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-25 Thread Phil Blundell via lists.openembedded.org
That's testing for offline installation. If $D is not set, it's running on the target. p. On 25 August 2021 22:12:22 BST, "Robert P. J. Day" wrote: > >Quoting Alexander Kanavin : > >> If you show the confusing examples, we could try to figure it out. >> >> Alex >> >> On Wed, 25 Aug 2021 at 22

Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-25 Thread Robert P. J. Day
Quoting Alexander Kanavin : If you show the confusing examples, we could try to figure it out. Alex On Wed, 25 Aug 2021 at 22:35, Robert P. J. Day wrote: there will be many more questions about pkg_postinst (and related) routines shortly, but digging into these for the first time, i thoug

Re: [OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-25 Thread Alexander Kanavin
If you show the confusing examples, we could try to figure it out. Alex On Wed, 25 Aug 2021 at 22:35, Robert P. J. Day wrote: > > there will be many more questions about pkg_postinst (and related) > routines shortly, but digging into these for the first time, i > thought that that test checked

[OE-core] what means the test 'if [ -z "$D" ]' in a pkg_postinst routine?

2021-08-25 Thread Robert P. J. Day
there will be many more questions about pkg_postinst (and related) routines shortly, but digging into these for the first time, i thought that that test checked whether the routine was being run at image creation time, or at first-time boot. now i'm not quite sure what to think after seeing sever