From bd0f07939758b3c6b6edad992d1d8f788feb3738 Mon Sep 17 00:00:00 2001 From: Steve Langasek Date: Fri, 17 May 2019 18:25:09 +0200 Subject: [PATCH] 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 --- debian/changelog | 8 ++++++++ live-build/auto/build | 7 +++++++ 2 files changed, 15 insertions(+) diff --git a/debian/changelog b/debian/changelog index 274feb10..f6024673 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +livecd-rootfs (2.542.5) UNRELEASED; urgency=medium + + * 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. + + -- Steve Langasek Fri, 17 May 2019 18:21:15 +0200 + livecd-rootfs (2.542.4) cosmic; urgency=medium [ Robert C Jennings ] diff --git a/live-build/auto/build b/live-build/auto/build index 1d36ed06..de08261f 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -110,6 +110,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/* @@ -170,6 +173,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