]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
staging: Fix rare sysroot corruption issue
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 May 2022 10:12:18 +0000 (11:12 +0100)
committerSteve Sakoman <steve@sakoman.com>
Sun, 22 May 2022 21:40:26 +0000 (11:40 -1000)
commit927837e29a1e79e8eeecaacc6de6b8f9e6aa6f70
treef177bf07411c0cad6334cc18aaad868eea74c91a
parent34b6d6b5f078c6948e53815af3c7b61de43d851c
staging: Fix rare sysroot corruption issue

We've seen failures on the autobuilder in oe-selftest where things which should
be in the sysroot aren't. The exact steps to reproduce the exact failure are
elusive and probably hash equivalance dependency but this set of steps does
reproduce corruption which is probably of the same origin:

Add DISTRO_FEATURES += "systemd"

  bitbake dbus

Remove DISTRO_FEATURES += "systemd"

  bitbake dbus
  bitbake dbus -c clean
  bitbake dbus -c configure

Add DISTRO_FEATURES += "systemd"

  bitbake quilt-native
  bitbake dbus -c populate_sysroot

Remove DISTRO_FEATURES += "systemd"

  bitbake dbus -c compile

Where dbus will now fail as the compiler was no longer in the sysroot.

This works by clearing x11 and other values out of DISTRO_FEATURES so the x11
dependencies are removed from the sysroot. The configure stamp remains valid so
when the original configuration is restored, it becomes valid again but a load
of the sysroot disappeared and build failures result.

Fix this by removing stamps when we remove things from the sysroot.

Depends on a change to bitbake build.py to add the clean_stamp API.

[YOCTO #14790]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit f4b1cecc82435b71135d7b65f6ea67be0e4f8c66)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
meta/classes/staging.bbclass