From a9b38d0b6031db2636458d5c56609228e293ee4d Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Wed, 10 Feb 2016 12:50:43 -0800 Subject: [PATCH] Fix dpkg element for Ubuntu Xenial The Ubuntu Xenial cloud server images set the mode of /var/lib/apt/lists/partial to 700, so when mounted it's inaccessible to an unprivileged user, resulting in an error: find: `/tmp/image.aDQKdkRi/mnt/var/lib/apt/lists/partial': Permission denied There's no reason an image should come with anything already in /var/lib/apt/lists/partial, so just avoid trying to descend into that directory when fixing the apt translations packages. Change-Id: Id27f0166bfb09d67200f337a5ffff2f2037b7c1c --- elements/dpkg/root.d/60-block-apt-translations | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/dpkg/root.d/60-block-apt-translations b/elements/dpkg/root.d/60-block-apt-translations index bbb8ac02..f1f5bc28 100755 --- a/elements/dpkg/root.d/60-block-apt-translations +++ b/elements/dpkg/root.d/60-block-apt-translations @@ -14,4 +14,4 @@ Acquire::Languages "none"; EOF # And now make sure that we don't fall foul of Debian bug 641967 -find $TARGET_ROOT/var/lib/apt/lists/ -type f -name '*_i18n_Translation-*' -exec sudo rm -f {} + +find $TARGET_ROOT/var/lib/apt/lists/ -path $TARGET_ROOT/var/lib/apt/lists/partial -prune -o -type f -name '*_i18n_Translation-*' -print -exec sudo rm -f {} +