[script/before-upgrade] deleting, moving to docker some commands to have more fine grained control

This commit is contained in:
mudler
2015-06-06 19:31:25 +02:00
parent 1f52111f11
commit a9bd88ab4e
3 changed files with 8 additions and 17 deletions
+5 -3
View File
@@ -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
-10
View File
@@ -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
+3 -4
View File
@@ -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