Skip to content

Commit

Permalink
FL-106: move metro default make.conf to /etc/portage
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrobbins committed Sep 18, 2012
1 parent 3671493 commit bfc84c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 26 deletions.
20 changes: 1 addition & 19 deletions targets/gentoo/stage1.spec
Original file line number Diff line number Diff line change
Expand Up @@ -75,36 +75,18 @@ if [ -z "${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."
echo "Double check your profile settings and the 'packages' files."
exit 1
else
echo "WE ARE BUILDING: ${buildpkgs}"
fi

export ROOT="$[portage/ROOT]"
install -d ${ROOT}
#DEBUG:

echo "/etc/make.conf contains:"
cat /etc/make.conf
echo
echo "FEATURES is set to:"
echo "$FEATURES"
echo

# It's important to merge baselayout first so it can set perms on key dirs
emerge $eopts --nodeps baselayout || exit 1

echo "/etc/make.conf contains:"
cat /etc/make.conf
echo
echo "FEATURES is set to:"
echo "$FEATURES"
echo
echo "Portage version"
emerge --version
echo

emerge $eopts -p -v --noreplace --oneshot ${buildpkgs} || exit 3
emerge $eopts --noreplace --oneshot ${buildpkgs} || exit 1

Expand Down
20 changes: 13 additions & 7 deletions targets/gentoo/steps/stage.spec
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fi
# work around glibc sandbox issues:
FEATURES="$FEATURES -sandbox"
# the quotes below prevent variable expansion of anything inside make.conf
cat > /etc/make.conf << "EOF"
cat > /etc/portage/make.conf << "EOF"
$[[files/make.conf]]
EOF
if [ "$[portage/files/package.use?]" = "yes" ]
Expand Down Expand Up @@ -187,14 +187,20 @@ else
# stage1 - make sure we include our make.conf and profile link...
pf=""
pf=$[profile/format:zap]
rm -f $ROOT/etc/make.conf $ROOT/etc/portage/make.conf
if [ -e /etc/make.conf ]; then
mkconf=/etc/make.conf
else
mkconf=/etc/portage/make.conf
fi
if [ "$pf" = "new" ]; then
rm -f $ROOT/etc/make.conf $ROOT/etc/portage/make.profile/parent || exit 3
rm -f $ROOT/etc/portage/make.profile/parent || exit 3
install -d $ROOT/etc/portage/make.profile
cp -a /etc/portage/make.profile/parent $ROOT/etc/portage/make.profile/parent || exit 4
cp -a /etc/make.conf $ROOT/etc/make.conf || exit 4
cp -a $mkconf $ROOT/etc/make.conf || exit 4
else
rm -f $ROOT/etc/make.conf $ROOT/etc/make.profile || exit 3
cp -a /etc/make.conf /etc/make.profile $ROOT/etc || exit 4
rm -f $ROOT/etc/make.profile || exit 3
cp -a $mkconf /etc/make.profile $ROOT/etc || exit 4
fi
fi
# clean up temporary locations. Note that this also ends up removing our scripts, which
Expand Down Expand Up @@ -222,11 +228,11 @@ find $ROOT/etc -iname '._cfg????_*' -exec rm -f {} \;
install -d $ROOT/etc/portage

# ensure that make.conf.example is set up OK...
if [ ! -e $ROOT/etc/make.conf.example ]
if [ ! -e $ROOT/etc/portage/make.conf.example ]
then
if [ -e $ROOT/usr/share/portage/config/make.conf.example ]
then
ln -s ../usr/share/portage/config/make.conf.example $ROOT/etc/make.conf.example || exit 6
ln -s ../usr/share/portage/config/make.conf.example $ROOT/etc/portage/make.conf.example || exit 6
fi
fi
# locale-archive can be ~81 MB; this should shrink it to 2MB.
Expand Down

0 comments on commit bfc84c3

Please sign in to comment.