Skip to Content.
Sympa Menu

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

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 (0d74957ecafa0c808ce7610733510985f2641a8b)
  • Date: Tue, 25 Mar 2008 11:21:24 -0500

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

ChangeLog | 8 ++++++
etc/sorcery/config | 3 +-
etc/sorcery/roots | 14 ++++++-----
var/lib/sorcery/modules/libsorcery | 44
++++++++++++++-----------------------
4 files changed, 35 insertions(+), 34 deletions(-)

New commits:
commit 0d74957ecafa0c808ce7610733510985f2641a8b
Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>

libsorcery: then did the same for dirnames - formatting, local vars

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

roots: honor environment variables #13263 and improve sourcing #14304

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

libsorcery: rewrote filename_indicates_compression to be less dumb

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

config: added STAGED_INSTALL default and added DEBUG to the unstaged list

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

libsorcery: reformatted the files, directories and symlinks functions and
made their variable local

diff --git a/ChangeLog b/ChangeLog
index a86fcf9..42ad804 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-03-25 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libsorcery: reformatted the files, directories and symlinks
functions and
+ made their variable local
+ then did the same for dirnames
+ * config: added STAGED_INSTALL default and added DEBUG to the
unstaged list
+ * libsorcery: rewrote filename_indicates_compression to be less dumb
+ * roots: honor environment variables #13263 and improve sourcing
#14304
+
2008-03-24 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libcodex: made a few trivial optimisations, making the remaining
relevant
functions return by reference
diff --git a/etc/sorcery/config b/etc/sorcery/config
index 536136b..67f0a6d 100755
--- a/etc/sorcery/config
+++ b/etc/sorcery/config
@@ -33,6 +33,7 @@ shopt -u expand_aliases
UMASK=${UMASK:=0022}
SORCERY_PATH="/usr/sbin"
FORCE_BASESYSTEM_DEPENDS=${FORCE_BASESYSTEM_DEPENDS:-off}
+ STAGED_INSTALL=${STAGED_INSTALL:-off}

LDD_CHECK=${LDD_CHECK:=on}
FIND_CHECK=${FIND_CHECK:=on}
@@ -180,7 +181,7 @@
CONFIG_STAGE_DIRECTORY=${STATE_ROOT}/var/state/sorcery/staged_configs

# this is passed directly to installwatch so it can't contain
# shell expansions or regex's
-CASTFS_UNSTAGED_PATHS="/dev /proc /tmp /var/tmp /sys ${BUILD_DIRECTORY}
${SGL_LIBRARY} ${INSTALL_ROOT}/${SGL_LIBRARY} ${SOURCE_CACHE} ${CONFIG_CACHE}
${INSTALL_ROOT}/${CONFIG_CACHE} ${STATE_DIRECTORY} ${LOG_DIRECTORY}"
+CASTFS_UNSTAGED_PATHS="/dev /proc /tmp /var/tmp /sys ${BUILD_DIRECTORY}
${SGL_LIBRARY} ${INSTALL_ROOT}/${SGL_LIBRARY} ${SOURCE_CACHE} ${CONFIG_CACHE}
${INSTALL_ROOT}/${CONFIG_CACHE} ${STATE_DIRECTORY} ${LOG_DIRECTORY} $DEBUG"
# this value is a mask bits set mean output is done for that particular
# component of castfs
CASTFS_DEBUG_LEVEL=${CASTFS_DEBUG_LEVEL:=255}
diff --git a/etc/sorcery/roots b/etc/sorcery/roots
index b09ba2e..d7c9488 100755
--- a/etc/sorcery/roots
+++ b/etc/sorcery/roots
@@ -1,8 +1,10 @@
- INSTALL_ROOT=""
- STATE_ROOT=""
- TRACK_ROOT=""
- CODEX_ROOT="/var/lib/sorcery/codex"
- INSTALL_CACHE=/var/cache/sorcery
+ 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}"

-test -e $LOCAL_ROOTS_CONFIG && . $LOCAL_ROOTS_CONFIG
+if [[ -e $LOCAL_ROOTS_CONFIG ]]; then
+ . $LOCAL_ROOTS_CONFIG
+fi

diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 73c886a..b51f0ee 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -432,14 +432,12 @@ function find_section() {
## a directory (and not a symbolic link to a directory).
#---------------------------------------------------------------------
function directories() {
-
- while read ITEM; do
- if [ -d "$ITEM" ] &&
- ! [ -h "$ITEM" ]; then
- echo "$ITEM"
+ local item
+ while read item; do
+ if [[ -d $item ]] && ! [[ -h $item ]]; then
+ echo "$item"
fi
done
-
}


@@ -451,15 +449,12 @@ function directories() {
##
#---------------------------------------------------------------------
function files() {
-
- while read ITEM; do
-
- if [ -f "$ITEM" ] &&
- ! [ -h "$ITEM" ]; then
- echo "$ITEM"
+ local item
+ while read item; do
+ if [[ -f $item ]] && ! [[ -h $item ]]; then
+ echo "$item"
fi
done
-
}


@@ -471,13 +466,12 @@ function files() {
##
#---------------------------------------------------------------------
function symlinks() {
-
- while read ITEM; do
- if [ -h "$ITEM" ]; then
- echo "$ITEM"
+ local item
+ while read item; do
+ if [[ -h $item ]]; then
+ echo "$item"
fi
done
-
}


@@ -641,7 +635,10 @@ function filter_protected() {
## Note: Is a duplicate of get_dirnames. 2003-09-28 Martin
#---------------------------------------------------------------------
function dirnames() {
- while read FILE; do dirname "$FILE"; done;
+ local file
+ while read file; do
+ smgl_dirname "$file"
+ done
}

#---------------------------------------------------------------------
@@ -1644,14 +1641,7 @@ function set_compression_type() {
##
#---------------------------------------------------------------------
function filename_indicates_compression() {
- local FILENAME=`echo "file$1" | sed 's/^.*\.gz$//' \
- | sed 's/^.*\.tgz$//' \
- | sed 's/^.*\.bz2$//' \
- | sed 's/^.*\.zip$//' \
- | sed 's/^.*\.Z$//' \
- | sed 's/^.*\.rpm$//' \
- | sed 's/^.*\.bz2$//'`
- [ -z "$FILENAME" ]
+ grep -qE "^.*\.(gz|tgz|bz2|zip|Z|rpm)$" <<< "$1"
}





  • [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (0d74957ecafa0c808ce7610733510985f2641a8b), Jaka Kranjc, 03/25/2008

Archive powered by MHonArc 2.6.24.

Top of Page