Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master sorcery by Andrew Stitt (e6e86a7f9dc638fb3144579c9674f09c248b3418)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Andrew Stitt <scm AT mail.sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master sorcery by Andrew Stitt (e6e86a7f9dc638fb3144579c9674f09c248b3418)
  • Date: Fri, 23 Jun 2006 00:18:42 -0500

GIT changes to master sorcery by Andrew Stitt <astitt AT sourcemage.org>:

etc/sorcery/config | 20 +
etc/sorcery/mirrors/KERNEL | 349
++--------------------
usr/sbin/cast | 2
usr/sbin/confmeld | 171 ++++++++++
usr/sbin/delve | 61 ++-
usr/share/man/man5/grimoire.5 | 34 +-
var/lib/sorcery/modules/build_api/api1 | 4
var/lib/sorcery/modules/build_api/api2 | 113 +++++--
var/lib/sorcery/modules/build_api/common | 34 +-
var/lib/sorcery/modules/dl_handlers/dl_git | 14
var/lib/sorcery/modules/libapi | 20 +
var/lib/sorcery/modules/libcast | 6
var/lib/sorcery/modules/libcodex | 2
var/lib/sorcery/modules/libgcc2 | 25 -
var/lib/sorcery/modules/libmisc | 17 +
var/lib/sorcery/modules/libresurrect | 4
var/lib/sorcery/modules/libsorcery | 76 ++++
var/lib/sorcery/modules/libstage | 168 ++++++++++
var/lib/sorcery/modules/libtrack | 75 ++++
var/lib/sorcery/modules/url_handlers/url_git | 2
var/lib/sorcery/modules/url_handlers/url_git_http | 122 +++++++
21 files changed, 911 insertions(+), 408 deletions(-)

New commits:
commit e6e86a7f9dc638fb3144579c9674f09c248b3418
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>

"merge" from stage-root branch
----------------
Squashed commit log:

commit d3fa2b1dae96653287bac89da260d1896f09835c
Author: David Brown <dmlb2000 AT gmail.com>
Date: Tue Jun 20 20:37:58 2006 -0700

updated save_binaries to not have problems with symlinks... and
also updated the hack to go along with it

commit e2d740dd0d216b731cfcfa8cf6fa8cb1e3326071
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sun Jun 18 16:08:36 2006 -0700

didn't add the translation directory to the path for setting
stage directory paths

commit 5c7c1affe72a8effa36d62654710975e3440032c
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sun Jun 18 16:06:17 2006 -0700

added save_binaries function and the dirty hack to make it work

commit 44bf3bab534ac66e815d46c27592be088f114e0c
Author: David Brown <dmlb2000 AT gmail.com>
Date: Thu Jun 15 17:57:04 2006 -0700

updated to create installwatch dbglog files along with the
compile log

commit cc3cfc9a02c12ec93c9e4994a12fc7f10af49402
Author: David Brown <dmlb2000 AT gmail.com>
Date: Tue Jun 13 17:55:01 2006 -0700

updated grimoire man page to reflect some of the security changes
required of POST_INSTALL to access files in the stage area

commit 6273271c047eedaf97c66d7e4b5672c11ee2bd54
Author: David Brown <dmlb2000 AT gmail.com>
Date: Tue Jun 13 17:36:24 2006 -0700

updated to cd to stage directory instead of including transl this
will make spells try to access files with the prefix transl which could be a
default safety check

commit a9323f0ef33388d2a4f16e09f2564ee55c479fd7
Merge: 108ae4e... 2062bee...
Author: David Brown <dmlb2000 AT gmail.com>
Date: Tue Jun 13 17:16:43 2006 -0700

resolved conflicts with andrews fix

commit 108ae4efe085ffe8e1c1d46924a434a75703ac30
Author: David Brown <dmlb2000 AT gmail.com>
Date: Tue Jun 13 17:14:52 2006 -0700

removed lots of the && that were causing parse errors

commit ed87c0e1a24b19c2a79af097703112c6b5eeddfb
Author: David Brown <dmlb2000 AT gmail.com>
Date: Tue Jun 13 15:16:03 2006 -0700

added quotes everywhere fixed cd'ing to home instead of install
root by adding / and removed the rm's during staging because it's not needed
and calling rm in random places could cause problems

commit 042cbc750952e570c0692a56acad0fc1754e2346
Author: David Brown <dmlb2000 AT gmail.com>
Date: Tue Jun 13 15:07:40 2006 -0700

if removing source dir fails don't fail to remove the stage
directory

commit 2062bee451541700a391b2e5de132b54d0929cf8
Author: Andrew Stitt <astitt AT sourcemage.org>
Date: Tue Jun 13 14:24:06 2006 -0700

fix api2 to properly change directories when there is no
stage-root

commit a27ed36c2c2c780eda1c72ace9f67a6a40b824ae
Author: David Brown <dmlb2000 AT gmail.com>
Date: Mon Jun 12 19:48:58 2006 -0700

updated grimoire man page to reflect the stage root functionality
for POST_INSTALL and the current working directories for every stage

commit cfe7959183d12d74e3d6b2ddd80d26985ca5d511
Author: David Brown <dmlb2000 AT gmail.com>
Date: Mon Jun 12 19:09:14 2006 -0700

changed checking to destroy stage root to only happen if
STAGED_INSTALL is not equal to off instead of if CLEAN_SOURCE is on

commit 3f56f0ffb2650090878e69072f20e90830b6cf39
Author: David Brown <dmlb2000 AT gmail.com>
Date: Mon Jun 12 14:18:20 2006 -0700

updated to remove stage directory on spell success instead of
right after its use

commit 16cd77933230feb15d56e1a2efefec7c342d51c4
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sun Jun 11 21:01:15 2006 -0700

added setting the environmental vars before the delve calls

commit a3d9619c4309de8aa38b96c5c6783a05db0c8dd9
Merge: 4d5e8fb... dae12eb...
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sun Jun 11 21:00:17 2006 -0700

Merge branch 'master' of ssh://scm.sourcemage.org/smgl/sorcery
into devel-stage-root

commit 4d5e8fb4503f16d4f54c676c702bcfdfea45dcd7
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 23:24:12 2006 -0700

updated adding the set_stage_root_paths to the states that need it

commit b756d41d9b184252ded4719c042bf0218caa4a61
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 23:18:08 2006 -0700

updated run_install to prepend the stage directory bin and lib
files to LD_LIBRARY_PATH so things will still function

commit a88b555537f831aa85566a4516b90ac52530ecea
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 23:09:17 2006 -0700

moved gcc2_prepend_path to libmisc and renamed to
envar_prepend_path

commit 343721d2e9dc759c609aab2ee9f274c25f0705aa
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 22:37:25 2006 -0700

if the spell is api1 or staged install is off this file won't be
created so check if its there before moving it

commit 1e016a58f4b61c18c49f5d3d1c001b6b618d154f
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 22:11:28 2006 -0700

updated delve to also check the installwatch version to make sure
we can stage spells

commit 21215a91b354b9ed20ab97468760b3a9fd920617
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 22:08:22 2006 -0700

*sigh* yeah it needs to be off if installwatch isn't able to do
staging

commit 8476f078cce027857ac5ed9df619d7ae34d748f5
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 21:53:03 2006 -0700

swapped invoke_installwatch to after the stage directory check...
and added the devoke destroy and turning off stage install before running
final

commit ae3be0cd26b3d9c78e6ed03692cd89f54e746463
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 21:42:54 2006 -0700

this is kinda a hack but we can't remove the stage directory or
installwatch will break on any system call when cast calls delve the stage
root will already be created so we don't want to call mk_source_dir or it
will break installwatch

commit cc77953650b0d8aa6dbd50f59eb87dfd3a75e2de
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 21:41:47 2006 -0700

updated libtrack to make the MINOR_VER var local in
installwatch_is_stageable

commit 537038e2ab9dd6254e36361f2af1d41df51bd45a
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 21:29:39 2006 -0700

damnit wrong variable name

commit 24ed1d815ca351ef423fcf72c381bf9e5e48ab49
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 21:18:30 2006 -0700

updated to turn off stage root via the variable instead of adding
the extra check at key points for stage root

commit 9b11e8afa338a4055f20a98a0c38a705070b4ab6
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 21:11:05 2006 -0700

updated to fix confmeld after su'ing to root dropping back down
and calling main again

commit 50973fa57afdddce2914c21d96048069988ef146
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sat Jun 10 21:01:56 2006 -0700

updated to add check for installwatch 6

commit 498a2ca1b7cd0c78663dfde81cf9ecab23fc0e8b
Author: David Brown <dmlb2000 AT gmail.com>
Date: Wed Jun 7 12:33:09 2006 -0700

updated TODO to reflect what's left

commit eb75b4f7676c24de5a13445b790aab8fdcfce057
Author: David Brown <dmlb2000 AT gmail.com>
Date: Wed Jun 7 12:12:09 2006 -0700

updated todo list

commit cd35f4ad4879b4239f0e80a1552303a6bbc42561
Author: David Brown <dmlb2000 AT gmail.com>
Date: Wed Jun 7 12:11:30 2006 -0700

removed tabs

commit 0bbe91ae1cc3082590b6ab595a8eef28c81d130e
Author: David Brown <dmlb2000 AT gmail.com>
Date: Wed Jun 7 12:11:05 2006 -0700

made api1 spells with stage install off explicitly

commit eea1c31a1995b368d2f301b4b6fcd03a30e90fa7
Author: David Brown <dmlb2000 AT gmail.com>
Date: Wed Jun 7 12:10:40 2006 -0700

moved pwd issues between states to the state itself and removed
them from other locations

commit 67f80e55ec886b53be7000138f6e351bc1de09db
Author: David Brown <dmlb2000 AT gmail.com>
Date: Wed Jun 7 12:09:18 2006 -0700

updated confmeld with chuid code

commit 3c3f16a6ada2388953a214d53d77640a56ba43bd
Author: David Brown <dmlb2000 AT gmail.com>
Date: Tue Jun 6 20:36:34 2006 -0700

updated redundant code in libtrack and tab switch in api2

commit 04604ac865982719a1f897ffa8e51b3bacad639d
Author: David Brown <dmlb2000 AT gmail.com>
Date: Mon Jun 5 17:09:12 2006 -0700

removed url_git_git it doesn't make sense

commit 13240b7852d04ba728febc4af4aec5ac147b5a2d
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sun Jun 4 21:57:01 2006 -0700

fixed depends_message to have the correct function

commit afc55dd5d66ed84ca9c68bbd6c70a856505a1403
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sun Jun 4 21:55:58 2006 -0700

Revert "forgot to merge these changes"
got the wrong duplicate function

This reverts 914c288d36e36a5a4cfc1cc906d4527a19d9f8cc commit.

commit 914c288d36e36a5a4cfc1cc906d4527a19d9f8cc
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sun Jun 4 21:53:15 2006 -0700

forgot to merge these changes

commit 40073a02f69ad6f3d8f8e84c3dba170d2eb216b4
Merge: a26fced... 51a6d3e...
Author: David Brown <dmlb2000 AT gmail.com>
Date: Sun Jun 4 21:48:31 2006 -0700

merged changes from devel manually

commit a26fced35621bd68cf52ce4f210cf9d0e7250836
Author: David Brown <dmlb2000 AT gmail.com>
Date: Mon May 29 16:42:36 2006 -0700

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>
Date: Mon May 29 16:41:27 2006 -0700

forgot *
(cherry picked from 6ee1f91f1f4aac4ed00f5c68b8be23f79e2e978e
commit)

commit a3ca518f37a988f013f101f8e7f6edb40e0da8c5
Author: David Brown <dmlb2000 AT gmail.com>
Date: Mon May 29 16:40:34 2006 -0700

fix bug 12327
(cherry picked from 26a9582e7352c6ed49874c22d56b7dab877b74f7
commit)

commit 09615f85b4596804c8c739e8fa1d4d90274166bb
Author: David Brown <dmlb2000 AT gmail.com>
Date: Mon May 29 16:39:42 2006 -0700

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

commit 2f2c3ac210f3fde93ff7977b378ea52854eda7ee
Author: Andrew Stitt <astitt AT sourcemage.org>
Date: Sun May 28 14:05:00 2006 -0700

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

commit cd6843adb7ebad10a074042772c21906d97da058
Author: David Brown <dmlb2000 AT gmail.com>
Date: Mon May 29 16:38:28 2006 -0700

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

commit 868e7ec49a464b158b2231c959e3b521291e34c2
Author: Andrew Stitt <astitt AT sourcemage.org>
Date: Wed May 24 23:29:53 2006 -0700

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

commit 7cc2cfe20d5b940e82b016f7669f60270b436c08
Author: Andrew Stitt <afrayedknot@thefrayedknot.(none)>
Date: Tue May 23 09:47:00 2006 -0700

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

commit 943bc8f42b4b3600b5a009e49c0b70006d6f7a82
Author: David Brown <dmlb2000 AT gmail.com>
Date: Mon May 29 16:21:22 2006 -0700

when dealing with anything other than config files we should
force the cp just in case the file is in use, this is for spells like bash

commit 264f98210d2363dcde58e6f8f3ee53305b2eb0a6
Author: David Brown <dmlb2000@dmlb2004>
Date: Thu May 25 20:17:50 2006 -0700

------------------------------------------------------------
revno: 41
committer: David Brown <dmlb2000@dmlb2004>
branch nick: stage-root
timestamp: Sun 2006-05-14 20:55:44 -0700
message:
updated bzr pull to pull from the tag specified

commit 4fe6ed1d5f7c6960bb7a7d0391fca395c0bde461
Author: David Brown <dmlb2000@dmlb2004>
Date: Thu May 25 20:17:49 2006 -0700

------------------------------------------------------------
revno: 40
committer: David Brown <dmlb2000@dmlb2004>
branch nick: stage-root
timestamp: Sun 2006-05-14 11:00:51 -0700
message:
typo fixes

commit 452f76d02e9335e996360e77a33304f82343b18f
Author: David Brown <dmlb2000@dmlb2004>
Date: Thu May 25 20:17:48 2006 -0700

------------------------------------------------------------
revno: 39
committer: David Brown <dmlb2000@dmlb2004>
branch nick: stage-root
timestamp: Sun 2006-05-14 10:50:58 -0700
message:
added use of GIT_TAG which should really be GIT_BRANCH but it
works the same

commit 230214885ced298d77251529f74dbe3ce7602b99
Author: David Brown <dmlb2000@dmlb2004>
Date: Thu May 25 20:17:47 2006 -0700

------------------------------------------------------------
revno: 38
committer: David Brown <dmlb2000@dmlb2004>
branch nick: stage-root
timestamp: Sun 2006-05-14 10:44:44 -0700
message:
forgot to strip off git_http instead of git

commit 4ea223a4d4dc13065e3f78e56ce13cd2cfebf99c
Author: David Brown <dmlb2000@dmlb2004>
Date: Thu May 25 20:17:46 2006 -0700

------------------------------------------------------------
revno: 37
committer: David Brown <dmlb2000@dmlb2004>
branch nick: stage-root
timestamp: Sun 2006-05-14 10:40:59 -0700
message:
moved git_git back not needed and forgot a function in
url_git_http

commit 4308efaa100461a64dde56672188410dba3373c2
Author: David Brown <dmlb2000@dmlb2004>
Date: Thu May 25 20:17:45 2006 -0700

------------------------------------------------------------
revno: 36
committer: David Brown <dmlb2000@dmlb2004>
branch nick: stage-root
timestamp: Sun 2006-05-14 10:38:36 -0700
message:
...

diff --git a/etc/sorcery/config b/etc/sorcery/config
index 3686a4b..37cef26 100755
--- a/etc/sorcery/config
+++ b/etc/sorcery/config
@@ -173,6 +173,26 @@ PROGRESS_SPINNER_CHARS='-\|/'

BUILD_DIRECTORY=${INSTALL_ROOT}/usr/src
DOCUMENT_DIRECTORY=${INSTALL_ROOT}/usr/share/doc
+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
+INSTALLWATCH_UNSTAGED_PATHS=""
+for dir in /dev \
+ /proc \
+ /tmp \
+ /var/tmp \
+ /sys \
+ ${BUILD_DIRECTORY} \
+ ${SGL_LIBRARY} \
+ ${INSTALL_ROOT}/${SGL_LIBRARY} \
+ ${SOURCE_CACHE} \
+ ${CONFIG_CACHE} \
+ ${STATE_DIRECTORY} \
+ ${LOG_DIRECTORY} ; do
+ INSTALLWATCH_UNSTAGED_PATHS="${INSTALLWATCH_UNSTAGED_PATHS}${dir},"
+done
+INSTALLWATCH_UNSTAGED_PATHS=${INSTALLWATCH_UNSTAGED_PATHS%,}

# this makes appending the sorcery path idempotent
[ -z ${PATH##*$SORCERY_PATH*} ] || export PATH="$PATH:$SORCERY_PATH"
diff --git a/etc/sorcery/mirrors/KERNEL b/etc/sorcery/mirrors/KERNEL
index 01165fd..8e82a36 100755
--- a/etc/sorcery/mirrors/KERNEL
+++ b/etc/sorcery/mirrors/KERNEL
@@ -1,29 +1,25 @@
"Master Site" ftp://ftp.kernel.org
"Custom Mirror" Custom
-Albania http://www.al.kernel.org
-Albania ftp://ftp.al.kernel.org
-Algeria http://www.dz.kernel.org
-Algeria ftp://ftp.dz.kernel.org
-"American Samoa" http://www.as.kernel.org
-"American Samoa" ftp://ftp.as.kernel.org
Andorra http://www.ad.kernel.org
Andorra ftp://ftp.ad.kernel.org
-Angola http://www.ai.kernel.org
-Angola ftp://ftp.ai.kernel.org
-Anguilla http://www.ai.kernel.org
-Anguilla ftp://ftp.ai.kernel.org
Antarctica http://www.aq.kernel.org
-Antarctica ftp://ftp.aq.kernel.org
"Antigua and Barbuda" http://www.ag.kernel.org
-"Antigua and Barbuda" ftp://ftp.ag.kernel.org
Argentina http://www.ag.kernel.org
-Argentina ftp://ftp.ag.kernel.org
-Armenia http://www.am.kernel.org
-Armenia ftp://ftp.am.kernel.org
+"Antigua and Barbuda" http://www.ag.kernel.org
+Argentina http://www.ag.kernel.org
+"Antigua and Barbuda" http://www.ag.kernel.org
+Argentina http://www.ag.kernel.org
+"Antigua and Barbuda" http://www.ag.kernel.org
+Argentina http://www.ag.kernel.org
+"Antigua and Barbuda" http://www.ag.kernel.org
+Argentina http://www.ag.kernel.org
+"Antigua and Barbuda" http://www.ag.kernel.org
+Argentina http://www.ag.kernel.org
+"Antigua and Barbuda" http://www.ag.kernel.org
+Argentina http://www.ag.kernel.org
+"Antigua and Barbuda" http://www.ag.kernel.org
+Argentina http://www.ag.kernel.org
Aruba http://www.aw.kernel.org
-Aruba ftp://ftp.aw.kernel.org
-"Ascension Island" http://www.ac.kernel.org
-"Ascension Island" ftp://ftp.ac.kernel.org
Australia http://www.au.kernel.org
Australia ftp://ftp.au.kernel.org
Austria http://www.at.kernel.org
@@ -33,423 +29,178 @@ Azerbaijan ftp://ftp.az.kernel.org
Aland http://www.av.kernel.org
Aland ftp://ftp.av.kernel.org
Bahamas http://www.bs.kernel.org
-Bahamas ftp://ftp.bs.kernel.org
-Bahrain http://www.bh.kernel.org
-Bahrain ftp://ftp.bh.kernel.org
-Bangladesh http://www.bd.kernel.org
-Bangladesh ftp://ftp.bd.kernel.org
Barbados http://www.bb.kernel.org
-Barbados ftp://ftp.bb.kernel.org
Belarus http://www.by.kernel.org
Belarus ftp://ftp.by.kernel.org
Belgium http://www.be.kernel.org
Belgium ftp://ftp.be.kernel.org
Belize http://www.bz.kernel.org
-Belize ftp://ftp.bz.kernel.org
-Benin http://www.bj.kernel.org
-Benin ftp://ftp.bj.kernel.org
-Bermuda http://www.vm.kernel.org
Bermuda ftp://ftp.bm.kernel.org
-Bhutan http://www.bt.kernel.org
-Bhutan ftp://ftp.bt.kernel.org
Bolivia http://www.bo.kernel.org
Bolivia ftp://ftp.bo.kernel.org
-"Bosnia and Herzegowina" http://www.ba.kernel.org
-"Bosnia and Herzegowina" ftp://ftp.ba.kernel.org
-Botswana http://www.bw.kernel.org
-Botswana ftp://ftp.bw.kernel.org
-"Bouvet Island" http://www.bv.kernel.org
"Bouvet Island" ftp://ftp.bv.kernel.org
Brazil http://www.br.kernel.org
Brazil ftp://ftp.br.kernel.org
-"British Indian Ocean Territory" http://www.io.kernel.org
-"British Indian Ocean Territory" ftp://ftp.io.kernel.org
"Brunei Darussalam" http://www.bn.kernel.org
"Brunei Darussalam" ftp://ftp.bn.kernel.org
Bulgaria http://www.bg.kernel.org
Bulgaria ftp://ftp.bg.kernel.org
-"Burkina Faso" http://www.bf.kernel.org
-"Burkina Faso" ftp://ftp.bf.kernel.org
-Burundi http://www.bi.kernel.org
-Burundi ftp://ftp.bi.kernel.org
-Cambodia http://www.kh.kernel.org
-Cambodia ftp://ftp.kh.kernel.org
-Cameroon http://www.cm.kernel.org
-Cameroon ftp://ftp.cm.kernel.org
Canada http://www.ca.kernel.org
Canada ftp://ftp.ca.kernel.org
-"Canary Islands" http://www.ic.kernel.org
-"Canary Islands" ftp://ftp.ic.kernel.org
-"Cape Verde" http://www.cv.kernel.org
-"Cape Verde" ftp://ftp.cv.kernel.org
"Cayman Islands" http://www.ky.kernel.org
-"Cayman Islands" ftp://ftp.ky.kernel.org
-"Central African Republic" http://www.cf.kernel.org
-"Central African Republic" ftp://ftp.cf.kernel.org
-"Ceuta, Melilla" http://www.ea.kernel.org
-"Ceuta, Melilla" ftp://ftp.ea.kernel.org
-Chad http://www.td.kernel.org
-Chad ftp://ftp.td.kernel.org
Chile http://www.cl.kernel.org
Chile ftp://ftp.cl.kernel.org
China http://www.cn.kernel.org
China ftp://ftp.cn.kernel.org
-"Christmas Island" http://www.cx.kernel.org
-"Christmas Island" ftp://ftp.cx.kernel.org
-"Clipperton Island" http://www.cp.kernel.org
-"Clipperton Island" ftp://ftp.cp.kernel.org
-"Cocos (Keeling) Islands" http://www.cc.kernel.org
-"Cocos (Keeling) Islands" ftp://ftp.cc.kernel.org
Colombia http://www.co.kernel.org
Colombia ftp://ftp.co.kernel.org
-Comoros http://www.km.kernel.org
-Comoros ftp://ftp.km.kernel.org
-"Congo, Republic of" http://www.cg.kernel.org
-"Congo, Republic of" ftp://ftp.cg.kernel.org
-"Congo, Democratic Republic of The" http://www.cd.kernel.org
-"Congo, Democratic Republic of The" ftp://ftp.cd.kernel.org
-"Cook Islands" http://www.ck.kernel.org
-"Cook Islands" ftp://ftp.ck.kernel.org
"Costa Rica" http://www.cr.kernel.org
-"Costa Rica" ftp://ftp.cr.kernel.org
-"Co^te DIvoire" http://www.ci.kernel.org
-"Co^te DIvoire" ftp://ftp.ci.kernel.org
Croatia http://www.hr.kernel.org
Croatia ftp://ftp.hr.kernel.org
-Cyprus http://www.cy.kernel.org
-Cyprus ftp://ftp.cy.kernel.org
"Czech Republic" http://www.cz.kernel.org
"Czech Republic" ftp://ftp.cz.kernel.org
-Denmark http://www.dk.kernel.org
-Denmark ftp://ftp.dk.kernel.org
-"Diego Garcia" http://www.dg.kernel.org
-"Diego Garcia" ftp://ftp.dg.kernel.org
-Djibouti http://www.dj.kernel.org
-Djibouti ftp://ftp.dj.kernel.org
Dominica http://www.dm.kernel.org
-Dominica ftp://ftp.dm.kernel.org
-"Dominican Republic" http://www.do.kernel.org
-"Dominican Republic" ftp://ftp.do.kernel.org
-"East Timor" http://www.tp.kernel.org
-"East Timor" ftp://ftp.tp.kernel.org
Ecuador http://www.ec.kernel.org
Ecuador ftp://ftp.ec.kernel.org
-Egypt http://www.eg.kernel.org
-Egypt ftp://ftp.eg.kernel.org
"El Salvador" http://www.sv.kernel.org
-"El Salvador" ftp://ftp.sv.kernel.org
-"Equatorial Guinea" http://www.gq.kernel.org
-"Equatorial Guinea" ftp://ftp.gq.kernel.org
-Eritrea http://www.er.kernel.org
-Eritrea ftp://ftp.er.kernel.org
Estonia http://www.ee.kernel.org
Estonia ftp://ftp.ee.kernel.org
-Ethiopia http://www.et.kernel.org
-Ethiopia ftp://ftp.et.kernel.org
"Falkland Islands (Malvinas)" http://www.fk.kernel.org
-"Falkland Islands (Malvinas)" ftp://ftp.fk.kernel.org
"Faroe Islands" http://www.fo.kernel.org
"Faroe Islands" ftp://ftp.fo.kernel.org
-Fiji http://www.fj.kernel.org
-Fiji ftp://ftp.fj.kernel.org
Finland http://www.fi.kernel.org
Finland ftp://ftp.fi.kernel.org
France http://www.fr.kernel.org
France ftp://ftp.fr.kernel.org
-France http://www.tengu-easynet-fr.lkams.kernel.org/pub/linux
-France http://www.numericable.lkams.kernel.org/pub/linux
-France ftp://ftp.ovh-new.lkams.kernel.org/pub/linux
-France ftp://ftp.minet-fr.lkams.kernel.org/pub/linux
-France
ftp://ftp.proxad.lkams.kernel.org/mirrors/ftp.kernel.org/linux/kernel
-France ftp://ftp.numericable.lkams.kernel.org/pub/linux
"French Guiana" http://www.gf.kernel.org
"French Guiana" ftp://ftp.gf.kernel.org
-"French Polynesia" http://www.pf.kernel.org
-"French Polynesia" ftp://ftp.pf.kernel.org
-"French Southern Territories" http://www.tf.kernel.org
-"French Southern Territories" ftp://ftp.tf.kernel.org
-Gabon http://www.ga.kernel.org
-Gabon ftp://ftp.ga.kernel.org
-Gambia http://www.gm.kernel.org
-Gambia ftp://ftp.gm.kernel.org
-Georgia http://www.ge.kernel.org
-Georgia ftp://ftp.ge.kernel.org
Germany http://www.de.kernel.org
Germany ftp://ftp.de.kernel.org
-Ghana http://www.gh.kernel.org
-Ghana ftp://ftp.gh.kernel.org
-Gibraltar http://www.gi.kernel.org
-Gibraltar ftp://ftp.gi.kernel.org
Greece http://www.gr.kernel.org
Greece ftp://ftp.gr.kernel.org
Greenland http://www.gl.kernel.org
Greenland ftp://ftp.gl.kernel.org
Grenada http://www.gd.kernel.org
-Grenada ftp://ftp.gd.kernel.org
Guadeloupe http://www.gp.kernel.org
-Guadeloupe ftp://ftp.gp.kernel.org
-Guam http://www.gu.kernel.org
-Guam ftp://ftp.gu.kernel.org
Guatemala http://www.gt.kernel.org
-Guatemala ftp://ftp.gt.kernel.org
-Guernsey http://www.gg.kernel.org
-Guernsey ftp://ftp.gg.kernel.org
-Guinea http://www.gn.kernel.org
-Guinea ftp://ftp.gn.kernel.org
-Guinea-Bissau http://www.gw.kernel.org
-Guinea-Bissau ftp://ftp.gw.kernel.org
Guyana http://www.gy.kernel.org
Guyana ftp://ftp.gy.kernel.org
Haiti http://www.ht.kernel.org
-Haiti ftp://ftp.ht.kernel.org
-"Heard and Mc Donald Islands" http://www.hm.kernel.org
-"Heard and Mc Donald Islands" ftp://ftp.hm.kernel.org
Honduras http://www.hn.kernel.org
-Honduras ftp://ftp.hn.kernel.org
"Hong Kong" http://www.hk.kernel.org
"Hong Kong" ftp://ftp.hk.kernel.org
Hungary http://www.hu.kernel.org
Hungary ftp://ftp.hu.kernel.org
Iceland http://www.is.kernel.org
Iceland ftp://ftp.is.kernel.org
-India http://www.in.kernel.org
-India ftp://ftp.in.kernel.org
Indonesia http://www.id.kernel.org
Indonesia ftp://ftp.id.kernel.org
Ireland http://www.ie.kernel.org
Ireland ftp://ftp.ie.kernel.org
-"Isle of Man" http://www.im.kernel.org
-"Isle of Man" ftp://ftp.im.kernel.org
Israel http://www.il.kernel.org
-Israel ftp://ftp.il.kernel.org
Italy http://www.it.kernel.org
Italy ftp://ftp.it.kernel.org
-Jamaica http://www.jm.kernel.org
-Jamaica ftp://ftp.jm.kernel.org
Japan http://www.jp.kernel.org
-Japan ftp://ftp.jp.kernel.org
-Jersey http://www.je.kernel.org
-Jersey ftp://ftp.je.kernel.org
-Jordan http://www.jo.kernel.org
-Jordan ftp://ftp.jo.kernel.org
Kazakhstan http://www.kz.kernel.org
Kazakhstan ftp://ftp.kz.kernel.org
-Kenya http://www.ke.kernel.org
-Kenya ftp://ftp.ke.kernel.org
-Kiribati http://www.ki.kernel.org
-Kiribati ftp://ftp.ki.kernel.org
"Korea, South" http://www.kr.kernel.org
"Korea, South" ftp://ftp.kr.kernel.org
Kuwait http://www.kw.kernel.org
Kuwait ftp://ftp.kw.kernel.org
Kyrgyzstan http://www.kg.kernel.org
Kyrgyzstan ftp://ftp.kg.kernel.org
-Laos http://www.la.kernel.org
-Laos ftp://ftp.la.kernel.org
Latvia http://www.lv.kernel.org
Latvia ftp://ftp.lv.kernel.org
-Lebanon http://www.lb.kernel.org
-Lebanon ftp://ftp.lb.kernel.org
-Lesotho http://www.ls.kernel.org
-Lesotho ftp://ftp.ls.kernel.org
-Liberia http://www.lr.kernel.org
-Liberia ftp://ftp.lr.kernel.org
Liechtenstein http://www.li.kernel.org
Liechtenstein ftp://ftp.li.kernel.org
Lithuania http://www.lt.kernel.org
Lithuania ftp://ftp.lt.kernel.org
Luxembourg http://www.lu.kernel.org
Luxembourg ftp://ftp.lu.kernel.org
-Macau http://www.mo.kernel.org
-Macau ftp://ftp.mo.kernel.org
-Macedonia http://www.mk.kernel.org
-Macedonia ftp://ftp.mk.kernel.org
-Madagascar http://www.mg.kernel.org
-Madagascar ftp://ftp.mg.kernel.org
-Malawi http://www.mw.kernel.org
-Malawi ftp://ftp.mw.kernel.org
Malaysia http://www.my.kernel.org
Malaysia ftp://ftp.my.kernel.org
-Maldives http://www.mv.kernel.org
-Maldives ftp://ftp.mv.kernel.org
-Mali http://www.ml.kernel.org
-Mali ftp://ftp.ml.kernel.org
-Malta http://www.mt.kernel.org
-Malta ftp://ftp.mt.kernel.org
-"Marshall Islands" http://www.mh.kernel.org
-"Marshall Islands" ftp://ftp.mh.kernel.org
Martinique http://www.mq.kernel.org
-Martinique ftp://ftp.mq.kernel.org
-Mauritania http://www.mr.kernel.org
-Mauritania ftp://ftp.mr.kernel.org
-Mauritius http://www.mu.kernel.org
-Mauritius ftp://ftp.mu.kernel.org
-Mayotte http://www.yt.kernel.org
-Mayotte ftp://ftp.yt.kernel.org
Mexico http://www.mx.kernel.org
-Mexico ftp://ftp.mx.kernel.org
-"Micronesia, Federated States of" http://www.fm.kernel.org
-"Micronesia, Federated States of" ftp://ftp.fm.kernel.org
Moldova http://www.md.kernel.org
Moldova ftp://ftp.md.kernel.org
Monaco http://www.mc.kernel.org
Monaco ftp://ftp.mc.kernel.org
-Mongolia http://www.mn.kernel.org
-Mongolia ftp://ftp.mn.kernel.org
-Montserrat http://www.ms.kernel.org
-Montserrat ftp://ftp.ms.kernel.org
-Morocco http://www.ma.kernel.org
-Morocco ftp://ftp.ma.kernel.org
-Mozambique http://www.mz.kernel.org
-Mozambique ftp://ftp.mz.kernel.org
"Myanmar (Burma)" http://www.mm.kernel.org
"Myanmar (Burma)" ftp://ftp.mm.kernel.org
-Namibia http://www.na.kernel.org
-Namibia ftp://ftp.na.kernel.org
-Nauru http://www.nr.kernel.org
-Nauru ftp://ftp.nr.kernel.org
-Nepal http://www.np.kernel.org
-Nepal ftp://ftp.np.kernel.org
Netherlands http://www.nl.kernel.org
Netherlands ftp://ftp.nl.kernel.org
-"Netherlands Antilles" http://www.an.kernel.org
-"Netherlands Antilles" ftp://ftp.an.kernel.org
-"New Caledonia" http://www.nc.kernel.org
-"New Caledonia" ftp://ftp.nc.kernel.org
"New Zealand" http://www.nz.kernel.org
"New Zealand" ftp://ftp.nz.kernel.org
Nicaragua http://www.ni.kernel.org
-Nicaragua ftp://ftp.ni.kernel.org
-Niger http://www.ne.kernel.org
-Niger ftp://ftp.ne.kernel.org
-Nigeria http://www.ng.kernel.org
-Nigeria ftp://ftp.ng.kernel.org
-Niue http://www.nu.kernel.org
-Niue ftp://ftp.nu.kernel.org
-"Norfolk Island" http://www.nf.kernel.org
-"Norfolk Island" ftp://ftp.nf.kernel.org
-"Northern Mariana Islands" http://www.mp.kernel.org
-"Northern Mariana Islands" ftp://ftp.mp.kernel.org
Norway http://www.no.kernel.org
Norway ftp://ftp.no.kernel.org
-Oman http://www.om.kernel.org
-Oman ftp://ftp.om.kernel.org
Pakistan http://www.pk.kernel.org
Pakistan ftp://ftp.pk.kernel.org
-Palau http://www.pw.kernel.org
-Palau ftp://ftp.pw.kernel.org
-"Palestinian Territory" http://www.ps.kernel.org
-"Palestinian Territory" ftp://ftp.ps.kernel.org
Panama http://www.pa.kernel.org
-Panama ftp://ftp.pa.kernel.org
"Papua New Guinea" http://www.py.kernel.org
+Paraguay http://www.py.kernel.org
+"Papua New Guinea" http://www.py.kernel.org
+Paraguay http://www.py.kernel.org
+"Papua New Guinea" http://www.py.kernel.org
+Paraguay http://www.py.kernel.org
+"Papua New Guinea" http://www.py.kernel.org
+Paraguay http://www.py.kernel.org
"Papua New Guinea" ftp://ftp.py.kernel.org
+Paraguay ftp://ftp.py.kernel.org
+"Papua New Guinea" ftp://ftp.py.kernel.org
+Paraguay ftp://ftp.py.kernel.org
+"Papua New Guinea" ftp://ftp.py.kernel.org
+Paraguay ftp://ftp.py.kernel.org
+"Papua New Guinea" ftp://ftp.py.kernel.org
+Paraguay ftp://ftp.py.kernel.org
+"Papua New Guinea" http://www.py.kernel.org
Paraguay http://www.py.kernel.org
+"Papua New Guinea" http://www.py.kernel.org
+Paraguay http://www.py.kernel.org
+"Papua New Guinea" http://www.py.kernel.org
+Paraguay http://www.py.kernel.org
+"Papua New Guinea" http://www.py.kernel.org
+Paraguay http://www.py.kernel.org
+"Papua New Guinea" ftp://ftp.py.kernel.org
+Paraguay ftp://ftp.py.kernel.org
+"Papua New Guinea" ftp://ftp.py.kernel.org
+Paraguay ftp://ftp.py.kernel.org
+"Papua New Guinea" ftp://ftp.py.kernel.org
+Paraguay ftp://ftp.py.kernel.org
+"Papua New Guinea" ftp://ftp.py.kernel.org
Paraguay ftp://ftp.py.kernel.org
Peru http://www.pe.kernel.org
Peru ftp://ftp.pe.kernel.org
Philippines http://www.ph.kernel.org
Philippines ftp://ftp.ph.kernel.org
-"Pitcairn Islands" http://www.pn.kernel.org
-"Pitcairn Islands" ftp://ftp.pn.kernel.org
Poland http://www.pl.kernel.org
Poland ftp://ftp.pl.kernel.org
-Portugal http://www.pt.kernel.org
-Portugal ftp://ftp.pt.kernel.org
-"Puerto Rico" http://www.pr.kernel.org
-"Puerto Rico" ftp://ftp.pr.kernel.org
-Qatar http://www.qa.kernel.org
-Qatar ftp://ftp.qa.kernel.org
-Reunion http://www.re.kernel.org
-Reunion ftp://ftp.re.kernel.org
Romania http://www.ro.kernel.org
Romania ftp://ftp.ro.kernel.org
"Russian Federation" http://www.ru.kernel.org
"Russian Federation" ftp://ftp.ru.kernel.org
-Rwanda http://www.rw.kernel.org
-Rwanda ftp://ftp.rw.kernel.org
-"Saint Helena" http://www.sh.kernel.org
-"Saint Helena" ftp://ftp.sh.kernel.org
-"Saint Kitts and Nevis" http://www.kn.kernel.org
-"Saint Kitts and Nevis" ftp://ftp.kn.kernel.org
-"Saint Lucia" http://www.lc.kernel.org
-"Saint Lucia" ftp://ftp.lc.kernel.org
"Saint Pierre and Miquelon" http://www.pm.kernel.org
-"Saint Pierre and Miquelon" ftp://ftp.pm.kernel.org
"Saint Vincent and The Grenadines" http://www.vc.kernel.org
-"Saint Vincent and The Grenadines" ftp://ftp.vc.kernel.org
-Samoa http://www.ws.kernel.org
-Samoa ftp://ftp.ws.kernel.org
-"San Marino" http://www.sm.kernel.org
-"San Marino" ftp://ftp.sm.kernel.org
-"Sa~o Tome and Principe" http://www.st.kernel.org
-"Sa~o Tome and Principe" ftp://ftp.st.kernel.org
-"Saudi Arabia" http://www.sa.kernel.org
-"Saudi Arabia" ftp://ftp.sa.kernel.org
-Senegal http://www.sn.kernel.org
-Senegal ftp://ftp.sn.kernel.org
-Seychelles http://www.sc.kernel.org
-Seychelles ftp://ftp.sc.kernel.org
-"Sierra Leone" http://www.sl.kernel.org
-"Sierra Leone" ftp://ftp.sl.kernel.org
Singapore http://www.sg.kernel.org
Singapore ftp://ftp.sg.kernel.org
Slovakia http://www.sk.kernel.org
Slovakia ftp://ftp.sk.kernel.org
Slovenia http://www.si.kernel.org
Slovenia ftp://ftp.si.kernel.org
-"Solomon Islands" http://www.sb.kernel.org
-"Solomon Islands" ftp://ftp.sb.kernel.org
-Somalia http://www.so.kernel.org
-Somalia ftp://ftp.so.kernel.org
-"South Africa" http://www.za.kernel.org
-"South Africa" ftp://ftp.za.kernel.org
-"South Georgia and The South Sandwich Islands" http://www.gs.kernel.org
-"South Georgia and The South Sandwich Islands" ftp://ftp.gs.kernel.org
Spain http://www.es.kernel.org
Spain ftp://ftp.es.kernel.org
-"Sri Lanka" http://www.lk.kernel.org
-"Sri Lanka" ftp://ftp.lk.kernel.org
Suriname http://www.sr.kernel.org
Suriname ftp://ftp.sr.kernel.org
"Svalbard and Jan Mayen Islands" http://www.sj.kernel.org
"Svalbard and Jan Mayen Islands" ftp://ftp.sj.kernel.org
-Swaziland http://www.sz.kernel.org
-Swaziland ftp://ftp.sz.kernel.org
Sweden http://www.se.kernel.org
Sweden ftp://ftp.se.kernel.org
Switzerland http://www.ch.kernel.org
Switzerland ftp://ftp.ch.kernel.org
-Taiwan http://www.tw.kernel.org
-Taiwan ftp://ftp.tw.kernel.org
-Tajikistan http://www.tj.kernel.org
-Tajikistan ftp://ftp.tj.kernel.org
-Tanzania http://www.tz.kernel.org
-Tanzania ftp://ftp.tz.kernel.org
Thailand http://www.th.kernel.org
-Thailand ftp://ftp.th.kernel.org
-Togo http://www.tg.kernel.org
-Togo ftp://ftp.tg.kernel.org
-Tokelau http://www.tk.kernel.org
-Tokelau ftp://ftp.tk.kernel.org
-Tonga http://www.to.kernel.org
-Tonga ftp://ftp.to.kernel.org
-"Trinidad and Tobago" http://www.ta.kernel.org
-"Trinidad and Tobago" ftp://ftp.ta.kernel.org
-Tunisia http://www.tn.kernel.org
-Tunisia ftp://ftp.tn.kernel.org
-Turkey http://www.tr.kernel.org
-Turkey ftp://ftp.tr.kernel.org
Turkmenistan http://www.tm.kernel.org
Turkmenistan ftp://ftp.tm.kernel.org
"Turks and Caicos Islands" http://www.tc.kernel.org
-"Turks and Caicos Islands" ftp://ftp.tc.kernel.org
-Tuvalu http://www.tv.kernel.org
-Tuvalu ftp://ftp.tv.kernel.org
-Uganda http://www.ug.kernel.org
-Uganda ftp://ftp.ug.kernel.org
-Ukraine http://www.ua.kernel.org
-Ukraine ftp://ftp.ua.kernel.org
"United Arab Emirates" http://www.ae.kernel.org
"United Arab Emirates" ftp://ftp.ae.kernel.org
"United Kingdom" http://www.uk.kernel.org
@@ -460,12 +211,6 @@ Ukraine ftp://ftp.ua.kernel.org
"United States Minor Outlying Islands" ftp://ftp.um.kernel.org
Uruguay http://www.uy.kernel.org
Uruguay ftp://ftp.uy.kernel.org
-Uzbekistan http://www.uz.kernel.org
-Uzbekistan ftp://ftp.uz.kernel.org
-Vanuatu http://www.vu.kernel.org
-Vanuatu ftp://ftp.vu.kernel.org
-"Vatican City (Holy See)" http://www.va.kernel.org
-"Vatican City (Holy See)" ftp://ftp.va.kernel.org
Venezuela http://www.ve.kernel.org
Venezuela ftp://ftp.ve.kernel.org
Vietnam http://www.vn.kernel.org
@@ -474,15 +219,5 @@ Vietnam ftp://ftp.vn.kernel.org
"Virgin Islands (British)" ftp://ftp.vg.kernel.org
"Virgin Islands (U.S.)" http://www.vi.kernel.org
"Virgin Islands (U.S.)" ftp://ftp.vi.kernel.org
-"Wallis and Futuna Islands" http://www.wf.kernel.org
-"Wallis and Futuna Islands" ftp://ftp.wf.kernel.org
"Western Sahara" http://www.eh.kernel.org
"Western Sahara" ftp://ftp.eh.kernel.org
-Yemen http://www.ye.kernel.org
-Yemen ftp://ftp.ye.kernel.org
-Yugoslavia http://www.yu.kernel.org
-Yugoslavia ftp://ftp.yu.kernel.org
-Zambia http://www.zm.kernel.org
-Zambia ftp://ftp.zm.kernel.org
-Zimbabwe http://www.zw.kernel.org
-Zimbabwe ftp://ftp.zw.kernel.org
diff --git a/usr/sbin/cast b/usr/sbin/cast
index 4038a4c..2af1d99 100755
--- a/usr/sbin/cast
+++ b/usr/sbin/cast
@@ -242,7 +242,7 @@ # and install_xinetd) (afk 4/10/04)

# all this needs to reorganized and stuff...later

- IW_LOG="$TMP_DIR/$SPELL.iw"
+ export IW_LOG="$TMP_DIR/$SPELL.iw"

#some minor discussion occured about having this, i'll leave it out for now
activity_log "cast" "$SPELL" "$VERSION" "start"
diff --git a/usr/sbin/confmeld b/usr/sbin/confmeld
new file mode 100755
index 0000000..10138f5
--- /dev/null
+++ b/usr/sbin/confmeld
@@ -0,0 +1,171 @@
+#!/bin/bash
+#---------------------------------------------------------------------
+## @Synopsis merge the config files located in the config stage directory to
the system.
+## @Copyright Other additions/corrections Copyright 2002 by the Source Mage
Team
+## Script to install staged config files.
+#---------------------------------------------------------------------
+
+#-----
+## Help... hmm... I wonder what it does...
+#-----
+function help()
+{
+ cat << EOF
+
+Melds the staged config files from $CONFIG_STAGE_DIRECTORY
+
+Example: confmeld
+
+Optional Parameters:
+
+ None at the moment
+
+EOF
+ exit 1
+}
+
+#--------------------------------------------------------------------
+## List all the configs in the config stage root
+##
+## @stdout a list of all configs in the config stage root
+#--------------------------------------------------------------------
+function all_config_files()
+{
+ find $CONFIG_STAGE_DIRECTORY
+}
+
+#--------------------------------------------------------------------
+## List all uniq config files in the config stage directory
+##
+## @stdout a list of all uniq configs in the stage directory
+#--------------------------------------------------------------------
+function all_uniq_config_files()
+{
+ all_config_files |
+ while read file
+ do
+ echo ${file%.*}
+ done | uniq
+}
+
+#--------------------------------------------------------------------
+## list all spells that have staged configs
+##
+## @stdout list of spells that have staged configs
+#--------------------------------------------------------------------
+function all_spells_with_staged_configs()
+{
+ all_config_files |
+ sed "s#$CONFIG_STAGE_DIRECTORY/##g" |
+ cut -d/ -f1 | uniq
+}
+
+#--------------------------------------------------------------------
+## parses the path to get specific information about the config file
+##
+## @param config file path
+## @param upvar for spell name
+## @param upvar for spell success time
+## @param upvar for actual path to file
+#--------------------------------------------------------------------
+function parse_stage_config_path()
+{
+ local file=$1
+ local __tmp __spell __sdate __path
+ __tmp=${file/$CONFIG_STAGE_DIRECTORY\//}
+ __spell=$(echo $__tmp | cut -d/ -f1)
+ __sdate=$(echo $__tmp | cut -d/ -f2)
+ __path=$(echo $__tmp | cut -d/ -f3-)
+ eval "$2=\"$__spell\""
+ eval "$3=\"$__sdate\""
+ eval "$4=\"$__path\""
+}
+
+#--------------------------------------------------------------------
+## Main
+##
+## No real arguments get all the config files and start installing
+## them to the system using install_config_file
+#--------------------------------------------------------------------
+function main()
+{
+ local target spell sdate
+ local last_spell=""
+ local last_sdate=""
+
+ for file in $(all_config_files)
+ do
+ parse_stage_config_path $file spell sdate target &&
+ if [[ -f $file && $target ]]
+ then
+ message "${MESSAGE_COLOR}$spell cast on $sdate has
config${DEFAULT_COLOR}"
+ message "${MESSAGE_COLOR}$file to be merged with
/$target${DEFAULT_COLOR}"
+ tablet_set_spell $spell &&
+ install_config_file $file $INSTALL_ROOT/$target
+ #
+ # since we use find we need to remove empty directories
+ # so if the spell or the date changes then we remove the directory so
+ # CONFIG_STAGE_DIRECTORY should always be empty after you complete the
+ # call to confmeld
+ #
+ # find does a preorder traversal of the directory tree keeping the path
+ # (esentially a stack) of where its been in the tree. If a particular
date
+ # or spell name changes at the same level in the tree we can safely
assume
+ # the previous date or spell has been walked and all files have been
delt
+ # with accordingly so we can safely remove them.
+ #
+ if [[ $last_sdate && $last_sdate != $sdate ]]
+ then
+ message "${MESSAGE_COLOR}Removing dirs and files in config stage
area.${DEFAULT_COLOR}"
+ rm_source_dir $CONFIG_STAGE_DIRECTORY/$last_spell/$last_sdate
+ fi
+ if [[ $last_spell && $last_spell != $spell ]]
+ then
+ message "${MESSAGE_COLOR}Removing dirs and files in config stage
area.${DEFAULT_COLOR}"
+ rm_source_dir $CONFIG_STAGE_DIRECTORY/$last_spell
+ fi
+ last_sdate="$sdate"
+ last_spell="$spell"
+ fi
+ done
+ #
+ # final check for removing spell directories this is mainly a check so that
+ # empty directories will get removed
+ #
+ if [[ $last_spell ]]
+ then
+ message "${MESSAGE_COLOR}Removing dirs and files in config stage
area.${DEFAULT_COLOR}"
+ rm_source_dir $CONFIG_STAGE_DIRECTORY/$last_spell
+ fi
+}
+
+
+. /etc/sorcery/config
+if [ "$UID" -gt 0 ]; then
+ echo "Enter the root password, please."
+ su -c "$0 $@" root
+else
+ STAGED_INSTALL="off"
+ main "$@"
+fi
+
+#---------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#---------------------------------------------------------------------
diff --git a/usr/sbin/delve b/usr/sbin/delve
index 30d0496..8967fa6 100755
--- a/usr/sbin/delve
+++ b/usr/sbin/delve
@@ -83,11 +83,13 @@ function delve_log_helper() {
OPTS="$OPTS $(get_depends_options $spell_depends $SPELL)"

# these have to go somewhere where future delves can find them
- C_LOG=/tmp/sorcery/delve/$SPELL.compile.log
- C_FIFO=/dev/stdout
- IW_LOG="/tmp/sorcery/delve/$SPELL.iw"
- VOYEUR_STDOUT=/dev/stdout
- VOYEUR_STDERR=/dev/stderr
+ C_LOG=${C_LOG:="/tmp/sorcery/delve/$SPELL.compile.log"}
+ IW_DBGLOG=${IW_DBGLOG:="/tmp/sorcery/delve/$SPELL.iwdbglog"}
+ C_FIFO=${C_FIFO:="/dev/stdout"}
+ IW_LOG=${IW_LOG:="/tmp/sorcery/delve/$SPELL.iw"}
+ VOYEUR_STDOUT=${VOYEUR_STDOUT:="/dev/stdout"}
+ VOYEUR_STDERR=${VOYEUR_STDERR:="/dev/stderr"}
+ S_PWD=${S_PWD:="/tmp/sorcery/delve/$SPELL.pwd"}
touch $C_LOG

}
@@ -133,10 +135,6 @@ function delve_config_loc() {
function delve_build() {
debug "delve" "Running $FUNCNAME"
delve_is_valid_step BUILD 1 2 || return 1
- [ -d $SOURCE_DIRECTORY ] || {
- message "Ack! there is no $SOURCE_DIRECTORY"
- return 1
- }
delve_log_helper
(
run_build
@@ -159,13 +157,17 @@ function delve_install() {

delve_is_valid_step BUILD 2 || return 1
delve_log_helper
- [ -d $SOURCE_DIRECTORY ] || {
- message "Ack! there is no $SOURCE_DIRECTORY"
- return 1
- }
- cd $SOURCE_DIRECTORY
+ if [[ ! -d $STAGE_DIRECTORY ]]
+ then
+ prepare_stage_root
+ fi &&
+ invoke_installwatch &&
+ if [[ "$STAGED_INSTALL" != "off" ]]
+ then
+ invoke_stage_root
+ fi &&
(
- run_install
+ run_install || return 2
) 2> >(tee -a $C_LOG 1>&2 > $VOYEUR_STDERR) \
> >(tee -a $C_LOG > $VOYEUR_STDOUT)
}
@@ -190,26 +192,28 @@ function delve_post_install() {
debug "delve" "Running $FUNCNAME"
delve_is_valid_step BUILD 1 2 || return 1
delve_log_helper
- [ -d $SOURCE_DIRECTORY ] || {
- message "Ack! there is no $SOURCE_DIRECTORY"
- return 1
- }
- [ "$BUILD_API" == "2" ] && cd $SOURCE_DIRECTORY # dirty hack
(
run_post_install
) 2> >(tee -a $C_LOG 1>&2 > $VOYEUR_STDERR) \
> >(tee -a $C_LOG > $VOYEUR_STDOUT)
+}

+function delve_stage_install() {
+ debug "delve" "Running $FUNCNAME"
+ delve_is_valid_step BUILD 1 2 || return 1
+ delve_log_helper
+ (
+ run_stage_install
+ ) 2> >(tee -a $C_LOG 1>&2 > $VOYEUR_STDERR) \
+ > >(tee -a $C_LOG > $VOYEUR_STDOUT)
}

function delve_final() {
debug "delve" "Running $FUNCNAME"
delve_is_valid_step BUILD 2 || return 1
delve_log_helper
- [ -d $SOURCE_DIRECTORY ] || {
- message "Ack! there is no $SOURCE_DIRECTORY"
- return 1
- }
+ devoke_installwatch &&
+ STAGED_INSTALL=off
(
run_final
) 2> >(tee -a $C_LOG 1>&2 > $VOYEUR_STDERR) \
@@ -248,7 +252,7 @@ function delve_make_continuation() {
local begin=$1
local end=$2
local API1="start PRE_BUILD config_loc BUILD POST_BUILD POST_INSTALL
TRIGGERS end"
- local API2="start PRE_BUILD config_loc BUILD PRE_INSTALL INSTALL
POST_INSTALL FINAL TRIGGERS end"
+ local API2="start PRE_BUILD config_loc BUILD PRE_INSTALL INSTALL
POST_INSTALL stage_install FINAL TRIGGERS end"
local THIS_API
case $BUILD_API in
1) THIS_API=$API1 ;;
@@ -301,6 +305,7 @@ function process_parameters() {
INSTALL) STATES="$STATES $param" ;;
POST_BUILD) STATES="$STATES $param" ;;
POST_INSTALL) STATES="$STATES $param" ;;
+ stage_install) STAGES="$STAGES $param" ;;
FINAL) STATES="$STATES $param" ;;
TRIGGERS) STATES="$STATES $param" ;;
success) STATES="$STATES $param" ;;
@@ -334,6 +339,11 @@ function main() {

echo "DEBUG: $STATES"

+ if ! installwatch_is_stageable
+ then
+ STAGED_INSTALL=off
+ fi
+
local last_rc=0
for STATE in $STATES; do
message "Running state $STATE"
@@ -346,6 +356,7 @@ function main() {
INSTALL) delve_install ;;
POST_BUILD) delve_post_build ;;
POST_INSTALL) delve_post_install ;;
+ stage_install) delve_stage_install ;;
FINAL) delve_final ;;
TRIGGERS) delve_triggers ;;
success) delve_spell_success ;;
diff --git a/usr/share/man/man5/grimoire.5 b/usr/share/man/man5/grimoire.5
index 42e1e49..bd6b791 100644
--- a/usr/share/man/man5/grimoire.5
+++ b/usr/share/man/man5/grimoire.5
@@ -112,24 +112,27 @@ (except FINAL and TRIGGERS)
.PP
.I PRE_BUILD
.IP
-This describes the unpacking process as performed in step 2. The default
-PRE_BUILD will work for the following compressions:
+This describes the unpacking process as performed in step 2 and current
+working directory for this step is the $BUILD_DIRECTORY, usually /usr/src.
+The default PRE_BUILD will work for the following compressions:
.IP
bzip2, gzip, zip, RPM, tar
.PP
.I BUILD
.IP
This describes the compilation process as performed in steps
-6 and 7. Here the package is built, not installed yet. If the
-software package compiles using these 2 steps then the default
+6 and 7. Here the package is built, not installed yet. The current
+working directory for this step is $SOURCE_DIRECTORY set in the DETAILS
+file. If the software package compiles using these 2 steps then the default
BUILD can be used. Sorcery automatically changes the install path and sets
optimization options.
.PP
.I PRE_INSTALL
.IP
-This will start installwatch, sorcery's install logging system.
+This will start installwatch, sorcery's install logging system.
It will log every file touched during install so we can get the install log
-of files installed by the spell.
+of files installed by the spell. The current working directory for this step
+is the old working directory of the BUILD step.

It is recommended that if you add this file it contains
.I default_pre_install.
@@ -138,12 +141,24 @@ It is recommended that if you add this f
.IP
This is step 8. "make install" by default.
If your spell needs another way to install its files, here is the place to
-do so.
+do so. The current working directory of this step is the old working
directory
+of PRE_INSTALL
.PP
.I POST_INSTALL
.IP
This step finishes off the install process. It installs configuration files
-and documentation, and finally turns off installwatch.
+and documentation, and finally turns off installwatch. If the spell is being
+staged this step will also copy the files back to the system and stage config
+files in a different location to be merged back to the system by the user.
+Also, if the spell is being staged the working directory for this step is
one
+directory above the root of the staged area after the INSTALL step else the
+working directory is the system root. To access files in the stage directory
+prefix the with the directory name 'TRANSL'. This provides a simple safety
+check so system files won't get wiped out. A second check against the
+enviromental variable STAGED_INSTALL is also highly recommended,
STAGED_INSTALL
+will be set to 'off' if the spell isn't going to be staged before
installing.
+This allows packages to move/remove files before they are installed to the
+system safely.
It is highly recommended to run
.I default_post_install
at the end of this file.
@@ -152,7 +167,8 @@ at the end of this file.
.IP
This file contains instructions on files to be installed and instructions
to be performed that should for some reason not appear in the install logs
-(e.g. modifying another package's /etc files)
+(e.g. modifying another package's /etc files). The working directory of this
+step is the root of the system.

This is the only file in the build process that does not have a default,
so if it does not exist, nothing will be done.
diff --git a/var/lib/sorcery/modules/build_api/api1
b/var/lib/sorcery/modules/build_api/api1
index 63146c5..cd7e5e3 100755
--- a/var/lib/sorcery/modules/build_api/api1
+++ b/var/lib/sorcery/modules/build_api/api1
@@ -26,7 +26,7 @@ function run_build_spell() {
debug "build_api/api1" "run_build_spell"
C_LOG=$TMP_DIR/$SPELL.compile.log
C_FIFO=/dev/stdout
-
+ STAGED_INSTALL=off
rm -f $C_LOG
touch $C_LOG
if [[ $SCREEN_NAME ]] ; then
@@ -124,6 +124,7 @@ function run_build() {
invoke_build_dir
invoke_gcc2
optimize
+ prepare_stage_root
invoke_installwatch

message -n "Installing in dir: "
@@ -269,6 +270,7 @@ function real_default_post_build() {
install_desktop_files
gather_docs
devoke_installwatch
+ destroy_stage_root
init_post_install
ldconfig
# release_saved_libraries
diff --git a/var/lib/sorcery/modules/build_api/api2
b/var/lib/sorcery/modules/build_api/api2
index 3fe61d5..973f4ec 100755
--- a/var/lib/sorcery/modules/build_api/api2
+++ b/var/lib/sorcery/modules/build_api/api2
@@ -26,9 +26,14 @@ #---------------------------------------
function run_build_spell() {
debug "build_api/api2" "run_build_spell"

- C_LOG=$TMP_DIR/$SPELL.compile.log
- C_FIFO=/dev/stdout # not needed for api2 anymore, but just in case
-
+ export C_LOG=$TMP_DIR/$SPELL.compile.log
+ export IW_DBGLOG=$C_LOG.iwdbglog
+ export C_FIFO=/dev/stdout # not needed for api2 anymore, but just in case
+ export S_PWD=$TMP_DIR/build.saved.pwd
+ export VOYEUR_STDOUT VOYEUR_STDERR
+
+ rm -f $IW_DBGLOG
+ touch $IW_DBGLOG
rm -f $C_LOG
touch $C_LOG

@@ -46,18 +51,35 @@ function run_build_spell() {
VOYEUR_STDOUT=/dev/null
VOYEUR_STDERR=/dev/null
fi
-
+
+ if ! installwatch_is_stageable
+ then
+ STAGED_INSTALL=off
+ fi
+
local PROTECT_SORCERY=yes
local rs
(
- run_pre_build || return 1
- run_config_loc || return 2
+ run_pre_build || return 1
+ run_config_loc || return 2
(
- run_build &&
- run_pre_install &&
- run_install || return 2
- run_post_install &&
- run_final || return 3
+ run_build &&
+ run_pre_install &&
+# you have to make this directory every time even if you don't use it because
+# it's a bug with installwatch that it needs to exist at all times
+ prepare_stage_root &&
+ invoke_installwatch &&
+ if [[ "$STAGED_INSTALL" != "off" ]]
+ then
+ invoke_stage_root
+ fi &&
+ set_stage_root_paths &&
+ delve $SPELL INSTALL &&
+ delve $SPELL POST_INSTALL || return 2
+ run_stage_install &&
+ devoke_installwatch &&
+ STAGED_INSTALL=off &&
+ run_final || return 3
) 2> >(tee -a $C_LOG 1>&2 >> $VOYEUR_STDERR) \
> >(tee -a $C_LOG >> $VOYEUR_STDOUT)
)
@@ -92,7 +114,7 @@ function run_pre_build() {

rm_source_dir
mkdir -p $BUILD_DIRECTORY
- cd $BUILD_DIRECTORY
+ cd "$BUILD_DIRECTORY"

verify_sources &&
persistent_load &&
@@ -119,8 +141,11 @@ function run_build() {
echo "Compile log for $SPELL $VERSION Built on `date -u`" > $C_LOG
echo "Using gcc version: `gcc -dumpversion`" >> $C_LOG

- [ -d "$SOURCE_DIRECTORY" ] &&
- cd $SOURCE_DIRECTORY
+ if [ -d "$SOURCE_DIRECTORY" ] ; then
+ cd "$SOURCE_DIRECTORY"
+ else
+ cd "$BUILD_DIRECTORY"
+ fi &&

invoke_build_dir
invoke_gcc2
@@ -146,6 +171,7 @@ function run_build() {
"${DEFAULT_COLOR}"
return 1
fi
+ pwd > $S_PWD
}


@@ -156,6 +182,14 @@ #---------------------------------------
function run_pre_install() {
debug "build_api/api2" "Starting run_pre_install()"

+ if [ -f $S_PWD ] ; then
+ cd "`cat $S_PWD`"
+ elif [ -d $SOURCE_DIRECTORY ] ; then
+ cd "$SOURCE_DIRECTORY"
+ else
+ cd "$BUILD_DIRECTORY"
+ fi
+
persistent_load &&
if [ -x $SCRIPT_DIRECTORY/PRE_INSTALL ]; then
. $SCRIPT_DIRECTORY/PRE_INSTALL
@@ -166,18 +200,27 @@ function run_pre_install() {
fi &&
persistent_save &&
echo "Compile log for $SPELL $VERSION Completed Build on `date -u`" >>
$C_LOG
+ pwd > $S_PWD
}


#---------------------------------------------------------------------
-## Turns all the various logs back on that were turned off from after
-## run_pre_install finished, then runs INSTALL or default_install
+## load persistent vars, then runs INSTALL or default_install
## Along with other stuff that needs to be transplanted elsewhere.
+## NOTE: this function is run from delve so installwatch can be invoked
+## around an execed bash shell, this is needed for installwatch to
+## stage root properly
#---------------------------------------------------------------------
function run_install() {
debug "build_api/api2" "Starting run_install()"
-
- invoke_installwatch
+ set_stage_root_paths
+ if [ -f $S_PWD ] ; then
+ cd "`cat $S_PWD`"
+ elif [ -d $SOURCE_DIRECTORY ] ; then
+ cd "$SOURCE_DIRECTORY"
+ else
+ cd "$BUILD_DIRECTORY"
+ fi

persistent_load &&
if [ -x $SCRIPT_DIRECTORY/INSTALL ]; then
@@ -187,7 +230,8 @@ function run_install() {
else
default_install
fi &&
- persistent_save &&
+ persistent_save
+

if [ "$?" != 0 ]; then
message "${PROBLEM_COLOR}" \
@@ -200,11 +244,22 @@ function run_install() {
#---------------------------------------------------------------------
## Checks for a POST_BUILD file in SCRIPT_DIRECTORY, and if it is
## executable, runs it. This file is run after INSTALL and before
-## FINAL. Its purpose is to bookend INSTALL and shutoff installwatch.
+## FINAL. Its purpose is to manipulate the installed files in the stage
+## root and install other tracked files.
+## NOTE: this function is run from delve so installwatch can be invoked
+## around an execed bash shell, this is needed for installwatch to
+## stage root properly
#---------------------------------------------------------------------
function run_post_install() {
debug "build_api/api2" "Starting run_post_install()"
+ set_stage_root_paths
persistent_load &&
+ if [[ $STAGED_INSTALL != off ]]
+ then
+ cd "$STAGE_DIRECTORY/"
+ else
+ cd "${INSTALL_ROOT:-/}"
+ fi &&
if [ -x $SCRIPT_DIRECTORY/POST_INSTALL ]; then
. $SCRIPT_DIRECTORY/POST_INSTALL
elif [[ "$POST_INSTALL_CMD" ]] ; then
@@ -215,7 +270,19 @@ function run_post_install() {
persistent_save &&
unlock_resources "libgrimoire" "install"
}
-
+#--------------------------------------------------------------------
+### Checks against STAGED_INSTALL and installs the staged spell
+### accordingly
+##--------------------------------------------------------------------
+function run_stage_install() {
+ if [[ "$STAGED_INSTALL" != "off" ]]
+ then
+ set_stage_root_paths
+ devoke_stage_root &&
+ install_staged_spell
+ fi
+}
+
#---------------------------------------------------------------------
## Checks for a FINAL file in SCRIPT_DIRECTORY, and if it is
## executable, runs it. This file is used for extra files that need
@@ -225,6 +292,7 @@ function run_final() {

debug "build_api/api2" "Starting run_final()"
persistent_load &&
+ cd "${INSTALL_ROOT:-/}"
if [ -x $SCRIPT_DIRECTORY/FINAL ]
then
. $SCRIPT_DIRECTORY/FINAL
@@ -293,9 +361,7 @@ ##
#---------------------------------------------------------------------
function real_default_pre_install() {
debug "build_api/api2" "Starting real_default_pre_install"
- devoke_installwatch
prepare_install
- invoke_installwatch
}

#---------------------------------------------------------------------
@@ -328,7 +394,6 @@ function real_default_post_install() {
install_pam_confs
install_desktop_files
gather_docs
- devoke_installwatch
init_post_install
ldconfig
# release_saved_libraries
diff --git a/var/lib/sorcery/modules/build_api/common
b/var/lib/sorcery/modules/build_api/common
index d66ba64..61abc80 100755
--- a/var/lib/sorcery/modules/build_api/common
+++ b/var/lib/sorcery/modules/build_api/common
@@ -111,14 +111,13 @@ ## Locks "libgrimoire" "install" before
## If the spell is not installed (or held) the spell is not dispelled.
##
#---------------------------------------------------------------------
-function real_prepare_install() { (
+function real_prepare_install() { (

debug "libgrimoire" "Running prepare_install() on $SPELL"

message "${MESSAGE_COLOR}Preparing to install" \
"${SPELL_COLOR}${SPELL}${DEFAULT_COLOR}"

- devoke_installwatch
lock_resources "libgrimoire" "install"

if spell_installed $SPELL ||
@@ -127,10 +126,20 @@ function real_prepare_install() { (

trap "spell_recover" SIGINT
save_libraries
+ save_binaries
dispel --notriggers --nosustain $SPELL

fi
-) }
+)
+ # TODO this is a dirty hack we need to remove it
+ for dir in $( find $SOURCE_DIRECTORY/old.binaries )
+ do
+ if [[ -d $dir ]]
+ then
+ export PATH="$dir:$PATH"
+ fi
+ done
+}

#---------------------------------------------------------------------
##
@@ -255,7 +264,11 @@ function run_spell_success() {
"${FILE_COLOR}${tablet_dir}${DEFAULT_COLOR}"
tablet_install_spell_files $tablet_dir
local TABLET_SPELL_DIR=$tablet_dir
-
+ if [[ $STAGED_INSTALL != "off" && -d
$CONFIG_STAGE_DIRECTORY/$SPELL/current ]]
+ then
+ mv $CONFIG_STAGE_DIRECTORY/$SPELL/current \
+ $CONFIG_STAGE_DIRECTORY/$SPELL/$(basename $tablet_dir)
+ fi
# this data is now doubly stale, remove it
rm -f $ABANDONED_PERSIST/$SPELL.p
fi
@@ -280,6 +293,10 @@ function run_spell_success() {

# do this before cache archive creation (bug 8249)
rm_source_dir
+ if [[ $STAGED_INSTALL != off ]]
+ then
+ destroy_stage_root
+ fi

# cache archive

@@ -331,6 +348,13 @@ function run_spell_failure() {
get_uncommitted_rsub_depends_file $SPELL spell_rsub_depends
rm -f "$spell_sub_depends" "$spell_rsub_depends"

- [[ $CLEAN_SOURCE == on ]] && rm_source_dir
+ if [[ $CLEAN_SOURCE == on ]]
+ then
+ rm_source_dir
+ if [[ $STAGED_INSTALL != off ]]
+ then
+ destroy_stage_root
+ fi
+ fi
CAST_EXIT_STATUS=1
}
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_git
b/var/lib/sorcery/modules/dl_handlers/dl_git
index 26e8fff..38aadce 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_git
+++ b/var/lib/sorcery/modules/dl_handlers/dl_git
@@ -38,15 +38,21 @@ function dl_git_get () {
url_crack "$url" "$hints"
if test -d $GIT_DIRECTORY; then
message "${MESSAGE_COLOR}Running git pull...${DEFAULT_COLOR}"
- echo git pull $GIT_ROOT
( cd $GIT_DIRECTORY &&
- git pull $GIT_ROOT )
+ echo git-checkout $GIT_TAG &&
+ git-checkout $GIT_TAG &&
+ echo git-pull $GIT_ROOT $GIT_TAG
+ git-pull $GIT_ROOT $GIT_TAG )
rc=$?
eval "$dl_target=\"$GIT_DIRECTORY\""
else
message "${MESSAGE_COLOR}Running git clone...${DEFAULT_COLOR}"
- echo git clone $GIT_ROOT $GIT_DIRECTORY
- git clone $GIT_ROOT $GIT_DIRECTORY
+ echo git-clone $GIT_ROOT $GIT_DIRECTORY
+ git-clone $GIT_ROOT $GIT_DIRECTORY &&
+ cd $GIT_DIRECTORY &&
+ echo git-checkout $GIT_TAG
+ git-checkout $GIT_TAG &&
+ cd ../
rc=$?
eval "$dl_target=\"$GIT_DIRECTORY\""
fi
diff --git a/var/lib/sorcery/modules/libapi b/var/lib/sorcery/modules/libapi
index 2cbf515..5b4ae54 100755
--- a/var/lib/sorcery/modules/libapi
+++ b/var/lib/sorcery/modules/libapi
@@ -455,6 +455,16 @@ function devoke_installwatch () {

#---------------------------------------------------------------------
## @Type API
+## @See <@function
var.lib.sorcery.modules.libtrack.html,real_devoke_stage_root> for more
details.
+## Stops using installwatch
+#---------------------------------------------------------------------
+function devoke_stage_root () {
+ debug "libapi" "devoke_stage_root - $*"
+ real_devoke_stage_root "$@"
+}
+
+#---------------------------------------------------------------------
+## @Type API
## @params Number portion of SOURCE[[:digit:]], eg '', "2", "3", etc.
## @See <@function var.lib.sorcery.modules.libsummon.html,real_download_src>
for more details.
##
@@ -622,6 +632,16 @@ function invoke_installwatch () {
}

#---------------------------------------------------------------------
+## @Type API
+## @See <@function
var.lib.sorcery.modules.libtrack.html,real_invoke_stage_root> for more
details.
+## Starts using installwatch
+#---------------------------------------------------------------------
+function invoke_stage_root () {
+ debug "libapi" "invoke_stage_root - $*"
+ real_invoke_stage_root "$@"
+}
+
+#---------------------------------------------------------------------
## @param return_var
## @param elements, ...
## @See <@function var.lib.sorcery.modules.libmisc.html,real_list_remove>
for more details.
diff --git a/var/lib/sorcery/modules/libcast b/var/lib/sorcery/modules/libcast
index 52c56f4..36e9219 100755
--- a/var/lib/sorcery/modules/libcast
+++ b/var/lib/sorcery/modules/libcast
@@ -639,6 +639,12 @@ function create_compile_log() {
else
$COMPRESSBIN -f < $C_LOG > $COMPILE_LOGS/$SPELL-$VERSION$EXTENSION
fi
+ if [ -z "$EXTENSION" ]
+ then
+ cp $IW_DBGLOG $COMPILE_LOGS/$SPELL-$VERSION.iwdbglog
+ else
+ $COMPRESSBIN -f < $IW_DBGLOG >
$COMPILE_LOGS/$SPELL-$VERSION.iwdbglog$EXTENSION
+ fi
}


diff --git a/var/lib/sorcery/modules/libcodex
b/var/lib/sorcery/modules/libcodex
index 661d015..32c8be4 100755
--- a/var/lib/sorcery/modules/libcodex
+++ b/var/lib/sorcery/modules/libcodex
@@ -614,6 +614,8 @@ function codex_set_current_spell() {
. $SPELL_DIRECTORY/DETAILS 1>/dev/null 2>&1
persistent_clear

+ STAGE_DIRECTORY=$BUILD_DIRECTORY/stage-$SPELL-$VERSION
+
# load compatibility functions needed for any stage of cast
load_libcompat

diff --git a/var/lib/sorcery/modules/libgcc2 b/var/lib/sorcery/modules/libgcc2
index d669eed..599911b 100755
--- a/var/lib/sorcery/modules/libgcc2
+++ b/var/lib/sorcery/modules/libgcc2
@@ -49,23 +49,6 @@ function use_gcc2() {

}

-
-#---------------------------------------------------------------------
-## @param new path to add
-## @param old path
-## @Stdout new path
-## Echos the old path with new path prepended, separated with a ':'
-#---------------------------------------------------------------------
-function gcc2_prepend_path() {
-
- if test -z $2
- then echo $1
- else echo $1:$2
- fi
-
-}
-
-
#---------------------------------------------------------------------
## @param path
##
@@ -75,10 +58,10 @@ ##
#---------------------------------------------------------------------
function gcc2_add_paths() {

- export PATH=$( gcc2_prepend_path $1/bin $PATH )
- export LD_LIBRARY_PATH=$( gcc2_prepend_path $1/lib $LD_LIBRARY_PATH )
- export LD_RUN_PATH=$( gcc2_prepend_path $1/lib $LD_RUN_PATH )
- export INFOPATH=$( gcc2_prepend_path $1/info $INFOPATH )
+ export PATH=$( envar_prepend_path $1/bin $PATH )
+ export LD_LIBRARY_PATH=$( envar_prepend_path $1/lib $LD_LIBRARY_PATH )
+ export LD_RUN_PATH=$( envar_prepend_path $1/lib $LD_RUN_PATH )
+ export INFOPATH=$( envar_prepend_path $1/info $INFOPATH )
export CPPFLAGS="-I $1/include $CPPFLAGS"

}
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index 1b06c4c..b11e519 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -1448,6 +1448,23 @@ function smgl_basename() {
fi
}

+#--------------------------------------------------------------------
+## @param new path to add
+## @param old path
+## @Stdout new path
+##
+## TODO: remove grimoire functions libgcc gcc_prepend_path and use
+## this one
+#--------------------------------------------------------------------
+function envar_prepend_path()
+{
+ if test -z $2
+ then
+ echo $1
+ else
+ echo $1:$2
+ fi
+}


# Standard debug line:
diff --git a/var/lib/sorcery/modules/libresurrect
b/var/lib/sorcery/modules/libresurrect
index 947e7be..7e9cd34 100755
--- a/var/lib/sorcery/modules/libresurrect
+++ b/var/lib/sorcery/modules/libresurrect
@@ -451,8 +451,8 @@ function internal_install_config_file()
return $?
fi

- # if the file does not exist,
- if ! test -e "$to"; then
+ # if the file does not exist, or stage root is invoked
+ if ! test -e "$to" || [[ "$STAGED_INSTALL" != "off" ]] ; then
# copy the new one in (plus leading directories)
mkdir -p "$(dirname "$to")" &&
cp -pv "$from" "$to"
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index 6f57bd1..0e33b66 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -292,6 +292,63 @@ function save_libraries() {

}

+#---------------------------------------------------------------------
+##
+## Saves the current libraries associated with the spell, from /lib
+## and /usr/lib into $SOURCE_DIRECTORY/old.libraries/
+## Also runs ldconfig with the saved libraries.
+##
+#---------------------------------------------------------------------
+function save_binaries() {
+ local dir
+ if [ -z "$SOURCE_DIRECTORY" ]
+ then return
+ fi
+
+ debug "libsorcery" "Running save_binaries()"
+
+ OLD_BINS=$SOURCE_DIRECTORY/old.binaries
+ mkdir -p $OLD_BINS
+
+ SAVED=$OLD_BINS/$SPELL.saved.binaries
+ lock_file $SAVED
+ rm -rf $SAVED
+
+ OLD_VERSION=`installed_version $SPELL`
+ OLD_LOG=$INSTALL_LOGS/$SPELL-$OLD_VERSION
+
+ grep "^/bin/\|^/sbin/\|^/usr/bin/\|^/usr/sbin/" $OLD_LOG |
+ while read LINE; do
+
+ if [ -f $LINE ] &&
+ file -bL $LINE |
+ grep -q "executable"
+ then
+ if [ -h $LINE ]; then
+ DEST=$( readlink "$LINE" )
+ mkdir -p $( dirname $OLD_BINS/$LINE )
+ ln -sf $DEST $OLD_BINS/$LINE
+ else
+ mkdir -p $( dirname $OLD_BINS/$LINE )
+ cp $LINE $OLD_BINS/$LINE
+ fi
+ echo $OLD_BINS/$LINE >> $SAVED
+ fi
+
+
+ done
+
+ unlock_file $SAVED
+
+ for dir in $( find $OLD_BINS )
+ do
+ if [[ -d $dir ]]
+ then
+ export PATH=$( envar_prepend_path "$dir" "$PATH" )
+ fi
+ done
+}
+

#---------------------------------------------------------------------
##
@@ -484,12 +541,21 @@ function filter_generic() {
local args=$1
local filter_name=$2
local system_filter=$3
+ local spell_from=$4
local grimoire_filter section_filter spell_filter spell_dir
- if tablet_find_spell_dir $SPELL spell_dir &>/dev/null; then
- debug libsorcery "filter_generic tablet at : $spell_dir "
- tablet_get_spell_filter "$spell_dir" "$filter_name" spell_filter
&>/dev/null
- tablet_get_section_filter "$spell_dir" "$filter_name" section_filter
&>/dev/null
- tablet_get_grimoire_filter "$spell_dir" "$filter_name" grimoire_filter
&>/dev/null
+ if [[ $spell_from == "codex" ]]
+ then
+ debug libsorcery "filter_generic codex at : $SCRIPT_DIRECTORY "
+ grimoire_filter=$GRIMOIRE/$filter_name
+ section_filter=$SECTION_DIRECTORY/$filter_name
+ spell_filter=$SCRIPT_DIRECTORY/$filter_name
+ else
+ if tablet_find_spell_dir $SPELL spell_dir &>/dev/null; then
+ debug libsorcery "filter_generic tablet at : $spell_dir "
+ tablet_get_spell_filter "$spell_dir" "$filter_name" spell_filter
&>/dev/null
+ tablet_get_section_filter "$spell_dir" "$filter_name" section_filter
&>/dev/null
+ tablet_get_grimoire_filter "$spell_dir" "$filter_name" grimoire_filter
&>/dev/null
+ fi
fi
set -- $args
if [ "$1" == -v ] ; then
diff --git a/var/lib/sorcery/modules/libstage
b/var/lib/sorcery/modules/libstage
new file mode 100755
index 0000000..3c3bbeb
--- /dev/null
+++ b/var/lib/sorcery/modules/libstage
@@ -0,0 +1,168 @@
+#!/bin/bash
+#---------------------------------------------------------------------
+## @Synopsis Functions for desling with the stage root and installing files
from the stage root
+## @Copyright Copyright (C) 2004 The Source Mage Team
<http://www.sourcemage.org>
+## Functions for desling with the stage root and installing files from the
stage root
+#---------------------------------------------------------------------
+
+#---------------------------------------------------------------------
+## @param stage root
+## Main for installing staged spell called imediatly after devoking
+## installwatch and stage root
+#---------------------------------------------------------------------
+function install_staged_spell()
+{
+ mkdir -p "$CONFIG_STAGE_DIRECTORY/$SPELL/current"
+ stage_install_configs
+ stage_install_rest
+}
+
+function filter_spell_configs()
+{
+ filter_generic "$*" configs $CONFIGS codex
+}
+
+#---------------------------------------------------------------------
+## Install config files to a staged location on the system
+#---------------------------------------------------------------------
+function stage_install_configs()
+{
+ message "${MESSAGE_COLOR}Staging config files into the
system${DEFAULT_COLOR}"
+ get_all_package_files |
+ filter_spell_configs -v |
+ stage_install_files config
+}
+
+#---------------------------------------------------------------------
+## Install the rest of the files in the stage root
+#---------------------------------------------------------------------
+function stage_install_rest()
+{
+ message "${MESSAGE_COLOR}Installing the rest of the files${DEFAULT_COLOR}"
+ get_all_package_files |
+ filter_spell_configs |
+ stage_install_files
+}
+
+#---------------------------------------------------------------------
+## @Stdout list of files installed by package
+## lists all files the package installs relative to /
+#---------------------------------------------------------------------
+function get_all_package_files()
+{
+ find $STAGE_DIRECTORY/TRANSL | sed "s:$STAGE_DIRECTORY/TRANSL::"
+}
+
+#---------------------------------------------------------------------
+## @Stdin list of files to install
+## install the files from the stage directory to the system
+#---------------------------------------------------------------------
+function stage_install_files()
+{
+ local file
+ while read file ; do
+ [ "$file" ] || continue
+ stage_install_list "$file" "$1"
+ done
+}
+
+function stage_install_directory()
+{
+ local DIR=$1
+ local PERMISSION=$(stat -c %a "${STAGE_DIRECTORY}/TRANSL/${DIR}")
+ if [[ ! -d $(dirname "${INSTALL_ROOT}/$DIR") ]]
+ then
+ # this shouldn't happen but just in case
+ message "${PROBLEM_COLOR}Ah, not preserving permissions making $(dirname
$DIR)${DEFAULT_COLOR}" &&
+ mkdir -p $(dirname "${INSTALL_ROOT}/$DIR")
+ fi &&
+ message "${FILE_COLOR}$PERMISSION $DIR${DEFAULT_COLOR}" &&
+ if [[ -d "$DIR" ]]
+ then
+ chmod "$PERMISSION" "${INSTALL_ROOT}/$DIR"
+ else
+ mkdir "$DIR" &&
+ chmod "$PERMISSION" "${INSTALL_ROOT}/$DIR"
+ fi
+}
+
+function stage_install_file()
+{
+ local FILE=$1
+ local PERMISSION=$(stat -c %a "${STAGE_DIRECTORY}/TRANSL/$FILE")
+ local SAVE="$CONFIG_STAGE_DIRECTORY/$SPELL/current/$FILE"
+ message "${FILE_COLOR}$PERMISSION $FILE${DEFAULT_COLOR}"
+ case $2 in
+ config)
+ if [[ -e "${INSTALL_ROOT}/$FILE" ]]
+ then
+ message "${MESSAGE_COLOR}Staging config to
$CONFIG_STAGE_DIRECTORY${DEFAULT_COLOR}"
+ mkdir -p "$(dirname $SAVE)" &&
+ cp -dp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$SAVE"
+ else
+ cp -dp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$FILE"
+ fi
+ ;;
+ *)
+ cp -fdp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$FILE"
+ ;;
+ esac
+}
+
+function stage_install_symlink()
+{
+ local FILE=$1
+ local SAVE=$CONFIG_STAGE_DIRECTORY/$FILE.$(date +%Y%m%d%H%M%S)
+ message "${FILE_COLOR}Symlink $FILE${DEFAULT_COLOR}"
+ case $2 in
+ config)
+ if [[ -e "${INSTALL_ROOT}/$FILE" ]]
+ then
+ touch "${INSTALL_ROOT}/$FILE" &&
+ mkdir -p $(dirname $SAVE) &&
+ cp -dp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$SAVE"
+ else
+ cp -dp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$FILE"
+ fi
+ ;;
+ *)
+ cp -dp "$STAGE_DIRECTORY/TRANSL/$FILE" "${INSTALL_ROOT}/$FILE"
+ ;;
+ esac
+}
+
+function set_stage_root_paths()
+{
+ local bindir libdir
+ for bindir in /bin /sbin /usr/bin /usr/sbin
+ do
+ export PATH=$( envar_prepend_path "$STAGE_DIRECTORY/TRANSL/$bindir"
"$PATH" )
+ done
+ for libdir in /lib /usr/lib
+ do
+ export LD_LIBRARY_PATH=$( envar_prepend_path $STAGE_DIRECTORY/$libdir
$LD_LIBRARY_PATH )
+ done
+}
+
+#---------------------------------------------------------------------
+## @param file
+## install the file from the stage root to the system does check for
+## dir so that the file can be moved
+#---------------------------------------------------------------------
+function stage_install_list()
+{
+ if [[ -h $STAGE_DIRECTORY/TRANSL/$1 ]]
+ then
+ stage_install_symlink "$@"
+ elif [[ ! -d $STAGE_DIRECTORY/TRANSL/$1 ]]
+ then
+ stage_install_file "$@"
+ elif [[ -d $STAGE_DIRECTORY/TRANSL/$1 ]]
+ then
+ stage_install_directory "$@"
+ else
+ message "${PROBLEM_COLOR}Oh, God I don't know what to do..."
+ message "${FILE_COLOR}$(dirname ${1})${PROBLEM_COLOR}"
+ message "is some other kind of a file and not a
directory${DEFAULT_COLOR}"
+ fi
+}
diff --git a/var/lib/sorcery/modules/libtrack
b/var/lib/sorcery/modules/libtrack
index 4de9d3e..c42ccf3 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -37,6 +37,52 @@ function real_track_manual() {
return 0
}

+#---------------------------------------------------------------------
+##
+## Starts Translation Stage Root
+##
+#---------------------------------------------------------------------
+function real_invoke_stage_root()
+{
+ export INSTW_TRANSL=1
+ export INSTW_LOGFILE=/dev/null
+ export DOCUMENT_DIRECTORY=${DOCUMENT_DIRECTORY#$INSTALL_ROOT}
+ unset INSTALL_ROOT
+}
+
+#---------------------------------------------------------------------
+##
+## Stops Translation Stage Root
+##
+#---------------------------------------------------------------------
+function real_devoke_stage_root()
+{
+ export INSTW_TRANSL=0
+ export INSTW_LOGFILE=$IW_LOG
+ [ -f $ROOTS_CONFIG ] && source $ROOTS_CONFIG
+ export DOCUMENT_DIRECTORY=${INSTALL_ROOT}/${DOCUMENT_DIRECTORY}
+ return 0
+}
+
+#---------------------------------------------------------------------
+##
+## Prepare Stage Root
+##
+#---------------------------------------------------------------------
+function prepare_stage_root()
+{
+ mk_source_dir $STAGE_DIRECTORY
+}
+
+#---------------------------------------------------------------------
+##
+## Destroy Stage Root
+##
+#---------------------------------------------------------------------
+function destroy_stage_root()
+{
+ rm_source_dir $STAGE_DIRECTORY
+}

#---------------------------------------------------------------------
##
@@ -46,11 +92,17 @@ #---------------------------------------
function real_invoke_installwatch() {
if [ -e /usr/lib/installwatch.so ]; then
export INSTALLWATCHFILE=$IW_LOG
+ export INSTW_LOGFILE=$IW_LOG
+ export INSTW_DBGFILE="$IW_DBGLOG"
+ export INSTW_ROOTPATH=$STAGE_DIRECTORY
+ export INSTW_TRANSL=0
+ export INSTW_BACKUP=0
+ export INSTW_DBGLVL=4
+ export INSTW_EXCLUDE="$INSTALLWATCH_UNSTAGED_PATHS"
export LD_PRELOAD=/usr/lib/installwatch.so
fi
}

-
#---------------------------------------------------------------------
##
## Stops using installwatch
@@ -59,8 +111,25 @@ #---------------------------------------
function real_devoke_installwatch() {
unset LD_PRELOAD
unset INSTALLWATCHFILE
+ unset INSTW_LOGFILE
+ unset INSTW_DBGFILE
+ unset INSTW_ROOTPATH
+ unset INSTW_TRANSL
+ unset INSTW_BACKUP
+ unset INSTW_DBGLVL
+ unset INSTW_EXCLUDE
}

+function installwatch_is_stageable()
+{
+ local MINOR_VER="`installed_version installwatch | cut -d. -f2`"
+ if [[ $MINOR_VER == 7 ]]
+ then
+ return 0
+ else
+ return 1
+ fi
+}

#---------------------------------------------------------------------
##
@@ -76,8 +145,8 @@ function parse_iw() {
local TAB=" "
OMIT_IN="${TAB}rename\|${TAB}symlink\|${TAB}unlink"

- grep -v "$OMIT_IN" $INPUT | cut -f3 | grep "^/"
- cat $INPUT | cut -f4 | grep "^/"
+ grep -v "$OMIT_IN" $INPUT | cut -f3 | grep "^/" | sed 's#^//#/#g'
+ cat $INPUT | cut -f4 | grep "^/" | sed 's#^//#/#g'
}


diff --git a/var/lib/sorcery/modules/url_handlers/url_git
b/var/lib/sorcery/modules/url_handlers/url_git
index ae61565..8ec6eac 100755
--- a/var/lib/sorcery/modules/url_handlers/url_git
+++ b/var/lib/sorcery/modules/url_handlers/url_git
@@ -39,7 +39,7 @@ function url_git_crack() {
local GIT_DIRECTORY_TAG=`echo $URL | sed "s#^[^/]*[^:]*\(.*\)#\1#"`
GIT_DIRECTORY=`echo $GIT_DIRECTORY_TAG | cut -d : -f2`
local GIT_TAGNAME=`echo $GIT_DIRECTORY_TAG | cut -d : -f3`
- GIT_TAG=${SVN_TAGNAME:=master}
+ GIT_TAG=${GIT_TAGNAME:=master}

}

diff --git a/var/lib/sorcery/modules/url_handlers/url_git_http
b/var/lib/sorcery/modules/url_handlers/url_git_http
new file mode 100755
index 0000000..478fc48
--- /dev/null
+++ b/var/lib/sorcery/modules/url_handlers/url_git_http
@@ -0,0 +1,122 @@
+#!/bin/bash
+#---------------------------------------------------------------------
+##
+##=head1 SYNOPSIS
+##
+## Url handler functions for downloading git urls
+##
+##=head1 DESCRIPTION
+##
+## This file contains functions for downloading and verifying
+## git urls. This file uses the "git" program.
+##
+##=head1 COPYRIGHT
+##
+## Copyright 2002 by the Source Mage Team
+##
+##=head1 FUNCTIONS
+##
+##=over 4
+##
+#---------------------------------------------------------------------
+
+#---------------------------------------------------------------------
+##=item url_git_crack <url>
+##
+## Parse the specified git url.
+##
+## @Global URL
+## @Global GIT_ROOT
+## @Global GIT_DIRECTORY
+## @Global GIT_TAG
+##
+#---------------------------------------------------------------------
+function url_git_http_crack() {
+
+ URL=`url_strip_prefix "$1" git_http`
+ GIT_ROOT=`echo $URL | sed "s#\(^[^/]*[^:]*\):.*#\1#"`
+ GIT_ROOT=http://$GIT_ROOT
+ local GIT_DIRECTORY_TAG=`echo $URL | sed "s#^[^/]*[^:]*\(.*\)#\1#"`
+ GIT_DIRECTORY=`echo $GIT_DIRECTORY_TAG | cut -d : -f2`
+ local GIT_TAGNAME=`echo $GIT_DIRECTORY_TAG | cut -d : -f3`
+ GIT_TAG=${GIT_TAGNAME:=master}
+
+}
+
+#---------------------------------------------------------------------
+##=item url_git_bucketize <url>
+##
+## Verifies the specified git url. Returns true if the url exists
+## OR if the url is an empty string.
+##
+#---------------------------------------------------------------------
+function url_git_http_bucketize() {
+ echo git
+}
+
+#---------------------------------------------------------------------
+##=item url_git_verify <url>
+##
+## Verifies the specified git url. Returns true if the url exists
+## OR if the url is an empty string.
+##
+#---------------------------------------------------------------------
+function url_git_http_verify() {
+ local URL GIT_ROOT GIT_DIRECTORY GIT_TAG item
+ url_git_http_crack $1
+ for item in URL GIT_ROOT GIT_DIRECTORY GIT_TAG ; do
+ if ! [[ ${!item} ]] ; then
+ return 1
+ fi
+ done
+}
+
+#---------------------------------------------------------------------
+##=item url_<prefix>_hostname <url>
+##
+## Gets the hostname out of the url
+#---------------------------------------------------------------------
+function url_git_http_hostname() {
+ echo $1|sed 's:^.*//\([^/]*\).*$:\1:'
+}
+
+#---------------------------------------------------------------------
+##=item url_git_netselect <url>
+##
+## Gets a netselect type output for the url
+##
+#---------------------------------------------------------------------
+function url_git_http_netselect() {
+ local tmp_hostname url_speed each
+
+ for each in "$@" ; do
+ tmp_hostname=$(url_git_http_hostname $each)
+ # since we had to pull the url apart to give netselect
+ # something it can understand we'll just pretend like
+ # multiple A records wont exist for this host...
+ url_speed=$(netselect -s 1 $tmp_hostname 2>/dev/null|awk '{print $1}')
+ [[ -n $url_speed ]] && echo "$url_speed $each"
+ done
+}
+
+
+#---------------------------------------------------------------------
+##=back
+##
+##=head1 LICENSE
+##
+## This software is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This software is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this software; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##
+#---------------------------------------------------------------------




Archive powered by MHonArc 2.6.24.

Top of Page