]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
useradd: Fix useradd do_populate_sysroot dependency bug
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 9 Dec 2023 15:28:11 +0000 (15:28 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 10 Dec 2023 09:23:58 +0000 (09:23 +0000)
commit564339afb73fc52a66c1a08437587cad1c4d46e7
tree32db0a58c476e5c00b2128a3a8823eb4adf3dc2e
parent4c31cc114f2cf13c11b7ffd60db0eda1b63cc27b
useradd: Fix useradd do_populate_sysroot dependency bug

If a task is adde which has a dependency on the do_populate_sysroot task of
the recipe, it will cause it to be installed into the sysroot (similar to
do_addto_recipe_sysroot). This fails since the postinst script is an overlapping
file:

Exception: FileExistsError: [Errno 17] File exists:
'tmp/sysroots-components/all/useraddbadtask/usr/bin/postinst-useradd-useraddbadtask'
  ->
'tmp/work/all-poky-linux/useraddbadtask/1.0/recipe-sysroot/usr/bin/postinst-useradd-useraddbadtask'

The copy written out at do_prepare_recipe_sysroot time is just for debug so
rename it, meaning there are no longer overlapping files and the installation
can be successful, removing the error.

[YCOTO #14961]

With the bug fixed, enable the test.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/useradd.bbclass
meta/lib/oeqa/selftest/cases/usergrouptests.py