2010-09-17 13:40:17 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source /etc/profile
|
|
|
|
env-update
|
|
|
|
source /etc/profile
|
|
|
|
|
|
|
|
# Setup environment vars
|
|
|
|
export ETP_NONINTERACTIVE=1
|
|
|
|
if [ -d "/usr/portage/licenses" ]; then
|
|
|
|
export ACCEPT_LICENSE="$(ls /usr/portage/licenses -1 | xargs)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
export ETP_NOINTERACTIVE=1
|
|
|
|
export FORCE_EAPI=2
|
2011-07-21 13:14:09 +02:00
|
|
|
equo update
|
|
|
|
if [ "${?}" != "0" ]; then
|
|
|
|
sleep 1200 || exit 1
|
|
|
|
equo update || exit 1
|
|
|
|
fi
|
2010-09-17 13:40:17 +02:00
|
|
|
equo upgrade || exit 1
|
|
|
|
echo "-5" | equo conf update
|
|
|
|
rm -rf /var/lib/entropy/client/packages
|
|
|
|
|
2012-05-17 23:24:13 +02:00
|
|
|
# copy Portage config from sabayonlinux.org entropy repo to system
|
|
|
|
for conf in package.mask package.unmask package.keywords make.conf package.use; do
|
|
|
|
repo_path=/var/lib/entropy/client/database/*/sabayonlinux.org/standard
|
|
|
|
repo_conf=$(ls -1 ${repo_path}/*/*/${conf} | sort | tail -n 1 2>/dev/null)
|
|
|
|
if [ -n "${repo_conf}" ]; then
|
|
|
|
target_path="/etc/portage/${conf}"
|
|
|
|
if [ "${conf}" = "make.conf" ]; then
|
|
|
|
target_path="/etc/make.conf"
|
|
|
|
fi
|
|
|
|
if [ ! -d "${target_path}" ]; then # do not touch dirs
|
|
|
|
cp "${repo_conf}" "${target_path}" # ignore
|
|
|
|
fi
|
2010-09-18 12:59:29 +02:00
|
|
|
fi
|
2012-05-17 23:24:13 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# split config file
|
|
|
|
for conf in 00-sabayon.package.use; do
|
|
|
|
repo_path=/var/lib/entropy/client/database/*/sabayonlinux.org/standard
|
|
|
|
repo_conf=$(ls -1 ${repo_path}/*/*/${conf} | sort | tail -n 1 2>/dev/null)
|
|
|
|
if [ -n "${repo_conf}" ]; then
|
|
|
|
target_path="/etc/portage/${conf/00-sabayon.}/${conf}"
|
|
|
|
target_dir=$(dirname "${target_path}")
|
|
|
|
if [ -f "${target_dir}" ]; then # remove old file
|
|
|
|
rm "${target_dir}" # ignore failure
|
|
|
|
fi
|
|
|
|
if [ ! -d "${target_path}" ]; then
|
|
|
|
mkdir -p "${target_path}" # ignore failure
|
|
|
|
fi
|
|
|
|
cp "${repo_conf}" "${target_path}" # ignore
|
2010-09-18 12:59:29 +02:00
|
|
|
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2010-09-17 13:40:17 +02:00
|
|
|
equo query list installed -qv > /etc/sabayon-pkglist
|