[OE-core] [PATCH] classes: Standardize strings tests, and join some if/then/while/do lines

Burton, Ross ross.burton at intel.com
Tue Mar 28 12:23:06 UTC 2017


On 28 March 2017 at 13:18, Robert P. J. Day <rpjday at crashcourse.ca> wrote:

>   ok, i thought i knew what you meant but now, i'm just drawing a
> blank. in what way is that not testing for a non-empty string as the
> value of D? what painfully obvious clue am i missing?
>

The gconf_postinst is shell to be executed in the package management
postinst code, so either at rootfs time, or first boot for the ones that
didn't work at rootfs, or when the package is installed on the target.

The postinst can tell those apart by inspecting the value of the
environment variable $D, which if set means the postinst is running on the
host in the rootfs context, so should prefix all paths with $D.

$D *needs* to be fetched from the environment when the script is executing,
and using ${D} will result in *bitbake* expanding it whilst writing the
package, where it is the path to the package staging directory.

(yes, using a different variable name that wasn't overloaded wouldn't cause
this problem)

Ross
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20170328/7c66c3c8/attachment-0002.html>


More information about the Openembedded-core mailing list