Gentoo Archives: gentoo-alt

From: alexey+gentoo@××××××××.org
To: gentoo-alt@l.g.o
Subject: [gentoo-alt] [PATCH 1/1] scripts/bootstrap-prefix: do stable prefix on amd64
Date: Mon, 14 Jun 2021 15:58:56
Message-Id: 20210614155850.9026-1-alexey+gentoo@asokolov.org
1 From: Alexey Sokolov <sokolov@××××××.com>
2
3 Bug: https://bugs.gentoo.org/759424
4 ---
5 scripts/bootstrap-prefix.sh | 34 ++++++++++++++++++++++++++++++++++
6 1 file changed, 34 insertions(+)
7
8 diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh
9 index 8fab4abf44..92a7facc36 100755
10 --- a/scripts/bootstrap-prefix.sh
11 +++ b/scripts/bootstrap-prefix.sh
12 @@ -331,6 +331,8 @@ bootstrap_setup() {
13 echo "PORTDIR_OVERLAY=\"\${PORTDIR_OVERLAY} ${PORTDIR_OVERLAY}\""
14 [[ -n ${MAKE_CONF_ADDITIONAL_USE} ]] &&
15 echo "USE=\"\${USE} ${MAKE_CONF_ADDITIONAL_USE}\""
16 + [[ -n ${STABLE_PREFIX} ]] && \
17 + echo "ACCEPT_KEYWORDS=\"amd64 -~amd64\""
18 [[ ${OFFLINE_MODE} ]] && \
19 echo 'FETCHCOMMAND="bash -c \"echo I need \${FILE} from \${URI} in \${DISTDIR}; read\""'
20 } > "${ROOT}"/etc/portage/make.conf
21 @@ -2694,6 +2696,38 @@ EOF
22 esac
23 fi
24
25 + # The experimental support for Stable Prefix.
26 + # When expanding this to other CHOSTs, don't forget to update
27 + # make.conf generation in bootstrap_setup().
28 + # TODO: Consider at some point removing the ~ARCH override from
29 + # profiles/features/prefix/standalone/make.defaults.
30 + # https://bugs.gentoo.org/759424
31 + if is-rap ; then
32 + if [[ "${CHOST}" == x86_64-pc-linux-gnu ]]; then
33 + cat <<EOF
34 +
35 +Normally I can only give you ~amd64 packages, and you would be exposed
36 +to all the bugs of the newest untested software. Well, ok, sometimes
37 +it also has new features, but who needs those. But as you are a VIP
38 +customer who uses Linux on x86_64, I have a one-time offer for you!
39 +I can limit your Prefix to use only packages keyworded for stable amd64
40 +by default. Of course, you can still enable testing ~amd64 for
41 +the packages you want, when the need arises.
42 +EOF
43 + [[ ${TODO} == 'noninteractive' ]] && ans=yes ||
44 + read -p " Do you want to use stable Prefix? [Yn] " ans
45 + case "${ans}" in
46 + [Yy][Ee][Ss]|[Yy]|"")
47 + echo "Okay, I'll disable ~amd64 by default."
48 + export STABLE_PREFIX="yes"
49 + : ;;
50 + *)
51 + echo "Fine, I will not disable ~amd64, no problem."
52 + ;;
53 + esac
54 + fi
55 + fi
56 +
57 # choose EPREFIX, we do this last, since we have to actually write
58 # to the filesystem here to check that the EPREFIX is sane
59 cat << EOF
60 --
61 2.31.1