summaryrefslogtreecommitdiffstats
path: root/meta/classes/sstate.bbclass
diff options
context:
space:
mode:
authorMaxin B. John <maxin.john@intel.com>2016-04-06 12:20:31 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-04-06 22:57:25 +0100
commitcbe33ecb15f71737354184cd9f3b7507ab97b2e4 (patch)
treed75005bce92d4088cffa9ca30c5dc1dafeaeef33 /meta/classes/sstate.bbclass
parentc1157400ab6f5cb0f057bd07e55c4790499107ed (diff)
downloadpoky-cbe33ecb15f71737354184cd9f3b7507ab97b2e4.tar.gz
useradd.bbclass: remove user/group created by the package in clean* task
At present, if a recipe is built which creates users/groups via useradd.bbclass, those users/groups are not removed from sysroot when the recipe/package is cleaned using clean/cleansstate/cleanall or when a recipe is rebuild and 'unstaged' from the the sysroot. The "userdel_sysroot_sstate()" provides that functionality. [YOCTO #9262] (From OE-Core rev: b5304ce438666a7418746f4ddd32703ae3188089) Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/sstate.bbclass')
-rw-r--r--meta/classes/sstate.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 6f285da6b4..3234e7914c 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -51,6 +51,7 @@ SSTATEPREINSTFUNCS = ""
51SSTATEPOSTUNPACKFUNCS = "sstate_hardcode_path_unpack" 51SSTATEPOSTUNPACKFUNCS = "sstate_hardcode_path_unpack"
52SSTATEPOSTINSTFUNCS = "" 52SSTATEPOSTINSTFUNCS = ""
53EXTRA_STAGING_FIXMES ?= "" 53EXTRA_STAGING_FIXMES ?= ""
54SSTATECLEANFUNCS = ""
54 55
55SIGGEN_LOCKEDSIGS_CHECK_LEVEL ?= 'error' 56SIGGEN_LOCKEDSIGS_CHECK_LEVEL ?= 'error'
56 57
@@ -444,6 +445,10 @@ def sstate_clean(ss, d):
444 stfile.endswith(rm_nohash): 445 stfile.endswith(rm_nohash):
445 oe.path.remove(stfile) 446 oe.path.remove(stfile)
446 447
448 # Removes the users/groups created by the package
449 for cleanfunc in (d.getVar('SSTATECLEANFUNCS', True) or '').split():
450 bb.build.exec_func(cleanfunc, d)
451
447sstate_clean[vardepsexclude] = "SSTATE_MANFILEPREFIX" 452sstate_clean[vardepsexclude] = "SSTATE_MANFILEPREFIX"
448 453
449CLEANFUNCS += "sstate_cleanall" 454CLEANFUNCS += "sstate_cleanall"