aboutsummaryrefslogtreecommitdiff
blob: dadd0f57cc2d4b19fbf849e8a32554f9ed01189e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash

# We do this first, so we know our package list for --debug
export clst_buildpkgs="$(/tmp/build.py)"

source /tmp/chroot-functions.sh

# Setup our environment
BOOTSTRAP0_USE="$(portageq envvar BOOTSTRAP_USE)"
FEATURES="${clst_myfeatures} nodoc noman noinfo -news"

## Sanity check profile
if [ -z "${clst_buildpkgs}" ]
then
	echo "Your profile seems to be broken."
	echo "Could not build a list of build packages."
	echo "Double check your /etc/make.profile link and the 'packages' files."
	exit 1
fi

## START BUILD
# First, we drop in a known-good baselayout
[ -e /etc/make.conf ] && \
	echo 'USE="${USE} -build"' >> /etc/make.conf
run_merge "--oneshot --nodeps sys-apps/baselayout"
sed -i '/USE="${USE} -build"/d' /etc/make.conf

# Next, we install the package manager
clst_root_path=/ setup_pkgmgr
make_destpath /tmp/stage1root

# Now, we install our packages
[ -e /etc/make.conf ] && \
	echo "USE=\"-* bindist build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"" \
	>> /etc/make.conf
run_merge "--oneshot ${clst_buildpkgs}"
sed -i "/USE=\"-* bindist build ${BOOTSTRAP_USE} ${clst_HOSTUSE}\"/d" \
	/etc/make.conf