diff --git a/configure b/configure index d3e8e72..74e4f7b 100755 --- a/configure +++ b/configure @@ -364,6 +364,7 @@ function load_default_config() { GENTOO_MIRROR="https://mirror.eu.oneandone.net/linux/distributions/gentoo/gentoo" GENTOO_ARCH="amd64" + USE_PORTAGE_TESTING=true SELECT_MIRRORS=false SELECT_MIRRORS_LARGE_FILE=false @@ -761,6 +762,7 @@ MENU_ITEMS=( "PORTAGE_GIT_MIRROR" "GENTOO_MIRROR" "GENTOO_ARCH" + "USE_PORTAGE_TESTING" "SELECT_MIRRORS" "SELECT_MIRRORS_LARGE_FILE" "--------" @@ -1222,6 +1224,15 @@ function GENTOO_ARCH_menu() { fi } +function USE_PORTAGE_TESTING_tag() { echo "Run mirrorselect"; } +function USE_PORTAGE_TESTING_label() { on_off_label "$USE_PORTAGE_TESTING"; } +function USE_PORTAGE_TESTING_show() { return 0; } +function USE_PORTAGE_TESTING_help() { echo "Determines if the system should use bleeding edge software from the respective architecture's testing branch. This will add ACCEPT_KEYWORDS=\"~\$GENTOO_ARCH\" to /etc/portage/make.conf"; } +function USE_PORTAGE_TESTING_menu() { + on_off_toggle "USE_PORTAGE_TESTING" + UNSAVED_CHANGES=true +} + function SELECT_MIRRORS_tag() { echo "Run mirrorselect"; } function SELECT_MIRRORS_label() { on_off_label "$SELECT_MIRRORS"; } function SELECT_MIRRORS_show() { return 0; } @@ -1340,6 +1351,7 @@ PORTAGE_GIT_MIRROR=${PORTAGE_GIT_MIRROR@Q} GENTOO_MIRROR=${GENTOO_MIRROR@Q} GENTOO_ARCH=${GENTOO_ARCH@Q} STAGE3_BASENAME="stage3-\$GENTOO_ARCH$([[ $SYSTEMD == true ]] && echo -n "-systemd" || echo -n "-openrc")" +USE_PORTAGE_TESTING=${USE_PORTAGE_TESTING@Q} SELECT_MIRRORS=${SELECT_MIRRORS@Q} SELECT_MIRRORS_LARGE_FILE=${SELECT_MIRRORS_LARGE_FILE@Q} diff --git a/gentoo.conf.example b/gentoo.conf.example index 408ac57..92c0c32 100644 --- a/gentoo.conf.example +++ b/gentoo.conf.example @@ -228,6 +228,10 @@ STAGE3_BASENAME="stage3-$GENTOO_ARCH-systemd" #STAGE3_BASENAME="stage3-$GENTOO_ARCH-desktop-systemd" #STAGE3_BASENAME="stage3-$GENTOO_ARCH-desktop-openrc" +# If set to true, the installer will add ACCEPT_KEYWORDS="~$GENTOO_ARCH" +# to /etc/portage/make.conf to enable packages in testing. +USE_PORTAGE_TESTING=true + # If set to true, the best best gentoo mirrors will be selected # automatically by app-portage/mirrorselect SELECT_MIRRORS=true diff --git a/scripts/main.sh b/scripts/main.sh index 28eb013..8b31f99 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -86,13 +86,16 @@ function configure_portage() { [[ $SELECT_MIRRORS_LARGE_FILE == "true" ]] \ && mirrorselect_params+=("-D") try mirrorselect "${mirrorselect_params[@]}" + fi + if [[ $USE_PORTAGE_TESTING == "true" ]]; then einfo "Adding ~$GENTOO_ARCH to ACCEPT_KEYWORDS" echo "ACCEPT_KEYWORDS=\"~$GENTOO_ARCH\"" >> /etc/portage/make.conf \ || die "Could not modify /etc/portage/make.conf" - chmod 644 /etc/portage/make.conf \ - || die "Could not chmod 644 /etc/portage/make.conf" fi + + chmod 644 /etc/portage/make.conf \ + || die "Could not chmod 644 /etc/portage/make.conf" } function install_sshd() {