Don't delete copyright files.

Some licences require that the binaries be shipped with a copy
of the license. Debian does this in the copyright files in
/usr/share/doc. We need to leave those files there to keep
the image distributable.
This commit is contained in:
James Westby
2016-10-14 16:41:07 +01:00
committed by James Westby
parent 193afb273d
commit 875e3592f7
+2 -1
View File
@@ -20,7 +20,6 @@ cp -a $ROOT/debootstrap/* $DEBOOTSTRAP_DIR/scripts
export DEBIAN_FRONTEND=noninteractive
DIRS_TO_TRIM="/usr/share/man
/usr/share/doc
/var/cache/apt
/var/lib/apt/lists
/usr/share/locale
@@ -214,6 +213,8 @@ chroot "$rootfsDir" dpkg --force-all -P $PACKAGES_TO_EXCLUDE
for DIR in $DIRS_TO_TRIM; do
rm -r "$rootfsDir/$DIR"/*
done
find "$rootfsDir/usr/share/doc" -mindepth 1 -not -name copyright -not -type d -delete
find "$rootfsDir/usr/share/doc" -mindepth 1 -type d -empty -delete
echo "Total size"
du -skh "$rootfsDir"
echo "Package sizes"