summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/useradd.bbclass4
-rw-r--r--meta/lib/oeqa/selftest/cases/usergrouptests.py17
2 files changed, 20 insertions, 1 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 4d3bd9a5f5..a4b8a2d6d6 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -177,9 +177,11 @@ SYSROOT_PREPROCESS_FUNCS += "${SYSROOTFUNC}"
177 177
178SSTATEPREINSTFUNCS:append:class-target = " useradd_sysroot_sstate" 178SSTATEPREINSTFUNCS:append:class-target = " useradd_sysroot_sstate"
179 179
180USERADD_DEPENDS ??= ""
181DEPENDS += "${USERADD_DEPENDS}"
180do_package_setscene[depends] += "${USERADDSETSCENEDEPS}" 182do_package_setscene[depends] += "${USERADDSETSCENEDEPS}"
181do_populate_sysroot_setscene[depends] += "${USERADDSETSCENEDEPS}" 183do_populate_sysroot_setscene[depends] += "${USERADDSETSCENEDEPS}"
182USERADDSETSCENEDEPS:class-target = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene pseudo-native:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene" 184USERADDSETSCENEDEPS:class-target = "${MLPREFIX}base-passwd:do_populate_sysroot_setscene pseudo-native:do_populate_sysroot_setscene shadow-native:do_populate_sysroot_setscene ${MLPREFIX}shadow-sysroot:do_populate_sysroot_setscene ${@' '.join(['%s:do_populate_sysroot_setscene' % pkg for pkg in d.getVar("USERADD_DEPENDS").split()])}"
183USERADDSETSCENEDEPS = "" 185USERADDSETSCENEDEPS = ""
184 186
185# Recipe parse-time sanity checks 187# Recipe parse-time sanity checks
diff --git a/meta/lib/oeqa/selftest/cases/usergrouptests.py b/meta/lib/oeqa/selftest/cases/usergrouptests.py
new file mode 100644
index 0000000000..98e8102590
--- /dev/null
+++ b/meta/lib/oeqa/selftest/cases/usergrouptests.py
@@ -0,0 +1,17 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7from oeqa.selftest.case import OESelftestTestCase
8from oeqa.utils.commands import bitbake
9
10class UserGroupTests(OESelftestTestCase):
11 def test_group_from_dep_package(self):
12 self.logger.info("Building creategroup2")
13 bitbake(' creategroup2 creategroup1')
14 bitbake(' creategroup2 creategroup1 -c clean')
15 self.logger.info("Packaging creategroup2")
16 self.assertTrue(bitbake(' creategroup2 -c package'))
17