mirror of
https://git.yoctoproject.org/poky
synced 2026-06-02 01:19:52 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
c1157400ab
commit
cbe33ecb15
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user