1 |
commit: fc5f2ff3c8b8eb894ee37fcdf0c74f20c6dc3aaa |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Mar 14 18:06:18 2019 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Mar 14 18:15:06 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=fc5f2ff3 |
7 |
|
8 |
scripts/bootstrap-prefix: remove obsoleted hack for BDEPEND-emerge |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
scripts/bootstrap-prefix.sh | 54 +++++++++++++++------------------------------ |
13 |
1 file changed, 18 insertions(+), 36 deletions(-) |
14 |
|
15 |
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh |
16 |
index f70c99ce58..a0d51338fd 100755 |
17 |
--- a/scripts/bootstrap-prefix.sh |
18 |
+++ b/scripts/bootstrap-prefix.sh |
19 |
@@ -1473,37 +1473,13 @@ do_emerge_pkgs() { |
20 |
done |
21 |
myuse=( ${myuse} ) |
22 |
|
23 |
- # Portage seems to ignore USE=, *FLAGS for target dependencies. |
24 |
- # Since that's what we're more or less doing all the time, |
25 |
- # encode the USE-flags in profiles/use.mask and |
26 |
- # profiles/use.force which normally do not exist. Get LDFLAGS |
27 |
- # set through make.conf. |
28 |
- rm -f "${EPREFIX}"/usr/portage/profiles/use.{mask,force} |
29 |
- for use in "${myuse[@]}" ; do |
30 |
- case "${use}" in |
31 |
- -*) echo "${use#-}" \ |
32 |
- >> "${EPREFIX}"/usr/portage/profiles/use.mask |
33 |
- ;; |
34 |
- *) echo "${use}" \ |
35 |
- >> "${EPREFIX}"/usr/portage/profiles/use.force |
36 |
- ;; |
37 |
- esac |
38 |
- done |
39 |
- mkdir -p "${EPREFIX}"/tmp/etc/portage |
40 |
- [[ -e "${EPREFIX}"/tmp/etc/portage/make.conf ]] && \ |
41 |
- sed -i -e '/#stage3_temp#/d' "${EPREFIX}"/tmp/etc/portage/make.conf |
42 |
- { |
43 |
- echo "CFLAGS=\"\${CFLAGS} ${OVERRIDE_CFLAGS}\" #stage3_temp#" |
44 |
- echo "CXXFLAGS=\"\${CXXFLAGS} ${OVERRIDE_CXXFLAGS}\" #stage3_temp#" |
45 |
- echo "LDFLAGS=\"\${LDFLAGS} ${LDFLAGS}\" #stage3_temp#" |
46 |
- } >> "${EPREFIX}"/tmp/etc/portage/make.conf |
47 |
- |
48 |
# Disable the STALE warning because the snapshot frequently gets stale. |
49 |
# |
50 |
# Need need to spam the user about news until the emerge -e system |
51 |
# because the tools aren't available to read the news item yet anyway. |
52 |
# |
53 |
- # Avoid circular deps caused by the default profiles (and IUSE defaults). |
54 |
+ # Avoid circular deps caused by the default profiles (and IUSE |
55 |
+ # defaults). |
56 |
echo "USE=${myuse[*]} PKG=${pkg}" |
57 |
( |
58 |
unset CFLAGS CXXFLAGS |
59 |
@@ -1518,8 +1494,6 @@ do_emerge_pkgs() { |
60 |
emerge -v --oneshot --root-deps ${opts} "${pkg}" |
61 |
) |
62 |
[[ $? -eq 0 ]] || return 1 |
63 |
- rm -f "${EPREFIX}"/usr/portage/profiles/use.{mask,force} |
64 |
- sed -i -e '/#stage3_temp#/d' "${EPREFIX}"/tmp/etc/portage/make.conf |
65 |
|
66 |
case ${pkg},${CHOST} in |
67 |
app-shells/bash,*-cygwin*) |
68 |
@@ -1786,13 +1760,15 @@ bootstrap_stage3() { |
69 |
# We need ${ROOT}/usr/bin/perl to merge glibc. |
70 |
if [[ ! -x "${ROOT}"/usr/bin/perl ]]; then |
71 |
# trick "perl -V:apiversion" check of glibc-2.19. |
72 |
- echo -e "#!${ROOT}/bin/sh\necho 'apiversion=9999'" > "${ROOT}"/usr/bin/perl |
73 |
+ echo -e "#!${ROOT}/bin/sh\necho 'apiversion=9999'" \ |
74 |
+ > "${ROOT}"/usr/bin/perl |
75 |
chmod +x "${ROOT}"/usr/bin/perl |
76 |
fi |
77 |
# Tell dynamic loader the path of libgcc_s.so of stage2 |
78 |
if [[ ! -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf ]]; then |
79 |
mkdir -p "${ROOT}"/etc/ld.so.conf.d |
80 |
- dirname $(gcc -print-libgcc-file-name) > "${ROOT}"/etc/ld.so.conf.d/stage2.conf |
81 |
+ dirname $(gcc -print-libgcc-file-name) \ |
82 |
+ > "${ROOT}"/etc/ld.so.conf.d/stage2.conf |
83 |
fi |
84 |
|
85 |
pkgs=( |
86 |
@@ -1805,7 +1781,8 @@ bootstrap_stage3() { |
87 |
|
88 |
BOOTSTRAP_RAP=yes \ |
89 |
with_stack_emerge_pkgs --nodeps "${pkgs[@]}" || return 1 |
90 |
- grep -q 'apiversion=9999' "${ROOT}"/usr/bin/perl && rm "${ROOT}"/usr/bin/perl |
91 |
+ grep -q 'apiversion=9999' "${ROOT}"/usr/bin/perl && \ |
92 |
+ rm "${ROOT}"/usr/bin/perl |
93 |
|
94 |
pkgs=( |
95 |
sys-devel/binutils-config |
96 |
@@ -1819,7 +1796,8 @@ bootstrap_stage3() { |
97 |
with_stack_emerge_pkgs --nodeps "${pkgs[@]}" || return 1 |
98 |
|
99 |
# remove stage2 ld so that stage3 ld is used by stage2 gcc. |
100 |
- [[ -f ${ROOT}/tmp/usr/${CHOST}/bin/ld ]] && mv ${ROOT}/tmp/usr/${CHOST}/bin/ld{,.stage2} |
101 |
+ [[ -f ${ROOT}/tmp/usr/${CHOST}/bin/ld ]] && \ |
102 |
+ mv ${ROOT}/tmp/usr/${CHOST}/bin/ld{,.stage2} |
103 |
else |
104 |
pkgs=( |
105 |
sys-apps/gentoo-functions |
106 |
@@ -1847,7 +1825,8 @@ bootstrap_stage3() { |
107 |
# Clang unconditionally requires python, the eclasses are really not |
108 |
# setup for a scenario where python doesn't live in the target |
109 |
# prefix and no helpers are available |
110 |
- ( cd "${ROOT}"/usr/bin && test ! -e python && ln -s "${ROOT}"/tmp/usr/bin/python2.7 ) |
111 |
+ ( cd "${ROOT}"/usr/bin && test ! -e python && \ |
112 |
+ ln -s "${ROOT}"/tmp/usr/bin/python2.7 ) |
113 |
# in addition, avoid collisions |
114 |
rm -Rf "${ROOT}"/tmp/usr/lib/python2.7/site-packages/clang |
115 |
|
116 |
@@ -1878,7 +1857,8 @@ bootstrap_stage3() { |
117 |
# However for some reason this nm doesn't quite get it on newer |
118 |
# platforms at least, resulting in bugs like #598336. To cater for |
119 |
# that, get rid of this nm and rely on the host one at this stage |
120 |
- [[ ${CHOST} == *-darwin* ]] && rm -f "${ROOT}"{,/tmp}/usr/bin/{,${CHOST}-}nm |
121 |
+ [[ ${CHOST} == *-darwin* ]] && \ |
122 |
+ rm -f "${ROOT}"{,/tmp}/usr/bin/{,${CHOST}-}nm |
123 |
|
124 |
rm -f "${ROOT}"/etc/ld.so.conf.d/stage2.conf |
125 |
|
126 |
@@ -1952,9 +1932,11 @@ bootstrap_stage3() { |
127 |
# Update the portage tree. |
128 |
treedate=$(date -f "${ROOT}"/usr/portage/metadata/timestamp +%s) |
129 |
nowdate=$(date +%s) |
130 |
- [[ ( ! -e ${PORTDIR}/.unpacked ) && $((nowdate - (60 * 60 * 24))) -lt ${treedate} ]] || \ |
131 |
+ [[ ( ! -e ${PORTDIR}/.unpacked ) && \ |
132 |
+ $((nowdate - (60 * 60 * 24))) -lt ${treedate} ]] || \ |
133 |
if [[ ${OFFLINE_MODE} ]]; then |
134 |
- # --keep used ${DISTDIR}, which make it easier to download a snapshot beforehand |
135 |
+ # --keep used ${DISTDIR}, which make it easier to download a |
136 |
+ # snapshot beforehand |
137 |
emerge-webrsync --keep || return 1 |
138 |
else |
139 |
emerge --sync || emerge-webrsync || return 1 |