scap-security-guide: remove __pycache__ in ptest directory

Remove __pycache__ directories as they contain references to TMPDIR.

Fix QA warnings:
WARNING: scap-security-guide-0.1.71-r0 do_package_qa: QA Issue: File
/usr/lib64/scap-security-guide/ptest/git/utils/_pycache_/gen_reference_table.cpython-312.pyc
in package scap-security-guide-ptest contains reference to TMPDIR

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Yi Zhao
2024-04-23 19:09:13 +08:00
committed by Armin Kuster
parent 11ea91192d
commit 7346f5996c

View File

@@ -82,6 +82,11 @@ do_install_ptest() {
install -d ${t}/$d
cp -fr ${S}/$d/* ${t}/$d/.
done
# Remove __pycache__ directories as they contain references to TMPDIR
for pycachedir in $(find ${D}/${PTEST_PATH} -name __pycache__); do
rm -rf $pycachedir
done
}
FILES:${PN} += "${datadir}/xml ${datadir}/openscap"