From 664ace2f301f5dccfce6ffb1f462c9dba495a431 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Wed, 6 Jun 2018 10:51:35 +1200 Subject: [PATCH] man un-diverting man idempotent --- debian/changelog | 2 +- live-build/auto/build | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/debian/changelog b/debian/changelog index b23f1957..de1fc9a4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -livecd-rootfs (2.529~ppa4) cosmic; urgency=medium +livecd-rootfs (2.529~ppa6) cosmic; urgency=medium * Improvements to the ubuntu-base (i.e. Docker) build: - Customize the unminimize script to not install ubuntu-minimal. diff --git a/live-build/auto/build b/live-build/auto/build index 6bc025af..374f6b67 100755 --- a/live-build/auto/build +++ b/live-build/auto/build @@ -115,7 +115,7 @@ echo "" echo "Reinstallation of packages may fail due to changes to the system" echo "configuration, the presence of third-party packages, or for other" echo "reasons." -read -p "Would you like to continue? [y/N]" REPLY +read -p "Would you like to continue? [y/N] " REPLY echo # (optional) move to a new line if [ "$REPLY" != "y" ] && [ "$REPLY" != "Y" ] then @@ -153,9 +153,11 @@ if [ -f /etc/dpkg/dpkg.cfg.d/excludes ] || [ -f /etc/dpkg/dpkg.cfg.d/excludes.dp fi fi -# Remove diverted man binary -rm -f /usr/bin/man -dpkg-divert --quiet --remove --rename /usr/bin/man +if [ "$(dpkg-divert --truename /usr/bin/man)" = "/usr/bin/man.REAL" ]; then + # Remove diverted man binary + rm -f /usr/bin/man + dpkg-divert --quiet --remove --rename /usr/bin/man +fi EOF if [ "$PROJECT" != "ubuntu-base" ]; then