Strip translation files out of the minimal images.

This is another thing that goes unused when there is no human console user
(and we already don't have the locales themselves present on a minimal
image).

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1829333
This commit is contained in:
Steve Langasek 2019-05-17 18:25:09 +02:00
parent ba8797dc16
commit e528a8eabd
2 changed files with 13 additions and 0 deletions

6
debian/changelog vendored
View File

@ -1,7 +1,13 @@
livecd-rootfs (2.578.5) UNRELEASED; urgency=medium
[ Balint Reczey ]
* Build WSL rootfs tarball (LP: #1827930)
[ Steve Langasek ]
* Strip translation files out of the minimal images, another thing that
goes unused when there is no human console user (and we already don't
have the locales themselves present on a minimal image). LP: #1829333.
-- Balint Reczey <rbalint@ubuntu.com> Fri, 24 May 2019 12:42:50 +0200
livecd-rootfs (2.578.4) disco; urgency=medium

View File

@ -131,6 +131,9 @@ Expire-Date: 0
# Drop all man pages
path-exclude=/usr/share/man/*
# Drop all translations
path-exclude=/usr/share/locale/*/LC_MESSAGES/*.mo
# Drop all documentation ...
path-exclude=/usr/share/doc/*
@ -191,6 +194,10 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp
# This step processes the packages which still have missing documentation
dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \
| xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y
echo "Restoring system translations..."
# This step processes the packages which still have missing translations
dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/locale/ {print $2}' | sed 's|/[^/]*$||' | sort |uniq \
| xargs dpkg -S | sed 's|, |\n|g;s|: [^:]*$||' | uniq | DEBIAN_FRONTEND=noninteractive xargs apt-get install --reinstall -y
if dpkg --verify --verify-format rpm | awk '/..5...... \/usr\/share\/doc/ {exit 1}'; then
echo "Documentation has been restored successfully."
rm /etc/dpkg/dpkg.cfg.d/excludes.dpkg-tmp