From dc8449bf02316f27b556994644f7c4ce18b995a8 Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Sun, 22 Jan 2017 15:53:02 -0600 Subject: [PATCH] move post-install.d to finalize.d It looks like I installed the cleanup file in the wrong location. Moving it to the correct location and cleaning some more stuff up should allow for a much smaller image, currently tested at 300M vs 490M. Change-Id: I9d0a24b0fe59d4f2d38aa88ba47e4400e0476b46 --- .../gentoo/{post-install.d => finalise.d}/99-cleanup | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) rename elements/gentoo/{post-install.d => finalise.d}/99-cleanup (71%) diff --git a/elements/gentoo/post-install.d/99-cleanup b/elements/gentoo/finalise.d/99-cleanup similarity index 71% rename from elements/gentoo/post-install.d/99-cleanup rename to elements/gentoo/finalise.d/99-cleanup index 656b0a10..f8f5507a 100755 --- a/elements/gentoo/post-install.d/99-cleanup +++ b/elements/gentoo/finalise.d/99-cleanup @@ -7,8 +7,16 @@ set -eu set -o pipefail # make sure system is in a consistant 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 +USE="-build" emerge -q --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 +# remove unneeded packages USE="-build" emerge --verbose=n --depclean -USE="-build" emerge -v --usepkg=n @preserved-rebuild +# rebuild packages that might have somehow depended on the unneeded packages +USE="-build" emerge -q --jobs=2 --usepkg=n @preserved-rebuild # update config files etc-update --automode -5