summaryrefslogtreecommitdiffstats
path: root/meta/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-09 15:28:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-12-10 09:24:01 +0000
commit4bb222e0d71a4cb159b8a4f1a90b65b1af32ac10 (patch)
tree9b8d19fd97cb34838c0b108667371019a357ba41 /meta/lib
parent61805f6d60a33045546a5657a9c9f3b899a209b2 (diff)
downloadpoky-4bb222e0d71a4cb159b8a4f1a90b65b1af32ac10.tar.gz
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. (From OE-Core rev: 564339afb73fc52a66c1a08437587cad1c4d46e7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib')
-rw-r--r--meta/lib/oeqa/selftest/cases/usergrouptests.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/meta/lib/oeqa/selftest/cases/usergrouptests.py b/meta/lib/oeqa/selftest/cases/usergrouptests.py
index f6a40b21e7..a331ca9f2c 100644
--- a/meta/lib/oeqa/selftest/cases/usergrouptests.py
+++ b/meta/lib/oeqa/selftest/cases/usergrouptests.py
@@ -18,11 +18,9 @@ class UserGroupTests(OESelftestTestCase):
18 self.logger.info("Packaging creategroup2") 18 self.logger.info("Packaging creategroup2")
19 self.assertTrue(bitbake(' creategroup2 -c package')) 19 self.assertTrue(bitbake(' creategroup2 -c package'))
20 20
21 def _test_add_task_between_p_sysroot_and_package(self): 21 def test_add_task_between_p_sysroot_and_package(self):
22 self.logger.info("Cleaning sstate for useraddbadtask") 22 # Test for YOCTO #14961
23 self.logger.info("Building useraddbadtask") 23 self.assertTrue(bitbake('useraddbadtask -C fetch'))
24 # fails due to bug #14961
25 self.assertTrue(bitbake(' useraddbadtask -C fetch'))
26 24
27 def test_static_useradd_from_dynamic(self): 25 def test_static_useradd_from_dynamic(self):
28 metaselftestpath = get_test_layer() 26 metaselftestpath = get_test_layer()