mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-10 06:26:57 +02:00
Merge pull request #2230 from flatcar/krnowak/drop-python-test-stuff
Drop python tests from GCE and Azure OEM images and python sysext
This commit is contained in:
commit
1d141f67c0
@ -7,4 +7,14 @@ pushd "${rootfs}"
|
|||||||
|
|
||||||
rm -rf ./usr/{lib/debug,share,include,lib64/pkgconfig}
|
rm -rf ./usr/{lib/debug,share,include,lib64/pkgconfig}
|
||||||
|
|
||||||
|
# Remove test stuff from python - it's quite large.
|
||||||
|
for p in ./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
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@ -20,3 +20,13 @@ ln -sf /usr/bin/true "${rootfs}/usr/bin/eject"
|
|||||||
# both cases, so mangle manually.
|
# both cases, so mangle manually.
|
||||||
mkdir -p "${rootfs}"/usr/lib/systemd/system
|
mkdir -p "${rootfs}"/usr/lib/systemd/system
|
||||||
cp -a "${rootfs}"/{etc,usr/lib}/systemd/system/.
|
cp -a "${rootfs}"/{etc,usr/lib}/systemd/system/.
|
||||||
|
|
||||||
|
# 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
|
||||||
|
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…
Reference in New Issue
Block a user