@@ -1876,10 +1876,29 @@ bootstrap_stage2() {
1876
1876
# see profiles/features/prefix/standalone/profile.bashrc
1877
1877
export BOOTSTRAP_RAP_STAGE2=yes
1878
1878
1879
+ # elt-patches needs gentoo-functions, but gentoo-functions these
1880
+ # days needs meson to install, which requires a properly installed
1881
+ # Python -- at this stage we don't have that
1882
+ # so fake gentoo-functions with some dummies to make elt-patches
1883
+ # and others install
1884
+ if [[ ! -e " ${ROOT} " /tmp/lib/gentoo/functions.sh ]] ; then
1885
+ mkdir -p " ${ROOT} " /tmp/lib/gentoo
1886
+ cat > " ${ROOT} " /tmp/lib/gentoo/functions.sh << -EOF
1887
+ #!${BASH}
1888
+
1889
+ ewarn() {
1890
+ echo $*
1891
+ }
1892
+
1893
+ eerror() {
1894
+ echo "!!! $* "
1895
+ }
1896
+ EOF
1897
+ fi
1898
+
1879
1899
# Build a basic compiler and portage dependencies in $ROOT/tmp.
1880
1900
pkgs=(
1881
1901
sys-devel/gnuconfig
1882
- sys-apps/gentoo-functions
1883
1902
app-portage/elt-patches
1884
1903
sys-libs/ncurses
1885
1904
sys-libs/readline
@@ -2130,6 +2149,16 @@ bootstrap_stage3() {
2130
2149
read -r -a linker_pkgs <<< " ${linker}"
2131
2150
read -r -a compiler_pkgs <<< " ${compiler}"
2132
2151
2152
+ # We need gentoo-functions but it meson is still a no-go, because we
2153
+ # don't have a Python. Why would such simple package with a silly
2154
+ # script file need meson is beyond me. So, we have no other way
2155
+ # than to fake it here for the time being like in stage2.
2156
+ if [[ ! -e " ${ROOT} " /lib/gentoo/functions.sh ]] ; then
2157
+ mkdir -p " ${ROOT} " /lib/gentoo
2158
+ cp " ${ROOT} " /tmp/lib/gentoo/functions.sh \
2159
+ " ${ROOT} " /lib/gentoo/functions.sh
2160
+ fi
2161
+
2133
2162
if is-rap ; then
2134
2163
# We need ${ROOT}/usr/bin/perl to merge glibc.
2135
2164
if [[ ! -x " ${ROOT} " /usr/bin/perl ]]; then
@@ -2166,7 +2195,6 @@ bootstrap_stage3() {
2166
2195
pkgs=(
2167
2196
sys-devel/gnuconfig
2168
2197
sys-apps/baselayout
2169
- sys-apps/gentoo-functions
2170
2198
app-portage/elt-patches
2171
2199
sys-kernel/linux-headers
2172
2200
sys-libs/glibc
@@ -2218,7 +2246,6 @@ bootstrap_stage3() {
2218
2246
else
2219
2247
pkgs=(
2220
2248
sys-devel/gnuconfig
2221
- sys-apps/gentoo-functions
2222
2249
app-portage/elt-patches
2223
2250
app-arch/xz-utils
2224
2251
sys-apps/sed
@@ -2283,7 +2310,7 @@ bootstrap_stage3() {
2283
2310
# now we have a shell right there
2284
2311
unset CONFIG_SHELL
2285
2312
2286
- # Build portage and dependencies.
2313
+ # Build portage dependencies.
2287
2314
pkgs=(
2288
2315
sys-apps/coreutils
2289
2316
sys-apps/findutils
@@ -2306,6 +2333,7 @@ bootstrap_stage3() {
2306
2333
virtual/os-headers
2307
2334
sys-devel/gettext
2308
2335
sys-apps/portage
2336
+ sys-apps/gentoo-functions
2309
2337
)
2310
2338
2311
2339
pre_emerge_pkgs " " " ${pkgs[@]} " || return 1
0 commit comments