mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-25 07:31:01 +02:00
coreos-base/oem-gce: Shrink the sysext image by removing python tests
Not only python is being installed, but also some extra packages like setuptools. These amount of tests seems to be growing, which is not a bad thing per se, but we really don't need them in the GCE OEM sysext.
This commit is contained in:
parent
3b82540268
commit
7cebc75f75
15
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh
vendored
Executable file
15
sdk_container/src/third_party/coreos-overlay/coreos-base/oem-gce/files/manglefs.sh
vendored
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
rootfs=${1}
|
||||||
|
|
||||||
|
# Remove test stuff from python - it's quite large.
|
||||||
|
for p in "${rootfs}"/usr/lib/python*; do
|
||||||
|
if [[ ! -d ${p} ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
# find directories named tests or test and remove them (-prune
|
||||||
|
# avoids searching below those directories)
|
||||||
|
find "${p}" \( -name tests -o -name test \) -type d -prune -exec rm -rf '{}' '+'
|
||||||
|
done
|
Loading…
x
Reference in New Issue
Block a user