aboutsummaryrefslogtreecommitdiffstats
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 10:29:57 +0100
commitb5304ce438666a7418746f4ddd32703ae3188089 (patch)
tree29517a7f0ab9b8a54ef1a3273124ddcd281cefcd /meta/classes/sstate.bbclass
parent03d1711350895e941a476bd2d2a6cd389be07509 (diff)
downloadopenembedded-core-contrib-b5304ce438666a7418746f4ddd32703ae3188089.tar.gz
openembedded-core-contrib-b5304ce438666a7418746f4ddd32703ae3188089.tar.bz2
openembedded-core-contrib-b5304ce438666a7418746f4ddd32703ae3188089.zip
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] 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 = ""
SSTATEPOSTUNPACKFUNCS = "sstate_hardcode_path_unpack"
SSTATEPOSTINSTFUNCS = ""
EXTRA_STAGING_FIXMES ?= ""
+SSTATECLEANFUNCS = ""
SIGGEN_LOCKEDSIGS_CHECK_LEVEL ?= 'error'
@@ -444,6 +445,10 @@ def sstate_clean(ss, d):
stfile.endswith(rm_nohash):
oe.path.remove(stfile)
+ # Removes the users/groups created by the package
+ for cleanfunc in (d.getVar('SSTATECLEANFUNCS', True) or '').split():
+ bb.build.exec_func(cleanfunc, d)
+
sstate_clean[vardepsexclude] = "SSTATE_MANFILEPREFIX"
CLEANFUNCS += "sstate_cleanall"