diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-07-28 23:28:15 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-02 15:44:10 +0100 |
commit | bb6ddc3691ab04162ec5fd69a2d5e7876713fd15 (patch) | |
tree | 76e376b01253c3aace1a98a5021bcaad3c92e861 /meta/classes/useradd.bbclass | |
parent | fcc456ee4b8f619134abb4649db53c638074082c (diff) | |
download | poky-bb6ddc3691ab04162ec5fd69a2d5e7876713fd15.tar.gz |
Convert to new override syntax
This is the result of automated script conversion:
scripts/contrib/convert-overrides.py <oe-core directory>
converting the metadata to use ":" as the override character instead of "_".
(From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/useradd.bbclass')
-rw-r--r-- | meta/classes/useradd.bbclass | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index e5f3ba24f9..fdec5cca56 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass | |||
@@ -3,7 +3,7 @@ inherit useradd_base | |||
3 | # base-passwd-cross provides the default passwd and group files in the | 3 | # base-passwd-cross provides the default passwd and group files in the |
4 | # target sysroot, and shadow -native and -sysroot provide the utilities | 4 | # target sysroot, and shadow -native and -sysroot provide the utilities |
5 | # and support files needed to add and modify user and group accounts | 5 | # and support files needed to add and modify user and group accounts |
6 | DEPENDS_append_class-target = " base-files shadow-native shadow-sysroot shadow base-passwd" | 6 | DEPENDS:append:class-target = " base-files shadow-native shadow-sysroot shadow base-passwd" |
7 | PACKAGE_WRITE_DEPS += "shadow-native" | 7 | PACKAGE_WRITE_DEPS += "shadow-native" |
8 | 8 | ||
9 | # This preinstall function can be run in four different contexts: | 9 | # This preinstall function can be run in four different contexts: |
@@ -164,16 +164,16 @@ python useradd_sysroot_sstate () { | |||
164 | } | 164 | } |
165 | 165 | ||
166 | do_prepare_recipe_sysroot[postfuncs] += "${SYSROOTFUNC}" | 166 | do_prepare_recipe_sysroot[postfuncs] += "${SYSROOTFUNC}" |
167 | SYSROOTFUNC_class-target = "useradd_sysroot_sstate" | 167 | SYSROOTFUNC:class-target = "useradd_sysroot_sstate" |
168 | SYSROOTFUNC = "" | 168 | SYSROOTFUNC = "" |
169 | 169 | ||
170 | SYSROOT_PREPROCESS_FUNCS += "${SYSROOTFUNC}" | 170 | SYSROOT_PREPROCESS_FUNCS += "${SYSROOTFUNC}" |
171 | 171 | ||
172 | SSTATEPREINSTFUNCS_append_class-target = " useradd_sysroot_sstate" | 172 | SSTATEPREINSTFUNCS:append:class-target = " useradd_sysroot_sstate" |
173 | 173 | ||
174 | do_package_setscene[depends] += "${USERADDSETSCENEDEPS}" | 174 | do_package_setscene[depends] += "${USERADDSETSCENEDEPS}" |
175 | do_populate_sysroot_setscene[depends] += "${USERADDSETSCENEDEPS}" | 175 | do_populate_sysroot_setscene[depends] += "${USERADDSETSCENEDEPS}" |
176 | USERADDSETSCENEDEPS_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" | 176 | USERADDSETSCENEDEPS: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" |
177 | USERADDSETSCENEDEPS = "" | 177 | USERADDSETSCENEDEPS = "" |
178 | 178 | ||
179 | # Recipe parse-time sanity checks | 179 | # Recipe parse-time sanity checks |
@@ -184,8 +184,8 @@ def update_useradd_after_parse(d): | |||
184 | bb.fatal("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False)) | 184 | bb.fatal("%s inherits useradd but doesn't set USERADD_PACKAGES" % d.getVar('FILE', False)) |
185 | 185 | ||
186 | for pkg in useradd_packages.split(): | 186 | for pkg in useradd_packages.split(): |
187 | d.appendVarFlag("do_populate_sysroot", "vardeps", "USERADD_PARAM_%s GROUPADD_PARAM_%s GROUPMEMS_PARAM_%s" % (pkg, pkg, pkg)) | 187 | d.appendVarFlag("do_populate_sysroot", "vardeps", "USERADD_PARAM:%s GROUPADD_PARAM:%s GROUPMEMS_PARAM:%s" % (pkg, pkg, pkg)) |
188 | if not d.getVar('USERADD_PARAM_%s' % pkg) and not d.getVar('GROUPADD_PARAM_%s' % pkg) and not d.getVar('GROUPMEMS_PARAM_%s' % pkg): | 188 | if not d.getVar('USERADD_PARAM:%s' % pkg) and not d.getVar('GROUPADD_PARAM:%s' % pkg) and not d.getVar('GROUPMEMS_PARAM:%s' % pkg): |
189 | bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE', False), pkg)) | 189 | bb.fatal("%s inherits useradd but doesn't set USERADD_PARAM, GROUPADD_PARAM or GROUPMEMS_PARAM for package %s" % (d.getVar('FILE', False), pkg)) |
190 | 190 | ||
191 | python __anonymous() { | 191 | python __anonymous() { |
@@ -211,7 +211,7 @@ def get_all_cmd_params(d, cmd_type): | |||
211 | return "; ".join(params) | 211 | return "; ".join(params) |
212 | 212 | ||
213 | # Adds the preinst script into generated packages | 213 | # Adds the preinst script into generated packages |
214 | fakeroot python populate_packages_prepend () { | 214 | fakeroot python populate_packages:prepend () { |
215 | def update_useradd_package(pkg): | 215 | def update_useradd_package(pkg): |
216 | bb.debug(1, 'adding user/group calls to preinst for %s' % pkg) | 216 | bb.debug(1, 'adding user/group calls to preinst for %s' % pkg) |
217 | 217 | ||
@@ -220,7 +220,7 @@ fakeroot python populate_packages_prepend () { | |||
220 | required to execute on the target. Not doing so may cause | 220 | required to execute on the target. Not doing so may cause |
221 | useradd preinst to be invoked twice, causing unwanted warnings. | 221 | useradd preinst to be invoked twice, causing unwanted warnings. |
222 | """ | 222 | """ |
223 | preinst = d.getVar('pkg_preinst_%s' % pkg) or d.getVar('pkg_preinst') | 223 | preinst = d.getVar('pkg_preinst:%s' % pkg) or d.getVar('pkg_preinst') |
224 | if not preinst: | 224 | if not preinst: |
225 | preinst = '#!/bin/sh\n' | 225 | preinst = '#!/bin/sh\n' |
226 | preinst += 'bbnote () {\n\techo "NOTE: $*"\n}\n' | 226 | preinst += 'bbnote () {\n\techo "NOTE: $*"\n}\n' |
@@ -230,15 +230,15 @@ fakeroot python populate_packages_prepend () { | |||
230 | preinst += 'perform_useradd () {\n%s}\n' % d.getVar('perform_useradd') | 230 | preinst += 'perform_useradd () {\n%s}\n' % d.getVar('perform_useradd') |
231 | preinst += 'perform_groupmems () {\n%s}\n' % d.getVar('perform_groupmems') | 231 | preinst += 'perform_groupmems () {\n%s}\n' % d.getVar('perform_groupmems') |
232 | preinst += d.getVar('useradd_preinst') | 232 | preinst += d.getVar('useradd_preinst') |
233 | d.setVar('pkg_preinst_%s' % pkg, preinst) | 233 | d.setVar('pkg_preinst:%s' % pkg, preinst) |
234 | 234 | ||
235 | # RDEPENDS setup | 235 | # RDEPENDS setup |
236 | rdepends = d.getVar("RDEPENDS_%s" % pkg) or "" | 236 | rdepends = d.getVar("RDEPENDS:%s" % pkg) or "" |
237 | rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-passwd' | 237 | rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-passwd' |
238 | rdepends += ' ' + d.getVar('MLPREFIX', False) + 'shadow' | 238 | rdepends += ' ' + d.getVar('MLPREFIX', False) + 'shadow' |
239 | # base-files is where the default /etc/skel is packaged | 239 | # base-files is where the default /etc/skel is packaged |
240 | rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-files' | 240 | rdepends += ' ' + d.getVar('MLPREFIX', False) + 'base-files' |
241 | d.setVar("RDEPENDS_%s" % pkg, rdepends) | 241 | d.setVar("RDEPENDS:%s" % pkg, rdepends) |
242 | 242 | ||
243 | # Add the user/group preinstall scripts and RDEPENDS requirements | 243 | # Add the user/group preinstall scripts and RDEPENDS requirements |
244 | # to packages specified by USERADD_PACKAGES | 244 | # to packages specified by USERADD_PACKAGES |