add ability to change ARCH in the options submenu

This commit is contained in:
chess.griffin 2010-02-26 13:45:34 +00:00
parent 59ac74efb1
commit 99515de9bd
2 changed files with 10 additions and 5 deletions

View File

@ -1,4 +1,4 @@
Thu Feb 4 00:07:59 UTC 2010
Fri Feb 26 13:45:20 UTC 2010
Sbopkg 0.XX.X released. This version contains the following fixes and
enhancements:
@ -24,4 +24,5 @@ enhancements:
version of some packages (e.g. google-chrome, whose version is discovered
looking into the source package which can be missing). Thanks to alkos333
for the bug report.
* Add ability to temporarily change $ARCH in the 'options' submenu.
+--------------------------+

View File

@ -3244,6 +3244,14 @@ build_package() {
# Start the actual build
# We loop here to enable a 'retry' if anything goes wrong with the build
while :; do
# Populate BUILDOPTIONS with any found options.build. This has to
# occur outside the subshell below in order to populate $ARCH with any
# a user-added $ARCH option. We will fall back to whatever $ARCH is
# set to originally after the build.
if [[ -f options.build ]]; then
BUILDOPTIONS=$(< options.build)
[[ $BUILDOPTIONS ]] && eval "export $BUILDOPTIONS"
fi
# Fetch the sources
# Note that get_source() "knows" about the source cache, so this isn't
# necessarily a download.
@ -3251,10 +3259,6 @@ build_package() {
get_source $PKGNAME.info.build && (
# Run the build in a subshell, to avoid namespace pollution
echo "Building package for $PKGNAME..."
if [[ -f options.build ]]; then
BUILDOPTIONS=$(< options.build)
[[ $BUILDOPTIONS ]] && eval "export $BUILDOPTIONS"
fi
export OUTPUT=$SB_OUTPUT
# Custom LC_COLLATE settings can break scripts (since some
# expressions, like [A-Z], don't behave as expected -- for