diff --git a/Dockerfile b/Dockerfile index c042b21..00c6d73 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,9 @@ FROM plabedan/gentoo RUN echo "en_US.UTF-8 UTF-8 " >> /etc/locale.gen && locale-gen && eselect locale set en_US.utf8 && env-update && source /etc/profile ENV LC_ALL=en_US.UTF-8 +# Upgrading portage +RUN emerge --sync && layman -a sabayon + # Configure the sabayon box, installing equo setting up locales ADD ./script/sabayon-configuration.sh / RUN /bin/bash /sabayon-configuration.sh && rm -rf /sabayon-configuration.sh @@ -21,9 +24,8 @@ RUN /bin/bash /equo-rescue-generate.exp && rm -rf /equo-rescue-generate.exp ADD ./script/sabayon-configuration-build.sh /sabayon-configuration-build.sh RUN /bin/bash /sabayon-configuration-build.sh && rm -rf /sabayon-build.sh -# Perform before-upgrade tasks (mirror sorting, updating repository db) -ADD ./script/before-upgrade.sh /before-upgrade.sh -RUN /bin/bash /before-upgrade.sh && rm -rf /before-upgrade.sh +# Perform before-upgrade tasks (mirror sorting, updating repository db, removing portage and keeping profiles and metadata) +RUN mv /etc/entropy/repositories.conf.d/entropy_sabayonlinux.org.example /etc/entropy/repositories.conf.d/entropy_sabayonlinux.org && equo up && equo repo mirrorsort sabayonlinux.org && cd /usr/portage/;ls | grep -v 'profiles' | grep -v 'metadata' | xargs rm -rf # Accepting licenses needed to continue automatic install/upgrade ADD ./conf/spinbase-licenses /etc/entropy/packages/license.accept diff --git a/script/before-upgrade.sh b/script/before-upgrade.sh deleted file mode 100644 index 5f5c72e..0000000 --- a/script/before-upgrade.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -# Updating repository db -mv /etc/entropy/repositories.conf.d/entropy_sabayonlinux.org.example /etc/entropy/repositories.conf.d/entropy_sabayonlinux.org -equo up - -# Sorting mirrors -equo repo mirrorsort sabayonlinux.org - -# Removing portage and keeping profiles and metadata -cd /usr/portage/;ls | grep -v 'profiles' | grep -v 'metadata' | xargs rm -rf diff --git a/script/sabayon-configuration.sh b/script/sabayon-configuration.sh index 2211232..0df9103 100644 --- a/script/sabayon-configuration.sh +++ b/script/sabayon-configuration.sh @@ -14,8 +14,7 @@ mkdir -p /usr/local/portage/profiles/ echo "masters = gentoo" > /usr/local/portage/metadata/layout.conf echo "user_defined" > /usr/local/portage/profiles/repo_name -emerge --sync -layman -a sabayon +emerge -C =dev-python/python-exec-0.3.1 mkdir -p /etc/portage/package.keywords/ echo "app-admin/equo ~amd64 @@ -29,8 +28,8 @@ sys-apps/file python # emerging equo and expect -emerge -vt equo --autounmask-write -emerge expect +emerge -vt equo --autounmask-write || exit 1 +emerge expect || exit 1 # Choosing only python2.7 for now, cleaning others eselect python set python2.7