Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to devel-stage-root sorcery by David Brown

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: David Brown <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to devel-stage-root sorcery by David Brown
  • Date: Mon, 29 May 2006 18:44:04 -0500

GIT changes to devel-stage-root sorcery by David Brown <dmlb2000 AT gmail.com>:

ChangeLog | 22 ++
build | 2
usr/sbin/cast | 78 +++++----
usr/sbin/gaze | 297
++++++++++++++++++++++++++++++++++---
usr/sbin/sorcery | 5
usr/share/man/man8/cast.8 | 4
var/lib/sorcery/modules/libcast | 11 -
var/lib/sorcery/modules/libdepends | 5
var/lib/sorcery/modules/libsorcery | 4
9 files changed, 362 insertions(+), 66 deletions(-)

New commits:
commit a26fced35621bd68cf52ce4f210cf9d0e7250836
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

factor cast --queue code out of argument parsing, doing this fixes the
return code issues
(cherry picked from ee80631dbd1695bf18fd00a205ec128ec339d469 commit)

commit 9de0e8a8903c4d44628e217f8d14b6ab83636d33
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

forgot *
(cherry picked from 6ee1f91f1f4aac4ed00f5c68b8be23f79e2e978e commit)

commit a3ca518f37a988f013f101f8e7f6edb40e0da8c5
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

fix bug 12327
(cherry picked from 26a9582e7352c6ed49874c22d56b7dab877b74f7 commit)

commit 09615f85b4596804c8c739e8fa1d4d90274166bb
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

workaround bash 3.0 brokenness
(cherry picked from 5bbff845c2c92fbdd7f3b1b78db17f05dbba8877 commit)

commit 2f2c3ac210f3fde93ff7977b378ea52854eda7ee
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: David Brown <dmlb2000 AT gmail.com>

fix bug 11902, multi-spell conflicts
(cherry picked from f70b117c83926df0af3b134778c1bc13810c5ae2 commit)

commit cd6843adb7ebad10a074042772c21906d97da058
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>

fix bug 11864, add gaze system-info
(cherry picked from 3fe57aca0c3a80d78785a3636e3fb7841647450c commit)

commit 868e7ec49a464b158b2231c959e3b521291e34c2
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: David Brown <dmlb2000 AT gmail.com>

fix bug 10459, make gaze maintainer show the grimoire
(cherry picked from 2c96a46d5ec5175656ae0aff21ee5ce5ab9f18d1 commit)

commit 7cc2cfe20d5b940e82b016f7669f60270b436c08
Author: Andrew Stitt <afrayedknot@thefrayedknot.(none)>
Commit: David Brown <dmlb2000 AT gmail.com>

update build to work with git (first real git based commit)
(cherry picked from dd55abb091f02a130784f20528daec1150f7f65b commit)

diff --git a/ChangeLog b/ChangeLog
index 07495eb..fe0120b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+2006-05-28 Andrew Stitt <astitt AT sourcemage.org>
+ * libcast: fix bug 11902, conflicts are broken for multi-spell
conflicts
+
+2006-05-28 Andrew Stitt <astitt AT sourcemage.org>
+ * cast, sorcery, man8/cast.8, libcast, libsorcery: add cppflags
option,
+ bug 12327, patch from Thomas Orgis.
+
+2006-05-28 Andrew Stitt <astitt AT sourcemage.org>
+ * libdepends: workaround bug in bash 3.0-16, syntax for
+ intialization of local arrays is broken.
+
+2006-05-28 Andrew Stitt <astitt AT sourcemage.org>
+ * cast: factor cast --queue code out of argument parsing, fixed bug
11740
+
+2006-05-28 Andrew Stitt <astitt AT sourcemage.org>
+ * gaze: add system-info command, bug 11864, patch supplied
+ by Andra?? Levstik. Additionally modified to print basesystem
+ depends and changed SMGL_COMPAT_ARCHS printing to be more robust.
+
+2006-05-23 Andrew Stitt <astitt AT sourcemage.org>
+ * build: update to work with git
+
2006-05-12 Andrew Stitt <astitt AT sourcemage.org>
* libunpack: change parameters passed to tar, bug 11413

diff --git a/build b/build
index f0801de..f02fc71 100755
--- a/build
+++ b/build
@@ -1,7 +1,7 @@
#!/bin/bash

function build__find_non_volatile() {
- find "$@" -follow -not -type d -and -not -path '*CVS*' -and -not -name
'.#*' -and -not -name '*~' -and -not -path '*.svn*' -and -not -path
'*.arch-id*' -and -not -path '*{arch}*' -and -not -path '*.bzr*'
+ find "$@" -follow -not -type d -and -not -path '*CVS*' -and -not -name
'.#*' -and -not -name '*~' -and -not -path '*.svn*' -and -not -path
'*.arch-id*' -and -not -path '*{arch}*' -and -not -path '*.bzr*' -and -not
-path '*.git*'
}

branch_dir=$(basename $(pwd))
diff --git a/usr/sbin/cast b/usr/sbin/cast
index b4bb895..2af1d99 100755
--- a/usr/sbin/cast
+++ b/usr/sbin/cast
@@ -23,10 +23,11 @@ Optional Parameters:

--cflags Custom CFLAGS
--cxxflags Custom CXXFLAGS
+ --cppflags Custom CPPFLAGS
--ldflags Custom LDFLAGS
--no-opts Turn off setting optimization flags, except
- for those found in --cflags, --cxxflags and
- --ldflags
+ for those found in --cflags, --cxxflags,
+ --cppflags and --ldflags.

-V [on|off] Override \$VOYEUR setting

@@ -87,10 +88,6 @@ ## @Globals DEPS_ONLY RECONFIGURE COMPIL
## @Globals FORCE_DOWNLOAD SOURCE_CACHE SILENT SEPARATE
## @Globals BASE_URL INSTALL_QUEUE
##
-## Sets these globals except INSTALL_QUEUE according to cast's
-## arguments.
-## Requires some user interaction if --queue is given and starts
-## another cast with INSTALL_QUEUE's content as parameter.
#---------------------------------------------------------------------
function process_parameters() {

@@ -103,6 +100,7 @@ function process_parameters() {

--cflags) export OVERRIDE_CFLAGS="$2"; COMPILE="-c"; shift 2
;;
--cxxflags) export OVERRIDE_CXXFLAGS="$2"; COMPILE="-c"; shift 2
;;
+ --cppflags) export OVERRIDE_CPPFLAGS="$2"; COMPILE="-c"; shift 2
;;
--ldflags) export OVERRIDE_LDFLAGS="$2"; COMPILE="-c"; shift 2
;;
--no-opts) export NO_OPTIMIZATION_FLAGS=1; COMPILE="-c"; shift 1
;;
-V) export VOYEUR_OVERRIDE="$2"; shift 2
;;
@@ -125,36 +123,7 @@ function process_parameters() {
-s) export SEPARATE="$1"; shift 1
;;
--url) export BASE_URL="$2"; shift 2
;;
--pam) cast -c `find_pam_aware` ; shift 1
;;
- --queue)
- if query "Would you like review the queue history for
each spell?" n ; then
- sorcery review-queue
- fi
-
- if [ -s $INSTALL_QUEUE ]; then
- message -n "${MESSAGE_COLOR}Casting install
queue..."
- message "${DEFAULT_COLOR}"
-
- # remove possible empty lines from queue.
- grep -Ev '^$' $INSTALL_QUEUE >"$INSTALL_QUEUE.new"
- rm -f "$INSTALL_QUEUE"
- mv "$INSTALL_QUEUE.new" "$INSTALL_QUEUE"
-
- # cast the queue.
- # SILENT and RECONFIGURE may be empty, they
- # must be at the end or it will confuse parameter
- # parsing
- cast -c `cat $INSTALL_QUEUE 2>/dev/null` "$SILENT"
"$RECONFIGURE"
-
- # report spells still in queue.
- if [ -s $INSTALL_QUEUE ] ; then
- message "${MESSAGE_COLOR}The install queue is not
empty, "
- message "it still contains the following spells: "
- message
"---------------------------------${PROBLEM_COLOR}"
- message "`cat $INSTALL_QUEUE 2>/dev/null`"
- message "${DEFAULT_COLOR}"
- fi
- fi;
- shift 1 ;;
+ --queue) CAST_QUEUE=yes ; COMPILE=$1; shift 1
;;
*) help ;;
esac

@@ -185,6 +154,7 @@ function strip_parameters() {
--deps) shift 1 ;;
--cflags) shift 2 ;;
--cxxflags) shift 2 ;;
+ --cppflags) shift 2 ;;
--ldflags) shift 2 ;;
--no-opts) shift 1 ;;
-V) shift 2 ;;
@@ -728,6 +698,18 @@ function pass_five() {

fi

+ if [[ "$CAST_QUEUE" == "yes" ]] ; then
+ if [ -s $INSTALL_QUEUE ] ; then
+ message "${MESSAGE_COLOR}The install queue is not empty, "
+ message "it still contains the following spells: "
+ message "---------------------------------${PROBLEM_COLOR}"
+ for item in `cat $INSTALL_QUEUE 2>/dev/null`; do
+ message "$item"
+ done | column
+ message "${DEFAULT_COLOR}"
+ return 1
+ fi
+ fi
debug "cast" "End of pass_five"

}
@@ -793,6 +775,30 @@ function main() {
process_parameters "$@"
SPELLS=`strip_parameters "$@"`

+ if [[ "$CAST_QUEUE" == yes ]] ; then
+
+ touch "$INSTALL_QUEUE"
+ local tfile=$(lock_start_transaction "$INSTALL_QUEUE")
+ grep -Ev '^$' $INSTALL_QUEUE > $tfile
+ lock_commit_transaction "$INSTALL_QUEUE"
+ if [ -s $INSTALL_QUEUE ]; then
+ message -n "${MESSAGE_COLOR}Casting install queue..."
+ message "${DEFAULT_COLOR}"
+
+ # remove possible empty lines from queue.
+ if query "Would you like review the queue history for each spell?" n ;
then
+ sorcery review-queue
+ fi
+
+ SPELLS=$(<$INSTALL_QUEUE)
+ else
+ message "${MESSAGE_COLOR}Install queue is empty${DEFAULT_COLOR}"
+ exit
+ fi
+ else
+ SPELLS=`strip_parameters "$@"`
+ fi
+
if [[ $OVERRIDE_GRIMOIRES ]] ; then
codex_set_grimoires $OVERRIDE_GRIMOIRES
fi
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index 2821f64..8c5d314 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -110,6 +110,8 @@ remove-queue <empty> View the remove qu

checkmd5s [spell|section] Print a md5 check of spells

+system-info Show information about a
Source Mage system
+
show-held Shows all held spells.

show-exiled Shows all exiled spells.
@@ -913,31 +915,33 @@ function gaze_show_website() {

#---------------------------------------------------------------------
##
-## Shows the maintainer for the given spell.
-## @param Spell
+## Shows the maintainer for the given section.
+## @param section
##
#---------------------------------------------------------------------
function show_maintainer() {

- for section in $@; do
- ! [[ $GAZE_VERBOSE == 0 ]] &&
- message "${SPELL_COLOR}${section}:${DEFAULT_COLOR}"
- SECTION=`codex_find_section_by_name $section`
+ local section="$1"

- if [ -d "$SECTION" ]; then
-
- if [ -f "$SECTION/MAINTAINER" ]; then
- cat $SECTION/MAINTAINER
+ {
+ echo "Grimoire|Section|Maintainer"
+ echo "--------|-------|----------"
+
+ for GRIMOIRE in $(codex_get_all_grimoires); do
+ codex_set_grimoires $GRIMOIRE
+ SECTION=`codex_find_section_by_name $section`
+ if [[ -d "$SECTION" ]]; then
+ if [[ -f "$SECTION/MAINTAINER" ]]; then
+ echo "$(smgl_basename
${GRIMOIRE})|$section|$(<$SECTION/MAINTAINER)"
+ else
+ echo "$(smgl_basename ${GRIMOIRE})|$section|-"
+ fi
else
- echo "No maintainer available for section '$( basename $SECTION )'"
+ echo "$(smgl_basename ${GRIMOIRE})|-|-"
fi
-
- else
-
- echo "No such section"
-
- fi
- done
+ codex_set_grimoires $GRIMOIRES
+ done
+ } | maybe_column -t -s "|"

}

@@ -1615,6 +1619,260 @@ function gaze_install() {

#---------------------------------------------------------------------
##
+## used by system_info()
+##
+#---------------------------------------------------------------------
+
+function figure_installed()
+{
+ local version
+ version=$(installed_version $1)
+ if [ -n "$version" ]; then
+ message "[${version}]"
+ else
+ message "[not installed]"
+ fi
+}
+
+#---------------------------------------------------------------------
+##
+## displays various information about a Source Mage system
+##
+#---------------------------------------------------------------------
+
+function gaze_system_info()
+{
+ local base_system
+ local cur_spell
+ local section
+ local version
+ local variable
+ local mirror
+ local idx
+ local grimoire
+
+ #---
+ ## Section: ISO VERSION
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: ISO VERSION"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ if [[ -e /etc/sourcemage-release ]]
+ then
+ cat /etc/sourcemage-release | sed '/^$/d'
+ elif [[ -e /etc/smgl.iso ]]
+ then
+ cat /etc/smgl.iso | sed '/^$/d'
+ else
+ message -n "${MESSAGE_COLOR}Couldn't determine what was used to install "
+ message -n "this system. Consider adding some information to "
+ message "/etc/sourcemage-release${DEFAULT_COLOR}"
+ fi
+
+ #---
+ ## Section: UNAME
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: UNAME"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ uname -a
+
+ #---
+ ## Section: BASESYSTEM
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: BASESYSTEM"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ #---
+ ## Need a list of the base spell and ALL of it's DIRECT
+ ## depends(what's in DEPENDS)
+ ## base_system="$(gaze dependencies basesystem 2 | sed
+ ## -e "s/()//" -e 's/ (depends)//' -e 's/ (optional)//' | tr "\n" " " )"
+ #---
+
+ compute_installed_depends down_deps
+ for curr_spell in $(hash_get down_deps basesystem)
+ do
+ version="$(figure_installed $curr_spell)"
+ section="$(codex_get_spell_section_name $curr_spell)"
+ message -n "${MESSAGE_COLOR}${section}/${curr_spell}:\t"
+ message "${QUERY_COLOR}${version}${DEFAULT_COLOR}"
+ done
+
+ #---
+ ## Section: CODEX
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: CODEX"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ let idx=0
+ for grimoire in $(codex_get_all_grimoires)
+ do
+ message -n "${MESSAGE_COLOR} ${QUERY_COLOR}[$idx] :"
+ message -n "$(basename "$grimoire")${MESSAGE_COLOR} :"
+ message "$grimoire ${DEFAULT_COLOR}"
+ let idx+=1
+ done
+
+ #---
+ ## Section: SORCERY CONFIG
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: SORCERY CONFIG"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ for variable in PROMPT_DELAY DOWNLOAD_RATE PATCH SOUND SORCERER CABAL \
+ NICE SORCERY_BRANCH DEF_INSTALL_INIT DEF_ENABLE_INIT \
+ DEF_INSTALL_XINETD DEF_ENABLE_XINETD DEF_INIT_VS_XINETD \
+ COMPRESSBIN EXTENSION URL_HTTP_FTP_TIMEOUT MD5SUM_DL \
+ GPG_VERIFY_SPELL_LEVEL ARCHIVE AUTOFIX UPDATEFIX AUTOPRUNE
\
+ GATHER_DOCS MAIL_REPORTS VIEW_REPORTS PRESERVE SUSTAIN \
+ TMPFS VOYEUR REAP STORE_CONF_LOG NET_SELECT CONFIG_LOC \
+ CLEAN_SOURCE CROSS_INSTALL SET_TERM_TITLE SCREEN \
+ DEBUG SUPER_DEBUG BUILD_DIRECTORY
+ do
+ message -n "${MESSAGE_COLOR}$variable="
+ message "${QUERY_COLOR}\"${!variable}\"${DEFAULT_COLOR}"
+ done
+
+ #---
+ ## Section: STATE CONFIG
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: STATE CONFIG"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ for variable in INSTALL_ROOT STATE_ROOT INSTALL_CACHE TRACK_ROOT
+ do
+ message -n "${MESSAGE_COLOR}$variable="
+ message "${QUERY_COLOR}\"${!variable}\"${DEFAULT_COLOR}"
+ done
+
+ #---
+ ## Section: COMPILER CONFIG
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: COMPILER CONFIG"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ message -n "${MESSAGE_COLOR}SMGL_COMPAT_ARCHS=${DEFAULT_COLOR}"
+ for each in ${SMGL_COMPAT_ARCHS[@]}
+ do
+ message -n "${QUERY_COLOR}${each}${DEFAULT_COLOR}/"
+ done
+ message -n "\n"
+
+ for variable in ARCHITECTURE OPTIMIZATIONS CUSTOM_CFLAGS CUSTOM_CXXFLAGS \
+ CUSTOM_LDFLAGS CFLAGS CXXFLAGS LDFLAGS HOST CCACHE \
+ DISTCC_HOSTS JOBS_PER_HOST MAKE_NJOBS CCACHE_DIR
+ do
+ message -n "${MESSAGE_COLOR}$variable="
+ message "${QUERY_COLOR}\"${!variable}\"${DEFAULT_COLOR}"
+ done
+
+ #---
+ ## Section: VERIFICATION CONFIG
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: VERIFICATION CONFIG"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ for variable in VRF_ALLOWED_LEVELS VRF_ALLOW_NEW_LEVELS VRF_ALLOWED_HASHES
\
+ VRF_ALLOW_NEW_HASHES GPG_VERIFY_SORCERY GPG_VERIFY_GRIMOIRE
+ do
+ message -n "${MESSAGE_COLOR}$variable="
+ message "${QUERY_COLOR}\"${!variable}\"${DEFAULT_COLOR}"
+ done
+
+ #---
+ ## Section: CLEANSE CONFIG
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: CLEANSE CONFIG"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ for variable in FIND_CHECK MD5SUM_CHECK LDD_CHECK SYM_CHECK
+ do
+ message -n "${MESSAGE_COLOR}$variable="
+ message "${QUERY_COLOR}\"${!variable}\"${DEFAULT_COLOR}"
+ done
+
+ #---
+ ## Section: DISPEL CONFIG
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: DISPEL CONFIG"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ for variable in ORPHAN_MENU_DEFAULT NONORPHAN_MENU_DEFAULT \
+ RECAST_PARENT_MENU_DEFAULT DISPEL_PARENT_MENU_DEFAULT
+ do
+ message -n "${MESSAGE_COLOR}$variable="
+ message "${QUERY_COLOR}\"${!variable}\"${DEFAULT_COLOR}"
+ done
+
+ #---
+ ## Section: LOCALE CONFIG
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: LOCALE CONFIG"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ for variable in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY \
+ LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE \
+ LC_MEASUREMENT LC_IDENTIFICATION LC_ALL
+ do
+ if [[ ! -z ${!variable} ]]
+ then
+ message -n "${MESSAGE_COLOR}$variable="
+ message "${QUERY_COLOR}\"${!variable}\"${DEFAULT_COLOR}"
+ fi
+ done
+
+ #---
+ ## Section: FACILITIES
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: FACILITIES"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ cat /etc/sysconfig/facilities | sed -e '/^$/d' -e '/^#.*$/d'
+
+ #---
+ ## Section: MIRRORS
+ #---
+
+ message -n "${PROBLEM_COLOR}--------------------{"
+ message -n "Section: MIRRORS"
+ message "}--------------------${DEFAULT_COLOR}"
+
+ for mirror in APACHE_URL CTAN_URL GNOME_URL GNU_URL KDE_URL KERNEL_URL \
+ SORCERY_URL SOURCEFORGE_URL XFREE86_URL CODEX_URL
+ do
+ message -n "${MESSAGE_COLOR}$mirror="
+ message "${QUERY_COLOR}\"${!mirror}\"${DEFAULT_COLOR}"
+ done
+
+}
+
+#---------------------------------------------------------------------
+##
## prints all spells of a given status.
## @param status - what are we looking for
## @param describe - how is that staus described in english
@@ -1701,9 +1959,10 @@ parse() {
import) import_snapshot $2 ;;
section) shift; gaze_show_section $@ ;;
version) shift; gaze_show_version $@ ;;
- versions) shift; gaze_show_versions $@ ;;
+ versions) shift; gaze_show_versions $@ ;;
license) shift; gaze_show_license $@ ;;
alien) alien ;;
+ system-info) gaze_system_info ;;
activity) display $ACTIVITY_LOG ;;
from) show_from $2 ;;
newer) newer $2 ;;
diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index 558e0a9..ee72138 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -832,7 +832,8 @@ custom_optimization_menu() {
17 50 9 \
CFLAGS "$CUSTOM_CFLAGS" \
CXXFLAGS "$CUSTOM_CXXFLAGS" \
- LDFLAGS "$CUSTOM_LDFLAGS"'`)
+ LDFLAGS "$CUSTOM_LDFLAGS" \
+ CPPFLAGS "$CUSTOM_CPPFLAGS"'`)
rc=$?
[[ $rc == 0 ]] || [[ $rc == 1 ]] && break
set ${RESULTS[*]}
@@ -841,6 +842,7 @@ custom_optimization_menu() {
case "$KEY" in
CFLAGS) CUSTOM_CFLAGS="$@" ;;
CXXFLAGS) CUSTOM_CXXFLAGS="$@" ;;
+ CPPFLAGS) CUSTOM_CPPFLAGS="$@" ;;
LDFLAGS) CUSTOM_LDFLAGS="$@" ;;
esac
done
@@ -850,6 +852,7 @@ custom_optimization_menu() {
modify_local_config CUSTOM_CFLAGS "$CUSTOM_CFLAGS"
modify_local_config CUSTOM_CXXFLAGS "$CUSTOM_CXXFLAGS"
modify_local_config CUSTOM_LDFLAGS "$CUSTOM_LDFLAGS"
+ modify_local_config CUSTOM_CPPFLAGS "$CUSTOM_CPPFLAGS"
fi
}

diff --git a/usr/share/man/man8/cast.8 b/usr/share/man/man8/cast.8
index 1860c6e..9841f5f 100644
--- a/usr/share/man/man8/cast.8
+++ b/usr/share/man/man8/cast.8
@@ -30,8 +30,8 @@ This disables that behavior.
.SS "--deps"
Determines dependencies for the given spell(s) and casts the dependencies,
but does not cast the given spell(s) itself.
-.SS "--cflags, --cxxflags, --ldflags"
-Set custom cflags/cxxflags/ldflags values to override those found in
+.SS "--cflags, --cxxflags, --ldflags, --cppflags"
+Set custom cflags/cxxflags/ldflags/cppflags values to override those found in
arch specs, and set through the sorcery menu.
.SS "--no-opts"
Disable the use of optimization flags from arch specs and the sorcery
diff --git a/var/lib/sorcery/modules/libcast b/var/lib/sorcery/modules/libcast
index 08a9cef..52c56f4 100755
--- a/var/lib/sorcery/modules/libcast
+++ b/var/lib/sorcery/modules/libcast
@@ -95,7 +95,7 @@ function run_conflicts() {

debug "build_api/common" "Starting run_conflicts() on $SPELL"
local ignore_conflict=$1
- local each
+ local each rc

if [ -x $SCRIPT_DIRECTORY/CONFLICTS ]; then
local CONFLICTS=$(
@@ -120,16 +120,16 @@ function run_conflicts() {
text="$text ${SPELL_COLOR}${spell_and_default[0]}${MESSAGE_COLOR}?"

if query "$text" ${spell_and_default[1]} ; then
- to_dispel="$to_dispel ${spell_and_default[0]}"
+ dispel ${spell_and_default[0]} || rc=1
echo ${spell_and_default[0]} >> $CONFLICT_LIST
else
echo $SPELL >> $FAILED_LIST
return 1
fi

- dispel $to_dispel
done
fi
+ return ${rc:-0}

}

@@ -141,6 +141,7 @@ function query_custom_cflags() {
persistent_add USER_SPELL_CFLAGS
persistent_add USER_SPELL_CXXFLAGS
persistent_add USER_SPELL_LDFLAGS
+ persistent_add USER_SPELL_CPPFLAGS
local RESULTS KEY rc
while true ; do
# input box returns things of the form "RENAMED CFLAGS -O3 -march=foo
..."
@@ -151,7 +152,8 @@ function query_custom_cflags() {
17 50 9 \
CFLAGS "$USER_SPELL_CFLAGS" \
CXXFLAGS "$USER_SPELL_CXXFLAGS" \
- LDFLAGS "$USER_CUSTOM_LDFLAGS"'`)
+ LDFLAGS "$USER_SPELL_LDFLAGS"' \
+ CPPFLAGS "$USER_SPELL_CPPFLAGS"`)
rc=$?
[[ $rc == 0 ]] || [[ $rc == 1 ]] && break
set ${RESULTS[*]}
@@ -161,6 +163,7 @@ function query_custom_cflags() {
CFLAGS) USER_SPELL_CFLAGS="$@" ;;
CXXFLAGS) USER_SPELL_CXXFLAGS="$@" ;;
LDFLAGS) USER_SPELL_LDFLAGS="$@" ;;
+ CPPFLAGS) USER_SPELL_CPPFLAGS="$@" ;;
esac
done
fi
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index 7f55f1d..186d8ef 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -246,8 +246,9 @@ function run_other_sub_depends() {
SPELL=$sub_dependee
run_details
local NEW_SUB_DEPENDEES=""
- local NEW_DEPENDS=()
- local NEW_RUNTIME_DEPENDS=()
+ # afk 5-28-06: bash 3.0 breaks local foo=(), have to make this two
lines
+ local NEW_DEPENDS; NEW_DEPENDS=()
+ local NEW_RUNTIME_DEPENDS; NEW_RUNTIME_DEPENDS=()
process_sub_depends "$this_spell" "$sub_dependee" "$sub_depends" ||
return 1

diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 3c999ce..8340863 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -653,7 +653,7 @@ #---------------------------------------
function optimize() {
debug "libsorcery" "In optimize()"

- unset CFLAGS CXXFLAGS LDFLAGS
+ unset CFLAGS CXXFLAGS LDFLAGS CPPFLAGS
unset COMBRELOC FAST PRELINK RISKY SMALL SPEEDY STRIP TINY

# if user specified --no-opts then use only the args from the command line
@@ -662,6 +662,7 @@ function optimize() {
export CFLAGS="$OVERRIDE_CFLAGS"
export CXXFLAGS="$OVERRIDE_CXXFLAGS"
export LDFLAGS="$OVERRIDE_LDLAGS"
+ export CPPFLAGS="$OVERRIDE_CPPFLAGS"
else
set_architecture
debug "ARCHITECTURE='${ARCHITECTURE}'"
@@ -710,6 +711,7 @@ function optimize() {
export CFLAGS=$(echo $CFLAGS $CUSTOM_CFLAGS $OVERRIDE_CFLAGS
$USER_SPELL_CFLAGS)
export CXXFLAGS=$(echo $CFLAGS $CUSTOM_CXXFLAGS $OVERRIDE_CXXFLAGS
$USER_SPELL_CXXFLAGS)
export LDFLAGS=$(echo $LDFLAGS $CUSTOM_LDFLAGS $OVERRIDE_LDLAGS
$USER_SPELL_LDFLAGS)
+ export CPPFLAGS=$(echo $CPPFLAGS $CUSTOM_CPPFLAGS $OVERRIDE_CPPFLAGS
$USER_SPELL_CPPFLAGS)
fi

}




Archive powered by MHonArc 2.6.24.

Top of Page