From d38ceab06dc5fc959b6b3734d0d6a13c9e9a82a1 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Thu, 12 Dec 2019 12:57:05 +1300 Subject: [PATCH] fix in case of no preferences --- live-build/auto/config | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/live-build/auto/config b/live-build/auto/config index 58c0367b..a4e90059 100755 --- a/live-build/auto/config +++ b/live-build/auto/config @@ -1103,7 +1103,9 @@ if [ $PROJECT = ubuntu-base ]; then # live-build "helpfully" removes /etc/apt/preferences.d/* so we put a # copy somewhere it won't touch it. -cp -a /etc/apt/preferences.d /etc/apt/preferences.d.save +if [ -n "$(ls -A /etc/apt/preferences.d)" ]; then + cp -a /etc/apt/preferences.d /etc/apt/preferences.d.save +fi EOF fi