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