From c886c4cbe1599d0f44e549f0d5ea6f24a6cffc4c Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Tue, 31 Oct 2017 21:50:15 -0500 Subject: [PATCH] Make preinstall.d more deterministic Reorders the preinstall, making the order more explicit. Also dedupes some folder setup. Change-Id: I423dcba169558ff6037a3382b997675722e77405 --- .../{02-gentoo-migrate-pax => 02-gentoo-01-migrate-pax} | 0 .../pre-install.d/{03-gentoo-flags => 02-gentoo-02-flags} | 6 +++++- ...l-desired-python => 02-gentoo-04-install-desired-python} | 5 ----- 3 files changed, 5 insertions(+), 6 deletions(-) rename diskimage_builder/elements/gentoo/pre-install.d/{02-gentoo-migrate-pax => 02-gentoo-01-migrate-pax} (100%) rename diskimage_builder/elements/gentoo/pre-install.d/{03-gentoo-flags => 02-gentoo-02-flags} (80%) rename diskimage_builder/elements/gentoo/pre-install.d/{10-install-desired-python => 02-gentoo-04-install-desired-python} (96%) diff --git a/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-migrate-pax b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-01-migrate-pax similarity index 100% rename from diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-migrate-pax rename to diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-01-migrate-pax diff --git a/diskimage_builder/elements/gentoo/pre-install.d/03-gentoo-flags b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags similarity index 80% rename from diskimage_builder/elements/gentoo/pre-install.d/03-gentoo-flags rename to diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags index 3270e26d..b80b70cd 100755 --- a/diskimage_builder/elements/gentoo/pre-install.d/03-gentoo-flags +++ b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-02-flags @@ -6,8 +6,12 @@ fi set -eu set -o pipefail -mkdir -p /etc/portage/package.use +# get the directories in order +mkdir -p /etc/portage/profile mkdir -p /etc/portage/package.keywords +mkdir -p /etc/portage/package.mask +mkdir -p /etc/portage/package.unmask +mkdir -p /etc/portage/package.use # needed in order to install pip packages as root echo 'dev-python/pip vanilla' >> /etc/portage/package.use/pip diff --git a/diskimage_builder/elements/gentoo/pre-install.d/10-install-desired-python b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-04-install-desired-python similarity index 96% rename from diskimage_builder/elements/gentoo/pre-install.d/10-install-desired-python rename to diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-04-install-desired-python index 14f17cdc..e8b84f03 100755 --- a/diskimage_builder/elements/gentoo/pre-install.d/10-install-desired-python +++ b/diskimage_builder/elements/gentoo/pre-install.d/02-gentoo-04-install-desired-python @@ -18,11 +18,6 @@ if [[ ! -f /usr/portage/profiles ]]; then emerge-webrsync -q fi -# get the directories in order -mkdir -p /etc/portage/profile -mkdir -p /etc/portage/package.keywords -mkdir -p /etc/portage/package.use - # python-3.6 and python-3.5 are masked and considered unstable for some reason echo "PYTHON_TARGETS=\"${GENTOO_PYTHON_TARGETS}\"" >> /etc/portage/make.conf if [[ "${GENTOO_PYTHON_TARGETS}" == *"python3_6"* ]]; then