Skip to content
Snippets Groups Projects
Verified Commit 1b04f0d4 authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

oniro-image.bbclass: Add rootfs function for cleaning up subid backup files


Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent 40caab7e
No related branches found
No related tags found
No related merge requests found
This commit is part of merge request !204. Comments created here will be created in the context of that merge request.
...@@ -141,5 +141,16 @@ python deploy_boot_artifacts_to_rootfs() { ...@@ -141,5 +141,16 @@ python deploy_boot_artifacts_to_rootfs() {
os.path.join(rootfs_dir, dst_path)) os.path.join(rootfs_dir, dst_path))
run_cmd(install_cmd) run_cmd(install_cmd)
} }
ROOTFS_POSTPROCESS_COMMAND += "deploy_boot_artifacts_to_rootfs;" ROOTFS_POSTPROCESS_COMMAND += "deploy_boot_artifacts_to_rootfs;"
python () {
d.appendVar('ROOTFS_POSTPROCESS_COMMAND', ' clean_backup_files; ')
}
python clean_backup_files () {
# Cleanup other backup files generated by shadow-utils not covered by the
# sort_passwd existing rootfs postcommand.
import rootfspostcommands
for file in ['subuid', 'subgid']:
filename = os.path.join(d.expand('${IMAGE_ROOTFS}${sysconfdir}'), file)
rootfspostcommands.remove_backup(filename)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment