better handle existing keywords files/directories

The existing directories are needed for stage building (a part of the
Gentoo build process).  Normally these directories are empty, but there
are times where overrides need to be defined.  This commit handles
existing overrides for keywords.  For historical reasons the overrides
were able to be put in different files and directories, this
centralizes them.

This also updates the version of openssl/cryptography that works with
or without bindist.

Change-Id: I62c934ed305a711a4a9a3ef01fa55ad142aebb78
This commit is contained in:
Matthew Thode 2018-06-23 20:47:33 -05:00
parent e39adcd65f
commit b9f1c7a22f
No known key found for this signature in database
GPG Key ID: 64A37BEAAE19A4E8
2 changed files with 15 additions and 6 deletions

View File

@ -8,7 +8,15 @@ set -o pipefail
# get the directories in order # get the directories in order
mkdir -p /etc/portage/profile mkdir -p /etc/portage/profile
mkdir -p /etc/portage/package.keywords if [ -f /etc/portage/package.keywords ]; then
mv /etc/portage/package.keywords /etc/portage/package.keywords.bak
mkdir -p /etc/portage/package.keywords
mv /etc/portage/package.keywords.bak /etc/portage/package.keywords/prebuilt-1
else
mkdir -p /etc/portage/package.keywords
fi
[ -d /etc/portage/package.accept_keywords ] && mv /etc/portage/package.accept_keywords/* /etc/portage/package.keywords/ && rmdir /etc/portage/package.accept_keywords
[ -f /etc/portage/package.accept_keywords ] && mv /etc/portage/package.accept_keywords /etc/portage/package.keywords/prebuilt-2
mkdir -p /etc/portage/package.mask mkdir -p /etc/portage/package.mask
mkdir -p /etc/portage/package.unmask mkdir -p /etc/portage/package.unmask
mkdir -p /etc/portage/package.use mkdir -p /etc/portage/package.use

View File

@ -24,18 +24,19 @@ if [[ ${GENTOO_OVERLAYS} != '' ]]; then
# redistribution, so we have to use a version of openssl that works around # redistribution, so we have to use a version of openssl that works around
# it (using fedora's patchset) and also use a version of cryptography that # it (using fedora's patchset) and also use a version of cryptography that
# depends on that version of openssl. # depends on that version of openssl.
echo '=dev-python/cryptography-2.1.3 ~amd64' >> /etc/portage/package.keywords/layman echo '=dev-python/cryptography-2.1.4-r2 ~amd64' >> /etc/portage/package.keywords/layman
echo '=dev-libs/openssl-1.1.0g-r1 ~amd64' >> /etc/portage/package.keywords/layman echo '=dev-libs/openssl-1.0.2o-r6 ~amd64' >> /etc/portage/package.keywords/layman
echo '=dev-libs/openssl-1.1.0g-r1' >> /etc/portage/package.unmask/layman
emerge -q --oneshot --jobs=2 openssl openssh emerge -q --oneshot --jobs=2 openssl openssh
# install layman # install layman
USE="-build" emerge --deep -q --jobs=2 layman USE="-build" emerge --deep -q --jobs=2 --ignore-built-slot-operator-deps=y layman
# sync the initial overlay list # sync the initial overlay list
layman -S layman -S
# enable the various overlays # enable the various overlays, ignore failures (overlay my already be enabled)
set +e
for OVERLAY in ${GENTOO_OVERLAYS}; do for OVERLAY in ${GENTOO_OVERLAYS}; do
layman -a "${OVERLAY}" layman -a "${OVERLAY}"
done done
set -e
unfix_shm unfix_shm
fi fi