Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (65e5df81052237ed6050d9fceefb6bcc0e6e9d38)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Jaka Kranjc <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (65e5df81052237ed6050d9fceefb6bcc0e6e9d38)
  • Date: Tue, 17 Jun 2008 16:33:17 -0500

GIT changes to master sorcery by Jaka Kranjc <lynxlynxlynx AT sourcemage.org>:

ChangeLog | 16 +++++++++++++
etc/sorcery/compile_config | 11 ++++-----
etc/sorcery/config | 21 ++++++++++++-----
etc/sorcery/media | 8 +++---
etc/sorcery/roots | 8 +++---
etc/sorcery/url | 44
++++++++++++++++++------------------
usr/sbin/sorcery | 2 -
usr/share/man/man5/sorcery_config.5 | 2 -
var/lib/sorcery/modules/libstate | 16 ++++++-------
var/lib/sorcery/modules/libtablet | 11 ++++-----
10 files changed, 82 insertions(+), 57 deletions(-)

New commits:
commit 65e5df81052237ed6050d9fceefb6bcc0e6e9d38
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libtablet: append to the link_log, don't overwrite it each time

commit 18a01137dcb6436756085ba2946651d2fcbaa106
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libtablet: sped up tablet_coalesce_files to take a third of the time

commit 663cdae4105a4dddc121a7a381931bdb72e3109d
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

sorcery_config.5: clarify what the internal_version is for

commit b11e8eb7ec4f8c90df1ee4eeca8076821ab49e11
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

* libstate: change modify_config to store values into variables in a
manner
that is overridable from the environment (var=${var:-value}) #14454
* sorcery: store COLOR in LOCAL_MEDIA_CONFIG, so there are no
problems with
ordering when sourcing our libraries
* config: source LOCAL_CONFIG before everything else; added a
temporary
color() override to make the switch for the user
* compile_config, media, roots, url: accompanying change
to benefit you must convert your local configs to the new system
(ex.):
sed -i 's,^\(\s*\)\([^=]*\)=\(.*\),\1\2=${\2:-\3},'
/etc/sorcery/config

diff --git a/ChangeLog b/ChangeLog
index 1455e16..d784441 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2008-06-17 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * sorcery_config.5: clarify what the internal_version is for
+ * libtablet: sped up tablet_coalesce_files to take a third of the time
+ append to the link_log, don't overwrite it each time
+
+2008-06-16 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libstate: change modify_config to store values into variables in a
manner
+ that is overridable from the environment (var=${var:-value}) #14454
+ * sorcery: store COLOR in LOCAL_MEDIA_CONFIG, so there are no
problems with
+ ordering when sourcing our libraries
+ * config: source LOCAL_CONFIG before everything else; added a
temporary
+ color() override to make the switch for the user
+ * compile_config, media, roots, url: accompanying change
+ to benefit you must convert your local configs to the new system
(ex.):
+ sed -i 's,^\(\s*\)\([^=]*\)=\(.*\),\1\2=${\2:-\3},'
/etc/sorcery/config
+
2008-06-07 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libcodex: fixed an ancient minibug in codex_check_cache - the error
message was printing the wrong variable
diff --git a/etc/sorcery/compile_config b/etc/sorcery/compile_config
index 5e1fcc5..d89846b 100644
--- a/etc/sorcery/compile_config
+++ b/etc/sorcery/compile_config
@@ -1,12 +1,11 @@
- LOCAL_COMPILE_CONFIG=/etc/sorcery/local/compile_config
+
LOCAL_COMPILE_CONFIG=${LOCAL_COMPILE_CONFIG:-/etc/sorcery/local/compile_config}
+if [[ -e $LOCAL_COMPILE_CONFIG ]]; then
+ . $LOCAL_COMPILE_CONFIG
+fi

CCACHE=${CCACHE:-off}
CCACHE_DIR=${CCACHE_DIR:-/var/cache/compiler}
DISTCC_HOSTS=${DISTCC_HOSTS:-""}
JOBS_PER_HOST=${JOBS_PER_HOST:-0}
MAKE_NJOBS=${MAKE_NJOBS:-1}
- RUN_COMPILER_DIR=/var/lib/sorcery/build
-
-if [[ -e $LOCAL_COMPILE_CONFIG ]]; then
- . $LOCAL_COMPILE_CONFIG
-fi
+ RUN_COMPILER_DIR=${RUN_COMPILER_DIR:-/var/lib/sorcery/build}
diff --git a/etc/sorcery/config b/etc/sorcery/config
index f86bc2b..e2d4495 100755
--- a/etc/sorcery/config
+++ b/etc/sorcery/config
@@ -1,6 +1,21 @@
export DIALOGRC=/etc/sorcery/dialogrc
shopt -u expand_aliases

+ LOCAL_CONFIG=/etc/sorcery/local/config
+ LOCAL_ROOTS_CONFIG=/etc/sorcery/local/roots
+ LOCAL_MEDIA_CONFIG=/etc/sorcery/local/media
+ LOCAL_URL_CONFIG=/etc/sorcery/local/url
+
+# numb color, so it doesn't fail for users who have it in LOCAL_CONFIG
+# its use was moved to LOCAL_MEDIA_CONFIG; remove this in 1.16
+color() {
+ if grep -q '^ *color "*off' $LOCAL_CONFIG; then
+ echo 'color "off"' >> $LOCAL_MEDIA_CONFIG
+ fi
+ sed -i '/^\s*color "*o[nf]f*"*/d' $LOCAL_CONFIG
+}
+. $LOCAL_CONFIG
+
CAST=cast
SORCERY_BRANCH="stable"
ARCHIVE=${ARCHIVE:=on}
@@ -77,11 +92,6 @@ FORCE_BASESYSTEM_DEPENDS=${FORCE_BASESYSTEM_DEPENDS:-off}

CONFIG_CACHE=/etc/sorcery/local

- LOCAL_ROOTS_CONFIG=/etc/sorcery/local/roots
- LOCAL_MEDIA_CONFIG=/etc/sorcery/local/media
- LOCAL_URL_CONFIG=/etc/sorcery/local/url
- LOCAL_CONFIG=/etc/sorcery/local/config
-
SORCERY_INSTALL_LOG=/etc/sorcery/install.log

MIRRORS=/etc/sorcery/mirrors
@@ -174,7 +184,6 @@ PROGRESS_SPINNER_CHARS='-\|/'
. $ROOTS_CONFIG
. $URL_CONFIG
. $STATE_CONFIG
-. $LOCAL_CONFIG
. $COMPILE_CONFIG
. $SCREEN_CONFIG

diff --git a/etc/sorcery/media b/etc/sorcery/media
index 347f1a0..44c0b4f 100755
--- a/etc/sorcery/media
+++ b/etc/sorcery/media
@@ -1,7 +1,7 @@
- SOUND_DIRECTORY=${SGL_LIBRARY}/sound
- SOUND_THEME="startrek"
- SOUND="off"
- COLOR_SCHEME="bright"
+ SOUND_DIRECTORY=${SOUND_DIRECTORY:-$SGL_LIBRARY/sound}
+ SOUND_THEME=${SOUND_THEME:-"startrek"}
+ SOUND=${SOUND:-"off"}
+ COLOR_SCHEME=${COLOR_SCHEME:-"bright"}

test -e $LOCAL_MEDIA_CONFIG && . $LOCAL_MEDIA_CONFIG
media_init ""
diff --git a/etc/sorcery/roots b/etc/sorcery/roots
index d7c9488..e8f69fc 100755
--- a/etc/sorcery/roots
+++ b/etc/sorcery/roots
@@ -1,10 +1,10 @@
+if [[ -e $LOCAL_ROOTS_CONFIG ]]; then
+ . $LOCAL_ROOTS_CONFIG
+fi
+
INSTALL_ROOT="$INSTALL_ROOT"
STATE_ROOT="$STATE_ROOT"
TRACK_ROOT="$TRACK_ROOT"
CODEX_ROOT="${CODEX_ROOT:-/var/lib/sorcery/codex}"
INSTALL_CACHE="${INSTALL_CACHE:-/var/cache/sorcery}"

-if [[ -e $LOCAL_ROOTS_CONFIG ]]; then
- . $LOCAL_ROOTS_CONFIG
-fi
-
diff --git a/etc/sorcery/url b/etc/sorcery/url
index 1121fb7..bb71b60 100755
--- a/etc/sorcery/url
+++ b/etc/sorcery/url
@@ -1,21 +1,25 @@
- GNU_URL=ftp://ftp.gnu.org/pub/gnu
- KDE_URL=ftp://ftp.kde.org/pub/kde
- CTAN_URL=ftp://tug.ctan.org/tex-archive
- GNOME_URL=ftp://ftp.gnome.org/pub/GNOME
- KERNEL_URL=ftp://ftp.kernel.org
- XFREE86_URL=ftp://ftp.xfree86.org/pub/XFree86
- SORCERY_URL=http://download.sourcemage.org/sorcery/
- SOURCEFORGE_URL=http://osdn.dl.sourceforge.net/sourceforge
- APACHE_URL=http://www.ibiblio.org/pub/mirrors/apache
- PERL_CPAN_URL=http://www.cpan.org
+if [[ -e $LOCAL_URL_CONFIG ]]; then
+ . $LOCAL_URL_CONFIG
+fi
+
+ GNU_URL=${GNU_URL:-ftp://ftp.gnu.org/pub/gnu}
+ KDE_URL=${KDE_URL:-ftp://ftp.kde.org/pub/kde}
+ CTAN_URL=${CTAN_URL:-ftp://tug.ctan.org/tex-archive}
+ GNOME_URL=${GNOME_URL:-ftp://ftp.gnome.org/pub/GNOME}
+ KERNEL_URL=${KERNEL_URL:-ftp://ftp.kernel.org}
+ XFREE86_URL=${XFREE86_URL:-ftp://ftp.xfree86.org/pub/XFree86}
+ SORCERY_URL=${SORCERY_URL:-http://download.sourcemage.org/sorcery/}
+
SOURCEFORGE_URL=${SOURCEFORGE_URL:-http://osdn.dl.sourceforge.net/sourceforge}
+
APACHE_URL=${APACHE_URL:-http://www.ibiblio.org/pub/mirrors/apache}
+ PERL_CPAN_URL=${PERL_CPAN_URL:-http://www.cpan.org}
#
# Set FURLNUM to nr. of fallback urls.
#
- FURLNUM=4
-FALLBACK_URL_MIRROR[0]=http://smgl.positivism.org
-FALLBACK_URL_MIRROR[1]=ftp://thefrayedknot.armory.com/sorcery
-FALLBACK_URL_MIRROR[2]=http://download.sourcemage.org/mirror
-FALLBACK_URL_MIRROR[3]=http://shlrm.org/sourcemage
+FALLBACK_URL_MIRROR[0]=${FALLBACK_URL_MIRROR[0]:-http://smgl.positivism.org}
+FALLBACK_URL_MIRROR[1]=${FALLBACK_URL_MIRROR[1]:-ftp://thefrayedknot.armory.com/sorcery}
+FALLBACK_URL_MIRROR[2]=${FALLBACK_URL_MIRROR[2]:-http://download.sourcemage.org/mirror}
+FALLBACK_URL_MIRROR[3]=${FALLBACK_URL_MIRROR[3]:-http://shlrm.org/sourcemage}
+ FURLNUM=${#FALLBACK_URL_MIRROR[@]}

# specify default fallback url.
LEAPFORWARD_URL=${LEAPFORWARD_URL:=""}
@@ -27,14 +31,10 @@ FALLBACK_URL_MIRROR[3]=http://shlrm.org/sourcemage
CONNECT_SCRIPT=${CONNECT_SCRIPT:-pon}
INTERNET_INTERFACES=${INTERNET_INTERFACES:-"eth wlan bnep ath tr atml ppp"}

- CODEX_TARBALL_URL=http://codex.sourcemage.org
- CODEX_RSYNC_URL=rsync://sourcemage.org::codex
- CODEX_MANIFEST_URL=http://codex.sourcemage.org
+ CODEX_TARBALL_URL=${CODEX_TARBALL_URL:-http://codex.sourcemage.org}
+ CODEX_RSYNC_URL=${CODEX_RSYNC_URL:-rsync://sourcemage.org::codex}
+ CODEX_MANIFEST_URL=${CODEX_MANIFEST_URL:-http://codex.sourcemage.org}

# reverse the comments below to use rsync by default
CODEX_URL=${CODEX_URL:=$CODEX_TARBALL_URL}
#CODEX_URL=${CODEX_URL:=$CODEX_RSYNC_URL}
-
-if [[ -e $LOCAL_URL_CONFIG ]]; then
- . $LOCAL_URL_CONFIG
-fi
diff --git a/usr/sbin/sorcery b/usr/sbin/sorcery
index 8fadec8..b35b718 100755
--- a/usr/sbin/sorcery
+++ b/usr/sbin/sorcery
@@ -1583,7 +1583,7 @@ feature_menu() {
for i in ${TEMP[*]} ; do
case $i in
CCACHE) modify_config $LOCAL_COMPILE_CONFIG CCACHE $CCACHE ;;
- COLOR) modify_local_config "color" "$COLOR" "command" ;;
+ COLOR) modify_config $LOCAL_MEDIA_CONFIG "color" "$COLOR" "command"
;;
*) modify_local_config "$i" "${!i}" ;;
esac
done
diff --git a/usr/share/man/man5/sorcery_config.5
b/usr/share/man/man5/sorcery_config.5
index 921fca6..8f79f3a 100644
--- a/usr/share/man/man5/sorcery_config.5
+++ b/usr/share/man/man5/sorcery_config.5
@@ -40,7 +40,7 @@ contains the current version of sorcery.
.PP
.I internal_version
.IP
-contains 0. No discernible use.
+contains 0. It provides a quick way to check the current on-disk format
version. It has never been changed yet.
.PP
.I dialogrc
.IP
diff --git a/var/lib/sorcery/modules/libstate
b/var/lib/sorcery/modules/libstate
index c2c2304..b152a83 100755
--- a/var/lib/sorcery/modules/libstate
+++ b/var/lib/sorcery/modules/libstate
@@ -1040,11 +1040,6 @@ function modify_config() {

local TEMP separator EQUALS_COL VARIABLE

- # what to use as separator?
- if [[ $3 == command ]]
- then separator=" "
- else separator="=" ; fi
-
if ! test -f $FILE; then
if ! test -d $(smgl_dirname $FILE); then
if test -e $(smgl_dirname $FILE); then
@@ -1072,8 +1067,13 @@ function modify_config() {
done

debug "libstate" "modify_config() - entering new value $VARIABLE
$seperator $@ into $tFILE"
- # put new value and justification in
- echo "${TEMP}${1}${separator}\"$2\"" >> $tFILE
+ # put the new value and justification in
+ # assign the value in a way that can be overriden from the environment
#14454
+ if [[ $3 == command ]]; then
+ echo "${TEMP}${1} \"$2\""
+ else
+ echo "${TEMP}${1}=\"\${$1:-$2}\""
+ fi >> $tFILE

lock_commit_transaction $FILE

@@ -1084,7 +1084,7 @@ function modify_config() {
## @param variable
## @param command (optional)
##
-## Modifies (or adds) an entry in the local/config.
+## Removes an entry in the local/config.
## If "command" is the third argument, a space will separate the
## variable and value rather than the equals sign.
##
diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index 0f9e641..276bf35 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -923,12 +923,13 @@ function tablet_coalesce_files() {

local total_files=$(find $dir -type f 2>/dev/null|wc -l)
message "Computing md5sum of $total_files tablet files"
- function tablet_coalesce_files_sub() {
- hash_append tablet_coalesce $(md5sum $1 2>/dev/null)
+ # the + makes find stack found files, so md5sum is invoked a lot less often
+ find $dir -type f -exec md5sum {} + 2>/dev/null |
+ while read line; do
+ hash_append tablet_coalesce $line
progress_bar $i $total_files
let i+=1
- }
- iterate tablet_coalesce_files_sub $'\n' "$(find $dir -type f)"
+ done
message ""

# hash_get_table dumps out the table values one per line
@@ -938,7 +939,7 @@ function tablet_coalesce_files() {
hash_get_table tablet_coalesce| while read -a cdr; do
car=${cdr[0]}
for (( i=1 ; i<${#cdr[*]} ; i++ )) ; do
- echo "Linking $car to ${cdr[$i]}" > $link_log
+ echo "Linking $car to ${cdr[$i]}" >> $link_log
ln -f $car ${cdr[$i]}
done
done



  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (65e5df81052237ed6050d9fceefb6bcc0e6e9d38), Jaka Kranjc, 06/17/2008

Archive powered by MHonArc 2.6.24.

Top of Page