From ce7ea9d34c045fd5a0a73039e2a032930dd9bd20 Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Sun, 28 May 2017 21:23:00 -0500 Subject: [PATCH] allow uninstalls to fail on gentoo The cleanup of packages should be more opertunistic, if it's not there then fail quietly. Change-Id: I207a1162abc9ca5e9636b8de192f21424db0f569 --- diskimage_builder/elements/gentoo/finalise.d/99-cleanup | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/diskimage_builder/elements/gentoo/finalise.d/99-cleanup b/diskimage_builder/elements/gentoo/finalise.d/99-cleanup index 4de25ec0..e6bd96d1 100755 --- a/diskimage_builder/elements/gentoo/finalise.d/99-cleanup +++ b/diskimage_builder/elements/gentoo/finalise.d/99-cleanup @@ -9,7 +9,11 @@ set -o pipefail # make sure system is in a consistent state echo 'PYTHON_TARGETS="python3_4"' >> /etc/portage/make.conf eselect python set python3.4 -emerge -C -q dev-lang/python:2.7 dev-vcs/git +# allow these uninstalls to fail as they may not be installed +set +e +emerge -C -q dev-lang/python:2.7 +emerge -C -q dev-vcs/git +set -e USE="-build" emerge -q --backtrack=99 --jobs=2 --update --newuse --deep --with-bdeps=y @world # rebuild packages that might need it USE="-build" emerge -q --jobs=2 --usepkg=n @preserved-rebuild