runtime-cleanup: Delete .pyc files

Previously this symlinked them to /dev/null, which didn't really
accomplish anything since they get recreated. So just remove them so
python can decide whether or not to recreate them.
This commit is contained in:
Brian C. Lane 2020-09-14 09:08:38 -07:00
parent 9b06645196
commit 83df17ea76

View File

@ -309,10 +309,6 @@ removefrom ${product.name}-logos /etc/*
removefrom ${product.name}-logos /usr/share/icons/{Bluecurve,oxygen}/*
removefrom ${product.name}-logos /usr/share/{firstboot,kde4,pixmaps}/*
## cleanup_python_files()
runcmd find ${root} -name "*.pyo" -type f -delete
runcmd find ${root} -name "*.pyc" -type f -exec ln -sf /dev/null {} \;
## cleanup /boot/ leaving vmlinuz, and .*hmac files
runcmd chroot ${root} find /boot \! -name "vmlinuz*" \
-and \! -name ".vmlinuz*" \
@ -325,6 +321,10 @@ runcmd chroot ${root} find /boot \! -name "vmlinuz*" \
runcmd chroot ${root} find -L /etc /usr -xdev -type l -and \! -name "mtab" \
-printf "removing broken symbolic link %p -> %l\n" -delete
## Remove compiled python files, they are recreated as needed anyway
runcmd find ${root} -name "*.pyo" -type f -delete
runcmd find ${root} -name "*.pyc" -type f -delete
## Clean up some of the mess pulled in by webkitgtk via yelp
## libwebkit2gtk links to a handful of libraries in gstreamer and
## gstreamer-plugins-base. Remove the rest of them.