Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to stable-1.13 sorcery by Jaka Kranjc (a2ae4e9d9533a10133b06ed0e94620e403c1286b)

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 stable-1.13 sorcery by Jaka Kranjc (a2ae4e9d9533a10133b06ed0e94620e403c1286b)
  • Date: Mon, 24 Mar 2008 11:00:23 -0500

GIT changes to stable-1.13 sorcery by Jaka Kranjc
<lynxlynxlynx AT sourcemage.org>:

ChangeLog | 100
+++++++++++++++++++++++++
etc/sorcery/compile_config | 3
etc/sorcery/config | 2
etc/sorcery/local/README | 2
etc/sorcery/url | 9 +-
etc/sorcery/version | 2
usr/sbin/cabal | 73 ++++++++++++------
usr/sbin/cast | 12 +--
usr/sbin/cleanse | 29 ++++---
usr/sbin/delve | 6 -
usr/sbin/gaze | 73 +++++++++++++-----
usr/sbin/scribbler | 5 -
usr/sbin/scribe | 96
++++++++++++++----------
usr/share/man/man1/gaze.1 | 7 +
usr/share/man/man8/cast.8 | 3
var/lib/sorcery/modules/build_api/common | 4 -
var/lib/sorcery/modules/dl_handlers/dl_cvs | 1
var/lib/sorcery/modules/dl_handlers/dl_dir | 1
var/lib/sorcery/modules/dl_handlers/dl_file | 1
var/lib/sorcery/modules/dl_handlers/dl_rsync | 8 +-
var/lib/sorcery/modules/dl_handlers/dl_wget | 41 ++++++----
var/lib/sorcery/modules/libapi | 5 -
var/lib/sorcery/modules/libcast | 7 -
var/lib/sorcery/modules/libcodex | 2
var/lib/sorcery/modules/libdepends | 8 +-
var/lib/sorcery/modules/libdepengine | 10 +-
var/lib/sorcery/modules/libdispel | 1
var/lib/sorcery/modules/libdownload | 4 -
var/lib/sorcery/modules/libgpg | 80 +++++++++-----------
var/lib/sorcery/modules/libgrimoire | 2
var/lib/sorcery/modules/liblock | 10 +-
var/lib/sorcery/modules/libmisc | 48 +++++++-----
var/lib/sorcery/modules/libresurrect | 2
var/lib/sorcery/modules/libsorcery | 6 -
var/lib/sorcery/modules/libstate | 8 --
var/lib/sorcery/modules/libsummon | 3
var/lib/sorcery/modules/libtablet | 17 +---
var/lib/sorcery/modules/libtrack | 78 +++++++++----------
var/lib/sorcery/modules/libunpack | 4 -
var/lib/sorcery/modules/liburl | 12 +--
var/lib/sorcery/modules/url_handlers/url_cvs | 1
var/lib/sorcery/modules/url_handlers/url_dir | 1
var/lib/sorcery/modules/url_handlers/url_file | 1
var/lib/sorcery/modules/url_handlers/url_http | 40 +++++-----
var/lib/sorcery/modules/url_handlers/url_rsync | 1
var/lib/sorcery/subroutines | 1
46 files changed, 506 insertions(+), 324 deletions(-)

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

1.13.8

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

1.13.8-rc8

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

cast.8, cast: -B is recursive, so mention it #14371
(cherry-picked from commit e62719f363ffc5c54ac940154fd4295d4c55d067)

(cherry-picked from commit dfaf011f4bef0e341a63fc786ac294d524cee165)

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

gaze, gaze.1: added note about gaze depends working only on enabled deps
(cherry-picked from commit 84f2039b875fc3997fa6319ccf7110b063aecd95)

(cherry-picked from commit fcfb751ecc7c35119b321e9906dc6b1213f4c8ee)

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

cleanse: added "--tablet coalesce" to the help
(cherry-picked from commit 5caa9396e47625ba47f644fb48b1142a9f4c5f87)

(cherry-picked from commit 9cc5225b41aefcf93dc9bdc4a344bdfe9112a79c)

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

1.13.8-rc7

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

scribbler: fixed message when scribbling from a missing grimoire #14353
(cherry-picked from commit cff58884a99fd181f0febf999006b58bd1404ab2)

(cherry-picked from commit e91fb1418289d3b59c7de1791d4046c2078f3a6a)

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

cleanse: don't display cast/dispel commands if none are needed and print a
newline between each menu

(cherry-picked from commit 9b27af65a1ec97aec25272e963d07baa9aa3c760)

(cherry-picked from commit 1adf833c40d8c7282374d9cf9bb80164e0c3d766)

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

gaze: small grammar fix in gaze_show_spells_by_status
(cherry-picked from commit 4fde83105faf165b6224c463e4e40ca0e88c3ab6)

(cherry-picked from commit b6fadeb9ebb34225dcf811112a2b36ac5dc91ba3)

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

libmisc: fixed consolidate_params so it can take "-[eEn]" as values too;
before they were passed to echo and ignored, breaking dispel -e
and possibly alter

(cherry-picked from commit b551c92bc2349921e4e3b7888db4b61d744e1980)

(cherry-picked from commit 81704f73e23cdc6b943f1cc401f1d95d07d3775a)

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

gaze: don't falsely return 1 in gaze version
(cherry-picked from commit c817ee0d4e06bc406d6eb71319e54f931930af0e)

(cherry-picked from commit 3c174d5e3241d4aa05aff06657277a9bd94868c5)

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

url, compile_config: better conditional sourcing #14304
(cherry-picked from commit 2d169b9f825ba722ee4b594cc7052e7c43e599bd)

(cherry-picked from commit a33a6a946f2acd26616e67626d1c2046cc6488b0)

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

better unpack_hash error message
one for the grimoire team :)

(cherry-picked from commit 7001dc69adf12537976632c446eb7bce7133f884)

(cherry-picked from commit 04041d1f188c3d8e89c749a8149c9d6e1952c295)

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

*: comment fixes for bashdoc - modified patch from Arvid Norlander
merged most of
(cherry-picked from commit 06b0376f193662002b0c2b18b237df55398fb957)

(cherry-picked from commit f875b3d10d15bfdfbac980cd4679c706ec06bbb6)

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

1.13.8-rc6

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

gaze: import and export need root privileges #13789
(cherry-picked from commit 71fb59842deb16cc42285860c27483c013bbeda9)

(cherry-picked from commit 6eb6c0e8fdfb91980e54dc52ccedfea23c729642)

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

gaze from didn't check its parameters, causing bug #14219
(cherry-picked from commit baa454b0500ec8af760ed6e2307c08ff0e12d787)

(cherry-picked from commit 77a29dcfabeec12a5c46935503c9537190b5ff06)

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

gaze: gaze size could bark on files with glob paterns in their name #14183
(cherry-picked from commit 5e8d97ba1b5c7154e8b4606a735a44a854c8cc4a)

(cherry-picked from commit 436a76da52c5d126fc397f828e20651c82570ba9)

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

libcodex: bail out of codex_check_cache if the grimoire dir is not
listable (executable) #13508

(cherry-picked from commit 0e2fc4bdc5f7bad681bc0c9ddf31e59754ba6fe3)

(cherry-picked from commit 897b4e0716e993c56d4fd326bdc29044ab733c2e)

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

1.13.8-rc5

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

scribe: output errors to stderr #13738 , fixed punctuation
(cherry-picked from commit 73bed26b3a15b1c575e0363fc08ee351173ec85b)

(cherry-picked from commit 78df69e944527b6e92a62480f6796e611f19c67e)

(cherry-picked from commit d2cc7c63789a7b915c0275642565c977d89a8d3f)

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

libmisc: added error_message, a message() that also outputs to stderr
(cherry-picked from commit 5a78bf41b279d97d83240837cee808a817d6291a)

(cherry-picked from commit 58117f53366efd0886a76ae894db669394f3de9e)

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

* url_http: pass along all the arguments in url_https_verify
* dl_wget: pass hints to dl_wget_set_options and use them
* url_http, dl_wget: support the no-check-certificate source hint
#14106

(cherry-picked from commit 3f46ec43345c225113b764a16292faa68539f22f)

(cherry-picked from commit ec346b8d0568dfcf956f18cbd33facba0d0b4a7d)

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

liburl: pass along all the arguments in url_verify
(cherry-picked from commit 5ab8b9839327e2f844dc23e8c39de6d5e40ea8e7)

(cherry-picked from commit 29fe822d51055776b44430493a211b41026d4531)

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

dl_wget, url_http: removed EOL whitespace

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

liburl: fixed typo in a comment

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

local/README: fixed typo
(cherry-picked from commit e770fc607bbce8e6622acfa7d5778141a6604e78)

(cherry-picked from commit 2c1fd8883c02fdc28cef91ef1cb80ca51d3ce3c2)

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

1.13.8-rc4

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

cast: fixed typo in pre-review-queue message #14228
(cherry picked from commit 63b6a86963eb4c3c59a4806094a7b2d02b0a8b31)

(cherry-picked from commit fcb6497e6c1726c725f2a3dcbdf3d9062576d698)

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

use the -p option to mkdir in real_mk_source_dir #14193

(cherry-picked from commit f89a5b3cb996a2d632a8ad77640c63ba820db424)

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

1.13.8-rc3

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

fixed bug #13466 - dispel_self was dispelling the triggerer

(cherry-picked from commit f2db774b41c636122249e2962b36f8ce9560f7d4)

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

1.13.8-rc2

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

libsorcery: fixed CXXFLAGS setting in optimise() to not also include the
other CFLAGS_* variables #13965

(cherry-picked from commit d1e885742af698f68f8c281ab7bcbbcfd11b2512)

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

fixed "gaze from" matching state files #13941 and made it avoid passing
too many arguments to grep
(cherry picked from commit 7f6ee88f4196cfacd0d35a27afe681d5d98ff33a)

(cherry-picked from commit 8541362965c261e8f928cda2e4dd223b989db56f)

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

made the cleanse md5sum check handle (too) many logs, patch from Arwed
von Merkatz #13903

(cherry-picked from commit 84e63403550a777a97ac5b62164a7c6d29b090b7)

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

libressurect: show unified diffs in real_handle_changed_config #13830
(cherry picked from commit c6c717d7df365dbc0e2e5b147df216b15a6d4691)

(cherry-picked from commit 15da4ffe7d6b081cc43a8b259cb65ab2a5c9fe4f)

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

libmisc: fix set_architecture not resetting the text color #13842

(cherry-picked from commit fbd22e021bd36c17d4add48fc8e65feefae38691)

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

fix url_ftp_verify target matching #13787
(cherry picked from commit abd2d45c5df4a074c17cd8a525ae42c3363f8dbc)

(cherry-picked from commit 36a18ed9e9ce6b2def31bb203c3418e0769178ef)

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

fixed scribe add rm -rfing if the passed (bad) argument is a dir #13742
(cherry picked from commit f3cb2400df25d407d102d452957565a8d8fa60f7)

(cherry-picked from commit a5bc8cbde3b8b7c069c1977c54d995c635848c3c)

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

scribe: fixed bad messages when adding a grimoire #13743
(cherry picked from commit f2e33c9d5a19d5056f70d1ca2e2e74159adbb262)

(cherry-picked from commit 56e72e1eb63059857eb70bfb448e2ba0dffa0b0b)

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

liburl, scribe: don't ignore url_get_prefix exit status #13729
(cherry picked from commit 5727165c0b6d6ed9f587c2ed174a6d22560bbfd9)

(cherry-picked from commit bb1b0c251efdf0d1a4895a45fe825a24b84e618c)

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

libsummon, scribe: added the missing prefixes to the guess lists #13732

(cherry-picked from commit 6b6ed1b961d5aaffe9187e686bc497f2d8c761e3)

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

cleanse: fix md5sum check locale issue, patch from Thomas Orgis #13713

(cherry-picked from commit 514270ab8f2c413a56dc32963adf165359e13b2f)

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

gaze applied patch from bug 13711 thanks to Jaka Kranjc
plus 3ff76662d7238252ba5192cac24f9b9f3f206c59

(cherry-picked from commit cf77432716e686492082af6a64052937cb100727)

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

added default for PER_CPAN_URL #13673

(cherry-picked from commit a7f65f59bfd410e9c6607631065b3384ba6ecc9f)

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

gaze: fixed bad temporary dir usage #13588
(cherry picked from commit a8ce539dfdd39919e81b298a37b735948d802a3d)

Conflicts:

ChangeLog
usr/sbin/gaze

(cherry-picked from commit 733d5e3ccd12daa3889cec8dff5b297cadc422a4)

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

fixed gaze newer breaking on bad input #10149

(cherry-picked from commit ce92a32ced2d1a4c48f4e5bd92690cabe0cf53b4)

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

fix bug 11708

(cherry-picked from commit c8a5eebc5cd4e955354088d671d9647746f7961c)

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

1.13.8-rc1

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

config: fixed bad SCREEN variable due to a missing $

(cherry-picked from commit 072b82020352bbede0aa36966fbc328e9e4a010d)

diff --git a/ChangeLog b/ChangeLog
index f637ae6..9ad088a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,74 @@
+2008-03-24 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * 1.13.8 Release
+
+2008-03-24 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * cast.8, cast: -B is recursive, so mention it #14371
+
+2008-03-15 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * gaze, gaze.1: added note about gaze depends working only on enabled
deps
+
+2008-03-15 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * cleanse: added "--tablet coalesce" to the help
+
+2008-03-07 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * scribbler: fixed message when scribbling from a missing grimoire
#14353
+
+2008-03-03 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ don't display cast/dispel commands if none are needed and print a
+ newline between each menu
+
+2008-02-29 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libmisc: fixed consolidate_params so it can take "-[eEn]" as values
too;
+ before they were passed to echo and ignored, breaking dispel -e
+ * gaze: small grammar fix in gaze_show_spells_by_status
+
+2008-02-19 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * gaze: don't falsely return 1 in gaze version
+
+2008-02-11 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * url, compile_config: better conditional sourcing #14304
+
+2008-02-06 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libunpack: improved the error message in unpack_hash with info
which hash
+ is which
+
+2008-02-04 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * *: comment fixes for bashdoc - modified patch from Arvid Norlander
+
+2008-02-02 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * gaze: import and export need root privileges #13789
+
+2008-02-01 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libcodex: bail out of codex_check_cache if the grimoire dir is not
+ listable (executable) #13508
+ * gaze: gaze size could bark on files with glob paterns in their name
#14183
+ gaze from didn't check its parameters, causing bug #14219
+
+2008-01-31 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libmisc: added error_message, a message() that also outputs to
stderr
+ * scribe: output errors to stderr #13738 , fixed punctuation
+
+2008-01-30 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * url_http: pass along all the arguments in url_https_verify
+ * dl_wget: pass hints to dl_wget_set_options and use them
+ * url_http, dl_wget: support the no-check-certificate source hint
#14106
+
+2008-01-30 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * liburl: pass along all the arguments in url_verify
+
+2008-01-29 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * local/README: fixed typo
+
+2008-01-24 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * cast: fixed typo in pre-review-queue message #14228
+
+2008-01-23 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libtrigger: fixed bug #13466 - dispel_self was dispelling the
triggerer
+ * libgrimoire: use the -p option to mkdir in real_mk_source_dir #14193
+
+2008-01-18 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * config: fixed bad SCREEN variable due to a missing $
+
2008-01-11 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* 1.13.7 Release

@@ -20,16 +91,45 @@
* libdepends: fixed some more quoting regressions since stable. Should
eliminate some bad provider query defaults

+2007-08-28 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * libsorcery: fixed CXXFLAGS setting in optimise() to not also
include the
+ other CFLAGS_* variables #13965
+
+2007-08-12 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * gaze: fixed bad temporary dir usage #13588
+ fixed "gaze from" matching state files #13941 and made it avoid
passing
+ too many arguments to grep
+ * libsummon, scribe: added the missing prefixes to the guess lists
#13732
+ * liburl, scribe: don't ignore url_get_prefix exit status #13729
+ * scribe: fixed bad messages when adding a grimoire #13743
+ fixed scribe add rm -rfing if the passed (bad) argument is a dir
#13742
+
2007-08-11 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* libcodex: moved the load_libcompat call before the sourcing of
DETAILS in
codex_set_current_spell. This way fallbacks can be used there as
well,
which will among other things help a bit with #13883
* libdepends: fixed a regression in private_add_depends;
probably fixes #13735
+ * gaze: fixed gaze newer breaking on bad input #10149
+ also made it handle (too) many logs, patch from Arwed von Merkatz
#13903
+ * cleanse: fix md5sum check locale issue, patch from Thomas Orgis
#13713
+ * libmisc: fix set_architecture not resetting the text color #13842
+ * libressurect: show unified diffs in real_handle_changed_config
#13830
+
+2007-08-10 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
+ * etc/sorcery/url: added default value for PERL_CPAN_URL #13673

2007-08-09 Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
* url_handlers/url_http: fix url_ftp_verify to not pass a deprecated
wget
option. Now it works again. #13001
+ Also made it stricter when checking for target exsistance #13787
+
+2007-04-18 David Kowis <dkowis AT shlrm.org>
+ * gaze: Bug 13711, support force_depends in gaze dependencies.
+ Patch from Jaka Kranjc
+
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * cabal: apply patch from Dave Josephsen, bug 11708

2006-08-18 Andrew Stitt <astitt AT sourcemage.org>
* libstate, libapi: add is_depends_enabled, bug 12949
diff --git a/etc/sorcery/compile_config b/etc/sorcery/compile_config
index d9b5785..5e1fcc5 100644
--- a/etc/sorcery/compile_config
+++ b/etc/sorcery/compile_config
@@ -7,5 +7,6 @@
MAKE_NJOBS=${MAKE_NJOBS:-1}
RUN_COMPILER_DIR=/var/lib/sorcery/build

-[ -x $LOCAL_COMPILE_CONFIG ] &&
+if [[ -e $LOCAL_COMPILE_CONFIG ]]; then
. $LOCAL_COMPILE_CONFIG
+fi
diff --git a/etc/sorcery/config b/etc/sorcery/config
index 0c3ab33..29835d8 100755
--- a/etc/sorcery/config
+++ b/etc/sorcery/config
@@ -145,7 +145,7 @@ GRIMOIRE_MANIFEST_ALGORITHM=sha1
# it is here merely to ensure it is always defined.
TMP_DIR=${TMP_DIR:-/tmp}

- SCREEN={SCREEN:-off}
+ SCREEN=${SCREEN:-off}

TRACKED="/bin /boot /etc /lib /sbin /usr /var"
DOCS="README* FAQ* CHAN* doc* DOC* conf SETUP LICENSE
COPYING NEWS"
diff --git a/etc/sorcery/local/README b/etc/sorcery/local/README
index b5e659d..ecb66dd 100755
--- a/etc/sorcery/local/README
+++ b/etc/sorcery/local/README
@@ -4,6 +4,6 @@ configuration files.
"/etc/sorcery/local/config" contains the variables that
you wish to override in /etc/sorcery/config.

-Addtionally, "/etc/sorcery/local" stores your config for
+Additionally, "/etc/sorcery/local" stores your config for
Linus Torvalds' Linux Kernel and XFree86.

diff --git a/etc/sorcery/url b/etc/sorcery/url
index 65e6948..1121fb7 100755
--- a/etc/sorcery/url
+++ b/etc/sorcery/url
@@ -1,4 +1,4 @@
- GNU_URL=ftp://ftp.gnu.org/pub/gnu
+ 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
@@ -7,6 +7,7 @@
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
#
# Set FURLNUM to nr. of fallback urls.
#
@@ -33,7 +34,7 @@ FALLBACK_URL_MIRROR[3]=http://shlrm.org/sourcemage
# reverse the comments below to use rsync by default
CODEX_URL=${CODEX_URL:=$CODEX_TARBALL_URL}
#CODEX_URL=${CODEX_URL:=$CODEX_RSYNC_URL}
-

-
-test -e $LOCAL_URL_CONFIG && . $LOCAL_URL_CONFIG
+if [[ -e $LOCAL_URL_CONFIG ]]; then
+ . $LOCAL_URL_CONFIG
+fi
diff --git a/etc/sorcery/version b/etc/sorcery/version
index b0f139e..237a256 100644
--- a/etc/sorcery/version
+++ b/etc/sorcery/version
@@ -1 +1 @@
-1.13.7
+1.13.8
diff --git a/usr/sbin/cabal b/usr/sbin/cabal
index 02d15de..9718b8f 100755
--- a/usr/sbin/cabal
+++ b/usr/sbin/cabal
@@ -17,21 +17,21 @@ function read_cabal_names() {

mkdir -p $CABAL_DIRECTORY

- [ -f $CABAL_NAMES ] || return
+ [ -f $CABAL_NAMES ] || return
+

- eval `awk '{ print "CABAL[" NR-1 "]=\"" $0 "\""; }' "$CABAL_NAMES"`
+ eval `awk '{ print "CABALS[" NR-1 "]=\"" $0 "\""; }' "$CABAL_NAMES"`

}

#--------------------
## Overwrite the cabal name file with new member names
-## @Note The loop can probably be done more intelegently, so a MAX_CABALS is
not necessary.
## @Globals CABAL_NAMES MAX_CABALS
#--------------------
function write_cabal_names() {

rm -f $CABAL_NAMES
- for (( COUNT=0; COUNT != MAX_CABALS; COUNT++ )); do
+ for (( COUNT=0; COUNT != ${#CABALS[@]}; COUNT++ )); do
echo "${CABALS[$COUNT]}" >> $CABAL_NAMES
done

@@ -45,9 +45,11 @@ function write_cabal_names() {
#---------------------
function print_cabal_names() {

- for (( COUNT = 0; COUNT != MAX_CABALS; COUNT++ )); do
- echo "${CABALS[$COUNT]}"
- done
+eval ${DIALOG} '--textbox ${CABAL_NAMES} 0 0'
+
+#for (( COUNT = 0; COUNT != MAX_CABALS; COUNT++ )); do
+# echo "${CABALS[$COUNT]}"
+#done

}

@@ -257,7 +259,7 @@ function cabal_name_menu() {
do

case $COMMAND in
- S) print_cabal_names | $PAGER ;;
+ S) print_cabal_names ;;
E) name_cabals ;;
esac

@@ -379,16 +381,16 @@ function cabal_admin_menu() {

function cabal_copy() {

- SOURCE_MESSAGE="Please enter source files and directories."
- DEST_MESSAGE="Please enter destination directory."
+ SOURCE_MESSAGE='"Please enter source files and directories."'
+ DEST_MESSAGE='"Please enter destination directory."'

mkdir -p $CABAL_OUTPUT || {
messasge "Failed to make CABAL_OUTPUT directory $CABAL_OUTPUT"
exit 1
}

- SOURCE=`eval $DIALOG --inputbox "$SOURCE_MESSAGE" 0 0` &&
- DESTINATION=`eval $DIALOG --inputbox "$DEST_MESSAGE" 0 0` &&
+ SOURCE=`eval $DIALOG --inputbox $SOURCE_MESSAGE 0 0` &&
+ DESTINATION=`eval $DIALOG --inputbox $DEST_MESSAGE 0 0` &&
CABAL=`select_cabal` &&
ORDER=`select_order` &&

@@ -430,16 +432,16 @@ function cabal_execute() {
case $ORDER in
C) cat $CABAL_DIRECTORY/$CABAL |
while read BOX; do
- ssh -i $CABAL_KEYS/$CABAL \
+ echo "execing box $BOX" && ssh -n -i $CABAL_KEYS/$CABAL \
root@${BOX} \
"$COMMAND" \
> $CABAL_OUTPUT/$BOX &
done
;;

- S) cat $CABAL_DIRECTORY/$CABAL |
+ S) cat $CABAL_DIRECTORY/$CABAL |
while read BOX; do
- ssh -i $CABAL_KEYS/$CABAL \
+ echo "execing box $BOX" && ssh -n -i $CABAL_KEYS/$CABAL \
root@${BOX} \
"$COMMAND"
done
@@ -447,7 +449,7 @@ function cabal_execute() {
;;
esac

- sleep 10
+ #sleep 10 <--not sure why that's there.. --dave

}

@@ -456,9 +458,10 @@ function cabal_output() {

if [ -d $CABAL_OUTPUT ]; then
for FILE in `ls $CABAL_OUTPUT`; do
- echo "$FILE Beginning Output"
+ echo "*------- $FILE Beginning Output -------*"
cat $CABAL_OUTPUT/$FILE
- echo "$FILE Ending Output"
+ echo "*------- $FILE Ending Output -------*"
+ echo
done
fi
}
@@ -491,7 +494,7 @@ copies"
case $COMMAND in
C) cabal_copy ;;
E) cabal_execute ;;
- S) cabal_output | $PAGER ;;
+ S) cabal_output | ${PAGER} ;;
esac

done
@@ -531,11 +534,37 @@ function cabal_menu() {

}

+function show_file() {
+
+ if [ -f $1 ]; then
+
+ if [ "`file -b $1 | cut -d ' ' -f1`" == "bzip2" ]; then
+ bzcat $1 | $PAGER
+ elif [ "`file -b $1 | cut -d ' ' -f1`" == "gzip" ]; then
+ gzip -cd $1 | $PAGER
+ else
+ eval $DIALOG '--textbox $1 0 0'
+ fi
+
+ else
+ eval $DIALOG '--msgbox "File not found." 0 0'
+ return 1
+ fi
+
+}
+
. /etc/sorcery/config
-DIALOG='$DIALOGPROG --backtitle "Sorcery Spell Management Utility" --stdout'
+
+if [ -n "${PAGER}" ]
+then
+ PAGER=`which less`
+fi
+
+DIALOG="${DIALOGPROG} --stdout"
+
cabal_menu

-#---------------------------------------------------------------------
+##---------------------------------------------------------------------
##=back
##
##=head1 LICENSE
@@ -554,4 +583,4 @@ cabal_menu
## 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/cast b/usr/sbin/cast
index a45ec57..2cb3e99 100755
--- a/usr/sbin/cast
+++ b/usr/sbin/cast
@@ -44,10 +44,10 @@ Optional Parameters:
-c | --compile Recompile the spells (dont install from
cache).
-r | --reconfigure Select new dependencies for spells (implies
-c)

--R | --recast-down Recast depended-upon spells, even if they are
- already installed...
--B | --recast-up Recast dependent spells, even if they are
- already installed...
+-R | --recast-down Recursively recast depended-upon spells, even
+ if they are already installed...
+-B | --recast-up Recursively recast dependent spells, even
+ if they are already installed...

-b | --force-base-dep Force all spells to depend on basesystem

@@ -428,7 +428,6 @@ function pass_two() {
}

#---------------------------------------------------------------------
-
## @param spellname
## @Globals SPELL
## Sets SPELL to the spellname and calls summon_spell with spellname
@@ -736,7 +735,7 @@ function main() {
message "${DEFAULT_COLOR}"

# remove possible empty lines from queue.
- if query "Would you like review the queue history for each spell?" n ;
then
+ if query "Would you like to review the queue history for each spell?"
n ; then
sorcery review-queue
fi

@@ -908,4 +907,3 @@ debug "cast" "exiting..."
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/usr/sbin/cleanse b/usr/sbin/cleanse
index 59854e5..af1e584 100755
--- a/usr/sbin/cleanse
+++ b/usr/sbin/cleanse
@@ -51,6 +51,7 @@ Command Description
--nofix_quick like --nofix, but does not check dependent spells.

--tablet clean up the tablet
+--tablet coalesce clean up the tablet and hardlink duplicate files
--tablet_spell clean up the tablet for one spell
--logs cleans old logs in the same way a system-update does

@@ -79,19 +80,15 @@ EOF
#---------------------
## Interpret the arguments to this script
## @Args --help Display help
-## @Args --delint [full] Find stale dependency entries, with full it'll
-## look at off entries too
-## @Args --prune [doit] Find missing spells, do the actions of "doit" is
-## specified
-## @Args --packages Find packages entries that are corrupted, or
-## non-existant
+## @Args --delint [full] Find stale dependency entries, with full it'll
look at off entries too
+## @Args --prune [doit] Find missing spells, do the actions of "doit" is
specified
+## @Args --packages Find packages entries that are corrupted, or
non-existant
## @Args --tablet Clean up the tablet
## @args --tablet_spell Clean up the tablet for one spell
## @Args --logs Remove stale logs
## @Args --sweep Remove uneeded spool and cache files
## @Args --sweep_all Remove uneeded spool and cache files
-## @Args --fix Find binaries that are missing libs and files,
-## and recast broken spells
+## @Args --fix Find binaries that are missing libs and files,
and recast broken spells
## @Args --nofix Same as --fix, but won't recast.
## @Args --nofix_quick Same as --nofix, but doesn't check dependent
spells
#---------------------
@@ -378,6 +375,7 @@ function prune_depends()
exit 1
;;
esac
+ echo
shift 4
done

@@ -390,9 +388,16 @@ function prune_depends()
[ -s $TMP_DIR/prune.cast ] &&
cast -c $( sort $TMP_DIR/prune.cast | uniq )
else
+ local prune_dispel prune_cast t
+ prune_dispel=$(sort -u $TMP_DIR/prune.dispel 2>/dev/null)
+ prune_cast=$(sort -u $TMP_DIR/prune.cast 2>/dev/null)
+ if [[ -z $prune_dispel$prune_cast ]]; then
+ message "Pruning done."
+ return 0
+ fi
t=$(date +%Y%m%d%s)
- echo dispel $( sort $TMP_DIR/prune.dispel 2>/dev/null | uniq ) >
$BACKUPDIR/prune.$t
- echo cast -c $( sort $TMP_DIR/prune.cast 2>/dev/null | uniq ) >>
$BACKUPDIR/prune.$t
+ echo dispel $prune_dispel > $BACKUPDIR/prune.$t
+ echo cast -c $prune_cast >> $BACKUPDIR/prune.$t
cat $BACKUPDIR/prune.$t
message "For future reference, lines are stored in $BACKUPDIR/prune.$t"
fi
@@ -911,7 +916,7 @@ function cleanse_fix_md5sum_check() {

# for some reason stuffing the output of this in a variable loses the
# newlines and thus files with spaces in them get lost
- md5sum --check $TMP_MD5_LOG 2>/dev/null | grep ': FAILED$' |
+ LANG=C md5sum --check $TMP_MD5_LOG 2>/dev/null | grep ': FAILED$' |
sed "s${A}: FAILED\$${A}${A}" > $BROKEN1
# cant use awk above with : as a seperator due to files with :'s in their
name

@@ -937,7 +942,7 @@ function cleanse_fix_md5sum_check() {
test -h $LINE && continue
REAL_MD5=$(md5sum $LINE)
# find the file in some log somewhere...
- FOUND_IN=$(grep -l "^$REAL_MD5\$" $MD5SUM_LOGS/*)
+ FOUND_IN=$(echo $MD5SUM_LOGS/* | xargs grep -l "^$REAL_MD5\$")

# remove anything from a non-current version of the spell
# this is ugly but the only reasonable way I know of to do this...
diff --git a/usr/sbin/delve b/usr/sbin/delve
index 30d0496..fb63e04 100755
--- a/usr/sbin/delve
+++ b/usr/sbin/delve
@@ -1,9 +1,9 @@
#!/bin/bash
#---------------------------------------------------------------------
## @Synopsis Delve is a tool for running individual spell files during the
-## build and install phase. This can be used as a debugging tool or to
-## "force" a spell to be installed. Use with caution and keep your hands
-## off if you dont know what you are doing.
+## @Synopsis build and install phase. This can be used as a debugging tool
or to
+## @Synopsis "force" a spell to be installed. Use with caution and keep your
hands
+## @Synopsis off if you dont know what you are doing.
##
## @Copyright 2004 the Source Mage Team
## @Author Andrew Stitt
diff --git a/usr/sbin/gaze b/usr/sbin/gaze
index 57acb21..9914d9f 100755
--- a/usr/sbin/gaze
+++ b/usr/sbin/gaze
@@ -90,6 +90,8 @@ depends [--fast] spell [level]
recursively depend on this spell,
up to $level levels (infinity if omitted)
--fast omits some information but runs
faster
+ NOTE: the target spell must be installed and
+ only enabled dependencies are shown

dependencies [-c ] [--no-optionals ] spell [level]
Displays the spells this spell explicitly
@@ -135,6 +137,11 @@ function maybe_column() {
#-----
function export_snapshot() {

+ if [[ $UID != 0 ]]; then
+ error_message "${PROBLEM_COLOR}gaze export needs to be run as root,
aborting...$DEFAULT_COLOR"
+ exit 1
+ fi
+
SOURCE_DIRECTORY=$BUILD_DIRECTORY/snapshot
mk_source_dir $SOURCE_DIRECTORY
cp -a /etc $SOURCE_DIRECTORY
@@ -170,6 +177,11 @@ function export_snapshot() {
#-----
function import_snapshot() {

+ if [[ $UID != 0 ]]; then
+ error_message "${PROBLEM_COLOR}gaze import needs to be run as root,
aborting...$DEFAULT_COLOR"
+ exit 1
+ fi
+
SNAPSHOT=$1
SOURCE_DIRECTORY=$BUILD_DIRECTORY/snapshot

@@ -211,14 +223,22 @@ function import_snapshot() {
## Is this used anywhere?
## @param File with list of files the sum
#-----
-function checksum() { for FILE in `cat $1 | files`; do sum -s $FILE;
done; }
+function checksum() {
+ for FILE in `cat $1 | files`; do
+ sum -s $FILE
+ done
+}

#-----
## Run an md5sum of a list of files in a file
## Is this used anywhere?
## @param File with list of files the sum
#-----
-function md5sum_files() { for FILE in `cat $1 | files`; do md5sum "$FILE";
done; }
+function md5sum_files() {
+ for FILE in `cat $1 | files`; do
+ md5sum "$FILE"
+ done
+}

#-----
## Find all files on the system not installed by a spell
@@ -519,6 +539,9 @@ function newer() {
COMPUTE='($3=="update") { a=a+1; if (a>1) { print $1 ; exit } }'
elif [ x"$DATE" == x"last_cast" ]; then
COMPUTE='($3 == "cast" && $6 == "success") { print $1 ; exit }'
+ elif ! date -d "$DATE" +%Y%m%d > /dev/null; then
+ help | $PAGER
+ exit 1
fi

if [ -n "$COMPUTE" ]; then
@@ -575,14 +598,21 @@ function older() {
}

#-----
-## Find all install logs that mention the given string
+## Find all install logs that mention the given string,
+## discarding hits that match state files
## @param Search string
## @Stdout grep results
#-----
function show_from() {

- cd $INSTALL_LOGS
- grep "`esc_str $1`$" *
+ if [[ -z $1 ]]; then
+ error_message "${PROBLEM_COLOR}Missing search string
parameter!$DEFAULT_COLOR"
+ exit 1
+ fi
+
+ cd $INSTALL_LOGS
+ find . -printf "%f\n" | xargs grep "`esc_str $1`$" |
+ seperate_state_files /dev/stdin /dev/stdout /dev/null | sort

}

@@ -805,8 +835,8 @@ function specific_voyeur()
then
return 1
fi
- nice -n +20 \
- tail /tmp/$1.compile.log \
+ nice -n +20 \
+ tail $(find /tmp/sorcery/cast/ -name $1.compile.log ) \
--follow=name --pid=$(ls "/tmp/liblock-0/cast.$1") 2>/dev/null
}

@@ -1064,10 +1094,14 @@ function gaze_show_version() {
echo " "


- [ -n "$UNKNOWN" ] &&
- message "Unknown Spells or Sections" &&
- message "--------------------------" &&
- message "$UNKNOWN"
+ if [[ -n $UNKNOWN ]]; then
+ message "Unknown Spells or Sections"
+ message "--------------------------"
+ message "$UNKNOWN"
+ return 1
+ else
+ return 0
+ fi

}

@@ -1450,9 +1484,9 @@ function gaze_show_dependencies() {
while true; do
# Check for the compact mode flag
if [[ $1 == -c ]] ; then
- FOUND="/tmp/gaze.seen.$$"
- echo -n > $FOUND
- shift
+ FOUND="$TMP_DIR/gaze.seen.$$"
+ echo -n > $FOUND
+ shift
continue
fi
# Check for the no optionals flag
@@ -1486,6 +1520,9 @@ function gaze_show_dependencies() {
recurse "$1" $DEPTH "requires"
return 0
}
+ force_depends() {
+ return 0
+ }
repeat () {
local CHAR="$1" COUNT="$2"

@@ -1563,9 +1600,9 @@ function gaze_show_size () {
message "No install log for $spell ($file)"
continue
fi
- for each in $(<$file); do
- test -f $each && echo $each
- done | xargs du -b |
+ while read each; do
+ test -f "$each" && echo $each
+ done < $file | xargs du -b |
awk '{ x += $1 }
END { print "'$spell' -> " x " bytes ("int(x/1024+0.5)" K,
"int(x/1024/1024+0.5)" M) in " NR " files." }'
done
@@ -1614,7 +1651,7 @@ function gaze_install() {
#---------------------------------------------------------------------
function gaze_show_spells_by_status () {
message -n "${MESSAGE_COLOR}The following spells are set to"
- message -n "${DEFAULT_COLOR} $2"
+ message -n "${DEFAULT_COLOR} $2:"
message "${SPELL_COLOR}"
get_all_spells_with_status $1 | sort | maybe_column
message -n "${DEFAULT_COLOR}"
diff --git a/usr/sbin/scribbler b/usr/sbin/scribbler
index 05d55f1..d103c8c 100755
--- a/usr/sbin/scribbler
+++ b/usr/sbin/scribbler
@@ -2,7 +2,7 @@
#---------------------------------------------------------------------
##
## @Synopsis This utility lets you manage moving spells to your private
-## grimoire so you can mix-and-match versions from various other grimoires.
+## @Synopsis grimoire so you can mix-and-match versions from various other
grimoires.
##
## @Copyright
##
@@ -135,7 +135,7 @@ function validate_and_parse_args() {
## Set and validate the from-grimoire name
if ! FROM_GRIMOIRE_DIRECTORY=$(codex_find_grimoire $3) ; then
message "${PROBLEM_COLOR}The grimoire you specified" \
- "(${SPELL_COLOR}${2}${PROBLEM_COLOR}) can not be" \
+ "(${SPELL_COLOR}${3}${PROBLEM_COLOR}) can not be" \
"found.${DEFAULT_COLOR}"
exit 1
fi
@@ -193,4 +193,3 @@ main "$@"
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/usr/sbin/scribe b/usr/sbin/scribe
index e22ed82..e163a22 100755
--- a/usr/sbin/scribe
+++ b/usr/sbin/scribe
@@ -5,10 +5,9 @@
##
## @Synopsis scribe handles adding/updating/reindexing/etc. of grimoires
##
-## @Copyright
-## Original version Copywright 2002 by Ryan Abrams
-## Additions/Corrections Copyright 2002-2004 by the Source Mage Team
-## Released under the GPL
+## @Copyright Original version Copywright 2002 by Ryan Abrams
+## @Copyright Additions/Corrections Copyright 2002-2004 by the Source Mage
Team
+## @Copyright Released under the GPL
#---------------------------------------------------------------------


@@ -58,9 +57,9 @@ EOF
## Common error messag when downloading a grimoire fails.
#---------------------------------------------------------------------
function scribe_download_fail_error_msg() {
- message "Error downloading grimoire..."
- message "Grimoire tarballs are located at $CODEX_TARBALL_URL"
- message "Grimoire rsync modules are located at $CODEX_RSYNC_URL"
+ error_message "Error downloading grimoire..."
+ error_message "Grimoire tarballs are located at $CODEX_TARBALL_URL"
+ error_message "Grimoire rsync modules are located at $CODEX_RSYNC_URL"
}

#---------------------------------------------------------------------
@@ -75,7 +74,7 @@ function unpackage_grimoire_tarball() {
#check for a successful unzip
if ! [ -d $grimoire ]; then
#uh oh! bad unzip.
- message "ERROR: Grimoire tarball for $grim_name not" \
+ error_message "ERROR: Grimoire tarball for $grim_name not" \
"formated correctly!."
return 1
fi
@@ -105,7 +104,7 @@ function scribe_validate_tree_common() {
local grim_name=$2
local grimoire=$3
if ! test -d "$scribe_target"; then
- message "Downloaded a tree but directory doesn't exist! file a bug if
you see this"
+ error_message "Downloaded a tree but directory doesn't exist! file a
bug if you see this."
return 1
fi
if [[ "$scribe_target" != "$grim_name" ]] ; then
@@ -150,14 +149,29 @@ function scribe_add() {
fi

if codex_find_grimoire $grimoire >/dev/null; then
- message "${PROBLEM_COLOR}There already exists a grimoire with" \
+ error_message "${PROBLEM_COLOR}There already exists a grimoire with" \
"the name $grimoire! Refusing to add.${DEFAULT_COLOR}"
continue
fi

+ # avoid deleting $grimoire if it is a dir #13742
+ if [[ -d $grimoire ]]; then
+ error_message "${PROBLEM_COLOR}The grimoire $grimoire is an" \
+ "exsisting directory! Refusing to add!${DEFAULT_COLOR}"
+ continue
+ fi
+
+ local grim_name="$grimoire"
# derive a full grimoire name
grimoire=$(codex_canonicalize_grimoire_name $grimoire)
- message "Adding grimoire $grim_name to $grim_dir from $from"
+ local grim_dir
+ smgl_dirname "$grimoire" grim_dir
+
+ if [[ -z $from ]]; then
+ message "Adding grimoire $grim_name to $grim_dir"
+ else
+ message "Adding grimoire $grim_name to $grim_dir from $from"
+ fi
scribe_add_update_worker "$grimoire" "$from" add
done
}
@@ -179,14 +193,14 @@ function scribe_add_update_worker() {
local add_or_update=$3

if [ -z $grimoire ] ; then
- message "Empty grimoire name! Please contact the sorcery team if" \
- "you see this"
+ error_message "Empty grimoire name! Please contact the sorcery team if" \
+ "you see this."
return 1
fi

if [[ $add_or_update == update ]] ; then
if ! test -d $grimoire ; then
- message "$grimoire is not a directory! refusing to update"
+ error_message "$grimoire is not a directory! refusing to update!"
return 1
fi
fi
@@ -199,7 +213,7 @@ function scribe_add_update_worker() {
if [ -n "$from" ]; then
if ! url_is_valid "$from"; then
#if not valid, use default
- message "Error: $from is not a recognized url. Using default."
+ error_message "Error: $from is not a recognized url. Using the
default."
from=""
else
grim_target=$(basename $from)
@@ -210,7 +224,16 @@ function scribe_add_update_worker() {
if [ -z "$from" ]; then
#from is empty - use the default
prefix=$(url_get_prefix $CODEX_URL)
- if list_find "rsync svn cvs smgl_tla dir git" $prefix ; then
+ if [[ $? != 0 ]]; then
+ error_message "${PROBLEM_COLOR}Failed to get the \$CODEX_URL prefix!" \
+ "${DEFAULT_COLOR}"
+ popd &>/dev/null
+ return 1
+ fi
+
+ local tree_prefixes="rsync svn svn_http svn_https svn_ssh cvs smgl_tla"
+ tree_prefixes="$tree_prefixes dir git git_http"
+ if list_find "$tree_prefixes" "$prefix"; then
grim_target=$grim_name
else
grim_target="$grim_name.tar.bz2"
@@ -269,7 +292,7 @@ function scribe_add_update_worker() {
popd &>/dev/null; return 1
fi
else
- message "Unknown download type $scribe_type, file a bug if you see this"
+ error_message "Unknown download type $scribe_type, file a bug if you see
this."
return 1
fi
popd &>/dev/null
@@ -308,7 +331,7 @@ function scribe_fix() {
for grim in $grimoires; do

if ! grimoire=$(codex_find_grimoire $grim) ; then
- message "Grimoire $grim not found"
+ error_message "Grimoire $grim not found!"
return 1
fi

@@ -317,13 +340,13 @@ function scribe_fix() {
if scribe_fix_metadata $grimoire; then
message "$grimoire fixed."
else
- message "$grimoire not fixed"
+ error_message "$grimoire not fixed!"
fi
elif query "Metadata for $grimoire found. Fix anyway?" n; then
if scribe_fix_metadata $grimoire 1; then
message "$grimoire fixed."
else
- message "$grimoire not fixed"
+ error_message "$grimoire not fixed!"
fi
else
message "$grimoire ignored"
@@ -344,7 +367,7 @@ function scribe_fix_metadata() {
local URL grimoire_dir grimoire_name

if ! grimoire_dir=$(codex_find_grimoire $1) ; then
- message "Grimoire $1 not found, this may be a sorcery bug..."
+ error_message "Grimoire $1 not found, this may be a sorcery bug..."
return 1
fi
grimoire_name=$(basename $1)
@@ -413,7 +436,7 @@ function scribe_localize() {
function scribe_localize_sub() {
path=$(codex_find_grimoire $grimoire)
if [ -z "$path" ]; then
- message "No such grimoire: $grimoire"
+ error_message "No such grimoire: $grimoire"
continue
fi
touch "$path/GRIMOIRE" &&
@@ -439,7 +462,7 @@ function scribe_reindex() {

for grim in $grimoires; do
if ! grimoire=$(codex_find_grimoire $grim) ; then
- message "Grimoire $grim not found"
+ error_message "Grimoire $grim not found!"
return 1
fi
paths="$paths $grimoire"
@@ -466,7 +489,7 @@ function scribe_remove() {
# if the grimoire name starts with / they may have given a
# full path, the [[ ]] actually doesnt expand /* to $(ls /)
if ! grimoire=$(codex_find_grimoire $grim) ; then
- message "Grimoire $grim not found"
+ error_message "Grimoire $grim not found!"
return 1
fi

@@ -474,7 +497,7 @@ function scribe_remove() {
rm -rf $grimoire &&
message "Removing grimoire $grimoire from codex" &&
codex_remove_grimoire $grimoire ||
- { message "An error occured trying to remove $grimoire, I wonder why"
+ { error_message "An error occured trying to remove $grimoire, I wonder
why?"
return 1
}
done
@@ -496,19 +519,19 @@ function scribe_set(){
local grim2=$2 grimoire2
local idx1 idx2
if [ $grim1 == $grim2 ] ; then
- message "$grim1 IS $grim2, can't set a grimoire to itself"
+ error_message "$grim1 IS $grim2, can't set a grimoire to itself!"
return 1
fi
if ! codex_find_grimoire $grim1 grimoire1 idx1 ; then
- message "Grimoire $grim1 not found"
+ error_message "Grimoire $grim1 not found!"
return 1
fi
if ! codex_find_grimoire $grim2 grimoire2 idx2 ; then
- message "Grimoire $grim2 not found"
+ error_message "Grimoire $grim2 not found!"
return 1
fi
if [ $idx1 -eq $idx2 ] ; then
- message "This shouldn't happen, but if it does contact the sorcery team"
+ error_message "This shouldn't happen, but if it does contact the sorcery
team."
return 1
elif [ $idx1 -lt $idx2 ] ; then
let idx2-- # grim1 is before grim2, by removing grim1, the position
@@ -536,11 +559,11 @@ function scribe_swap() {
local grim2=$2 grimoire2
local idx1 idx2
if ! codex_find_grimoire $grim1 grimoire1 idx1 ; then
- message "Grimoire $grim1 not found"
+ error_message "Grimoire $grim1 not found!"
return 1
fi
if ! codex_find_grimoire $grim2 grimoire2 idx2 ; then
- message "Grimoire $grim2 not found"
+ error_message "Grimoire $grim2 not found!"
return 1
fi
message -n "swapping "
@@ -564,21 +587,21 @@ function scribe_update() {
while [ -n "$1" ] ; do
grim="$1"
if ! grimoire=$(codex_find_grimoire $grim) ; then
- message "Grimoire $grim not found"
+ error_message "Grimoire $grim not found"
if [[ "$2" == "from" ]] ; then shift 3 ; else shift 1 ; fi
let rc++
continue
fi

if ! [ -e $grimoire/GRIMOIRE ] && ! scribe_fix_metadata $grim; then
- message "$grim has invalid metadata. Not Updating"
+ error_message "$grim has invalid metadata. Not Updating"
if [[ "$2" == "from" ]] ; then shift 3 ; else shift 1 ; fi
let rc++
continue
fi

if codex_is_local $grimoire; then
- message "${SPELL_COLOR}$grim${MESSAGE_COLOR} is being marked" \
+ error_message "${SPELL_COLOR}$grim${MESSAGE_COLOR} is being marked" \
"as local. Won't update.${DEFAULT_COLOR}"
if [[ "$2" == "from" ]] ; then shift 3 ; else shift 1 ; fi
continue
@@ -604,12 +627,12 @@ function scribe_update() {
grim=$(basename $grimoire)
if ! [ -e $grimoire/GRIMOIRE ] && ! scribe_fix_metadata $grimoire; then
#no metadata found. dont auto-update
- message "$grim has invalid metadata. Not Updating"
+ error_message "$grim has invalid metadata. Not Updating"
continue
fi

if codex_is_local $grimoire; then
- message "${SPELL_COLOR}$grim${MESSAGE_COLOR} is being marked as
local. Won't update.${DEFAULT_COLOR}"
+ error_message "${SPELL_COLOR}$grim${MESSAGE_COLOR} is being marked
as local. Won't update.${DEFAULT_COLOR}"
continue
fi

@@ -694,7 +717,6 @@ function main() {
esac
}

-#---------------------------------------------------------------------
. /etc/sorcery/config

#check if root. If not, become root
diff --git a/usr/share/man/man1/gaze.1 b/usr/share/man/man1/gaze.1
index f34b876..5a33b83 100644
--- a/usr/share/man/man1/gaze.1
+++ b/usr/share/man/man1/gaze.1
@@ -237,8 +237,11 @@ computes the md5sum on spell sources based on passed
spell(s), section(s) or ent
.PP
.SS depends [--fast] <spell> [<level>]
.IP
-shows the spells that explicitly or recursively depend on this spell.
-Up to level $level if specified.
+shows the spells that explicitly or recursively depend on this
+.I installed
+spell.
+Up to level $level if specified. Only enabled dependencies are shown.
+
If --fast is specified more limited output is produced, but it runs much
faster.
.PP
.SS dependencies [-c ] [--no-optionals ] <spell> [<level>]
diff --git a/usr/share/man/man8/cast.8 b/usr/share/man/man8/cast.8
index d31f2e6..19842f2 100644
--- a/usr/share/man/man8/cast.8
+++ b/usr/share/man/man8/cast.8
@@ -67,7 +67,8 @@ recasts all the spells the given spell(s) depend on
(and the ones they depend on ...).
This might be quite a lot of spells.
.SS "-B, --recast-up"
-recasts all the spells that depend on the given spell(s).
+recasts all the spells that depend on the given spell(s)
+(and the ones they depend on ...).
.SS "-h, --help"
Display short help.
.SH "ENVIRONMENT"
diff --git a/var/lib/sorcery/modules/build_api/common
b/var/lib/sorcery/modules/build_api/common
index 3ffaa7e..60e7701 100755
--- a/var/lib/sorcery/modules/build_api/common
+++ b/var/lib/sorcery/modules/build_api/common
@@ -15,14 +15,14 @@
##=head1 FUNCTIONS
#---------------------------------------------------------------------

+# checks for a security file
+# returns 0 if spell should be cast, 1 otherwise
#---------------------------------------------------------------------
## Prompts the user about possible security problems with the current
## spell. Allows a safe way of failing a spell due to security problems.
## @return 0 if there are no security problem or the user acknowledges them.
## @return 1 if the user decides not to accept the security concerns
#---------------------------------------------------------------------
-# checks for a security file
-# returns 0 if spell should be cast, 1 otherwise
function run_security() {
debug "build_api/common" "Starting run_security() on $SPELL"
if [ -f $SCRIPT_DIRECTORY/SECURITY ]; then
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_cvs
b/var/lib/sorcery/modules/dl_handlers/dl_cvs
index 7f596d0..05fc068 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_cvs
+++ b/var/lib/sorcery/modules/dl_handlers/dl_cvs
@@ -106,4 +106,3 @@ function dl_cvs_get() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_dir
b/var/lib/sorcery/modules/dl_handlers/dl_dir
index 7a4bda9..9cc25e6 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_dir
+++ b/var/lib/sorcery/modules/dl_handlers/dl_dir
@@ -89,4 +89,3 @@ function url_dir_get() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_file
b/var/lib/sorcery/modules/dl_handlers/dl_file
index aa36001..5772c59 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_file
+++ b/var/lib/sorcery/modules/dl_handlers/dl_file
@@ -66,4 +66,3 @@ function dl_file_get() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_rsync
b/var/lib/sorcery/modules/dl_handlers/dl_rsync
index 3553121..7f78874 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_rsync
+++ b/var/lib/sorcery/modules/dl_handlers/dl_rsync
@@ -81,10 +81,10 @@ function dl_rsync_get() {
}

#---------------------------------------------------------------------
-#=item dl_rsync_run_rsync <url> <to>
-#
-# Private function. Calls rsync and beautifies output
-#
+##=item dl_rsync_run_rsync <url> <to>
+##
+## Private function. Calls rsync and beautifies output
+##
#---------------------------------------------------------------------
function dl_rsync_run_rsync() {
local target=$1
diff --git a/var/lib/sorcery/modules/dl_handlers/dl_wget
b/var/lib/sorcery/modules/dl_handlers/dl_wget
index b69ca19..216154a 100755
--- a/var/lib/sorcery/modules/dl_handlers/dl_wget
+++ b/var/lib/sorcery/modules/dl_handlers/dl_wget
@@ -2,14 +2,14 @@
#---------------------------------------------------------------------
##
##=head1 SYNOPSIS
-##
+##
## Url handler functions for downloading http, https, and ftp urls
##
##=head1 DESCRIPTION
##
-## This file contains functions for downloading and verifying
+## This file contains functions for downloading and verifying
## http, https, and ftp urls. This file uses the "wget" program.
-##
+##
##=head1 COPYRIGHT
##
## Copyright 2002 by the Source Mage Team
@@ -36,7 +36,7 @@ function dl_wget_get() {

for url in $url_list; do
local WGET_OPTIONS
- dl_wget_set_options $url
+ dl_wget_set_options $url $hints
dl_wget_call_wget $target $url
rc=$?
[[ $rc == 0 ]] && break
@@ -51,12 +51,12 @@ function dl_wget_get() {
}

#---------------------------------------------------------------------
-# dl_wget_call_wget <filename> <extension-less filename> <url>
-#
-# Private Function. Call wget to download the url.
-#
+## dl_wget_call_wget <filename> <extension-less filename> <url>
+##
+## Private Function. Call wgets to download the url.
+##
#---------------------------------------------------------------------
-function dl_wget_call_wget() {
+function dl_wget_call_wget() {
local FILE=$1
local URL=$2

@@ -73,13 +73,15 @@ function dl_wget_call_wget() {
}

#---------------------------------------------------------------------
-# dl_wget_set_wget_options
-#
-# Private Function. Sets wget options
-#
+## dl_wget_set_wget_options
+##
+## Private Function. Sets wget options
+##
#---------------------------------------------------------------------
function dl_wget_set_options() {
local URL=$1
+ local hints="$2"
+
if [ -n "$ACTIVE_FTP" ] ; then
unset PASSIVE
else
@@ -88,7 +90,7 @@ function dl_wget_set_options() {

# Check for ? in the url, this seems to indicate that there may be
# some cgi redirection involved which means continued downloading would
- # not work (bug 8993).
+ # not work (bug 8993).
# The sourceforge check pre-dates that but is lacking any documentation,
# I suspect it is a less general attempt to solve the same problem.
# (afk 2005-06-25)
@@ -113,13 +115,18 @@ function dl_wget_set_options() {
else
URL_HTTP_RETRIES="-t 3"
fi
-
+
+ local check_certificate
+ if list_find "$hints" no-check-certificate; then
+ check_certificate=--no-check-certificate
+ fi
+
ONLY_NEWER=""
DEREF_SYM="--retr-symlinks"

- WGET_OPTIONS="$URL_HTTP_TIMEOUT $URL_HTTP_RETRIES $NO_CACHE $RATE $PASSIVE
$CONTINUE $ONLY_NEWER $DEREF_SYM"
+ WGET_OPTIONS="$URL_HTTP_TIMEOUT $URL_HTTP_RETRIES $NO_CACHE $RATE $PASSIVE
$CONTINUE $ONLY_NEWER $DEREF_SYM $check_certificate"
debug 'dl_wget' "wget options: $WGET_OPTIONS"
-}
+}
#---------------------------------------------------------------------
##=back
##
diff --git a/var/lib/sorcery/modules/libapi b/var/lib/sorcery/modules/libapi
index 055d946..9215f1d 100755
--- a/var/lib/sorcery/modules/libapi
+++ b/var/lib/sorcery/modules/libapi
@@ -12,8 +12,8 @@
#---------------------------------------------------------------------

#---------------------------------------------------------------------
-# @NOTE: The following list and the function definition should be in
-# alphabetical order. If this is not the case, please file a bug
+## @NOTE The following list and the function definition should be in
+## @NOTE alphabetical order. If this is not the case, please file a bug
#---------------------------------------------------------------------

#---------------------------------------------------------------------
@@ -1158,4 +1158,3 @@ function track_manual() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/libcast b/var/lib/sorcery/modules/libcast
index c15355b..fbb2900 100755
--- a/var/lib/sorcery/modules/libcast
+++ b/var/lib/sorcery/modules/libcast
@@ -1,9 +1,9 @@
#!/bin/bash
#---------------------------------------------------------------------
## @Synopsis Functions for dealing with the actual
-## compiling/installation of spells and walking through casts 'pass 4'
pipeline.
+## @Synopsis compiling/installation of spells and walking through cast's
'pass 4' pipeline.
## @Copyright Copyright (C) 2002 The Source Mage Team
-## &lt;http://www.sourcemage.org&gt;
+## @Copyright &lt;http://www.sourcemage.org&gt;
## @Globals $SGL_LIBRARY_MODULES $GRIMOIRE $BUILD_API $USE_FUNCTIONS
## A spell follows the following path during its installation:
## PREPARE -&gt; DETAILS -&gt; PRE_BUILD -&gt; BUILD, or COMPILE/INSTALL
-&gt;
@@ -86,8 +86,7 @@ function prepare_spell_config() {
## Prompts the user about spells that are in conflict with the current
## spell and allows them to dispel them. If the user chooses not to
## dispel the conflicting spell, the function returns 1
-## @param dis-allow conflict with anything in this list, normally used
-## to prevent self conflicts
+## @param dis-allow conflict with anything in this list, normally used to
prevent self conflicts
## @return nothing if the user dispels the conflicting spell
## @return 1 if the user chooses not to dispel the conflicting spell
#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libcodex
b/var/lib/sorcery/modules/libcodex
index 07e7e95..bf26d46 100755
--- a/var/lib/sorcery/modules/libcodex
+++ b/var/lib/sorcery/modules/libcodex
@@ -727,6 +727,8 @@ function codex_cache_spell_lookup() {
#---------------------------------------------------------------------
function codex_check_cache() {
codex_is_canonicalized $1 || return 1
+ [[ -x $1 ]] || return 1
+
if ! [ -f $1/$SPELL_INDEX_FILE ] || ! [ -f $1/$PROVIDE_INDEX_FILE ]; then
codex_create_cache
fi
diff --git a/var/lib/sorcery/modules/libdepends
b/var/lib/sorcery/modules/libdepends
index 778eaeb..184a262 100755
--- a/var/lib/sorcery/modules/libdepends
+++ b/var/lib/sorcery/modules/libdepends
@@ -1023,10 +1023,10 @@ function private_up_trigger() {
}

#---------------------------------------------------------------------
-# Force a spell to be recast, if it comes up for processing
-# if the spell was already looked at and processed nothing happens
-# if the spell was already looked at and didnt need processing, then
-# it'll get re-processed (assuming the caller also did a depends on it)
+## Force a spell to be recast, if it comes up for processing
+## if the spell was already looked at and processed nothing happens
+## if the spell was already looked at and didnt need processing, then
+## it'll get re-processed (assuming the caller also did a depends on it)
#---------------------------------------------------------------------
function real_force_depends() {
debug "libdepends" "$FUNCNAME - $SPELL - $@"
diff --git a/var/lib/sorcery/modules/libdepengine
b/var/lib/sorcery/modules/libdepengine
index 3d240a5..cfb6c7b 100755
--- a/var/lib/sorcery/modules/libdepengine
+++ b/var/lib/sorcery/modules/libdepengine
@@ -75,8 +75,7 @@ function depengine_entry_point() {
## Builds the children, then itself, then executes triggers.
##
## @param Spell to cast
-## @param In trigger flag, default 0. If 1 and a depends loop exists
-## back-off and fail gracefully.
+## @param In trigger flag, default 0. If 1 and a depends loop exists
back-off and fail gracefully.
#------------------------------------------------------------------------
function depengine_cast_engine() {
$STD_DEBUG
@@ -135,10 +134,9 @@ function depengine_cast_engine() {
#------------------------------------------------------------------------
## Iterative recursive step. Build each of the spell's dependencies.
## @param Spell
-## @param In trigger flag (optional) if 1, then back off more readily in
-## the event of a dependency loop.
+## @param In trigger flag (optional) if 1, then back off more readily in the
event of a dependency loop.
## @global MINUS_K if 'yes', then act like make -k and continue building
-## dependent spells even if another one fails.
+## @global dependent spells even if another one fails.
##
#------------------------------------------------------------------------
function recurse_depends() {
@@ -266,7 +264,7 @@ function execute_triggers() {
# run any other trigger besides the two above
# but not if we're summoning
local action=cast
- do_trigger "$spell:on_cast:$trg_target:$trg_action"
+ do_trigger "$trg_target:$spell:on_cast:$trg_action"
fi

# a brown trigger is a loop, drop it
diff --git a/var/lib/sorcery/modules/libdispel
b/var/lib/sorcery/modules/libdispel
index 6f4c4c1..9114cf4 100755
--- a/var/lib/sorcery/modules/libdispel
+++ b/var/lib/sorcery/modules/libdispel
@@ -313,7 +313,6 @@ function real_default_post_remove() {
#---------------------------------------------------------------------
## Dispel a spell
#---------------------------------------------------------------------
-
function dispel_spell() {

local SPELL=$1
diff --git a/var/lib/sorcery/modules/libdownload
b/var/lib/sorcery/modules/libdownload
index 7c396c5..f064cb8 100755
--- a/var/lib/sorcery/modules/libdownload
+++ b/var/lib/sorcery/modules/libdownload
@@ -16,6 +16,7 @@
## need to.
##
## WRITING NEW DL HANDLERS
+## <pre>
## Current dl handlers only need a single function
## "dl_get_<handler>" This function takes the following arguments:
## $target
@@ -26,7 +27,7 @@
## result directory or file
## $dl_type Name of the variable in which to store the type of
## thing downloaded
-##
+## </pre>
##
## The target parameter is advisory, it is a hint at what might be
downloaded.
##
@@ -226,4 +227,3 @@ EOF
## 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/var/lib/sorcery/modules/libgpg b/var/lib/sorcery/modules/libgpg
index ac30567..7b24baf 100755
--- a/var/lib/sorcery/modules/libgpg
+++ b/var/lib/sorcery/modules/libgpg
@@ -17,11 +17,11 @@
## @param public keyring
##
## @return 0 on success, non-zero on failure:
-## 1: verification failure
-## 3: no signature file
-## 4: no file to verify
-## 5: no keyring
-## 200: gpg isnt installed
+## @return 1 verification failure
+## @return 3 no signature file
+## @return 4 no file to verify
+## @return 5 no keyring
+## @return 200 gpg isnt installed
##
## @stdout message when gpg is not installed
##
@@ -104,19 +104,16 @@ function gpg_get_grimoire_key() {
## Verify a grimoire tarball's gpg signature
## @param file on local disk to verify
## @param url from which to get the signature
-## @param (optional) grimoire branch, if derive it from the filename with
-## ${SOURCE%%*.}
-## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
-## from $2
+## @param (optional) grimoire branch, if derive it from the filename with
${SOURCE%%*.}
+## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
from $2
## @return 0 on success, non-zero on failure:
-## 1: verification failed
-## 2: verification is disabled
-## 254: no keyring found
-## 255: could not download signature
-## anything else see gpg_verify_signature
+## @return 1 verification failed
+## @return 2 verification is disabled
+## @return 254 no keyring found
+## @return 255 could not download signature
+## @return anything else see gpg_verify_signature
##
-## @stdout possibly a failure message depending on what happens (nothing
-## is output on success)
+## @stdout possibly a failure message depending on what happens (nothing is
output on success)
#---------------------------------------------------------------------
function gpg_verify_grimoire() {
if [[ "$GPG_VERIFY_GRIMOIRE" != on ]] ; then
@@ -187,18 +184,16 @@ function verify_grimoire_tree() {
## Verify a sorcery tarball's gpg signature
## @param file on local disk to verify
## @param url from which to get the signature
-## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
-## from $2
+## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
from $2
##
## @return 0 on success, non-zero on failure:
-## 1: verification failed
-## 2: verification is disabled
-## 254: no keyring found
-## 255: could not download signature
-## anything else see gpg_verify_signature
+## @return 1 verification failed
+## @return 2 verification is disabled
+## @return 254 no keyring found
+## @return 255 could not download signature
+## @return anything else see gpg_verify_signature
##
-## @stdout possibly a failure message depending on what happens (nothing
-## is output on success)
+## @stdout possibly a failure message depending on what happens (nothing is
output on success)
#---------------------------------------------------------------------
function gpg_verify_sorcery() {
if [[ "$GPG_VERIFY_SORCERY" != on ]] ; then
@@ -224,18 +219,15 @@ function gpg_verify_sorcery() {
## @param file on local disk to verify
## @param url from which to get the signature
## @param keyring to verify with
-## @param grimoire or sorcery, whatever it is thats being verified (used in
-## an output message
-## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
-## from $2
+## @param grimoire or sorcery, whatever it is thats being verified (used in
an output message
+## @param (optional) signature file, if empty download $SOURCE.$GPG_SIG_EXT
from $2
##
## @return 0 on success, non-zero on failure:
-## 1: verification failed
-## 255: could not download signature
-## anything else see gpg_verify_signature
+## @return 1 verification failed
+## @return 255 could not download signature
+## @return anything else see gpg_verify_signature
##
-## @stdout possibly a failure message depending on what happens (nothing
-## is output on success)
+## @stdout possibly a failure message depending on what happens (nothing is
output on success)
#---------------------------------------------------------------------
function gpg_verify_common() {
# download the signature
@@ -276,11 +268,12 @@ function gpg_verify_common() {
## gpg_verify_grimoire.
##
## @param return code of gpg_verify_sorcery or gpg_verify_grimoire
-## @return 0 if the program should continue, 1 if not
+## @return 0 if the program should continue
+## @return 1 if not
##
## @stdout Some message thats supposed to inform the user of whats
-## going on, or possibly a query asking the user if they want
-## to continue even though gpg verification failed.
+## @stdout going on, or possibly a query asking the user if they want
+## @stdout to continue even though gpg verification failed.
#---------------------------------------------------------------------
function gpg_user_query() {
local rc=$1
@@ -314,9 +307,9 @@ function gpg_user_query() {
#---------------------------------------------------------------------
## @param algorithm to use
## @param file to get hashsum of
-## @out output is exactly the same format as md5sum/sha1sum, just with
-## a different hashsum. "hashsum<space><space>filename". The hashsum is
-## printed with all lowercase letters.
+## @stdout output is exactly the same format as md5sum/sha1sum, just with
+## @stdout a different hashsum. "hashsum<space><space>filename". The hashsum
is
+## @stdout printed with all lowercase letters.
##
## This assumes that the caller has already verified that gpg is
## installed and supports the specified hash function.
@@ -331,8 +324,8 @@ function gpg_hashsum() {
}

#---------------------------------------------------------------------
-## @out All the hash algorithms supported by gpg, algorithms printed in
-## lower case.
+## @stdout All the hash algorithms supported by gpg, algorithms printed in
+## @stdout lower case.
##
## This assumes the caller has already verified that gpg is installed.
#---------------------------------------------------------------------
@@ -343,8 +336,7 @@ function gpg_get_hashes() {
#---------------------------------------------------------------------
## Verify a tree against a manifest file
## @param directory to verify
-## @param manifest file, the format is like what the md5sum tool would
-## produce
+## @param manifest file, the format is like what the md5sum tool would
produce
## @param algorithm to use, this can be anything supported by gpg
## @param regular expression of files to ignore
#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/libgrimoire
b/var/lib/sorcery/modules/libgrimoire
index 3c8134e..ede7d76 100755
--- a/var/lib/sorcery/modules/libgrimoire
+++ b/var/lib/sorcery/modules/libgrimoire
@@ -44,7 +44,7 @@ function real_mk_source_dir() {
if [ -n "$NEW_DIR" ]; then

rm_source_dir $NEW_DIR
- mkdir $NEW_DIR &&
+ mkdir -p $NEW_DIR &&
if [[ $TMPFS == on ]]; then
mount -o size=$SIZE,nr_inodes=1m -t tmpfs tmpfs $NEW_DIR
fi
diff --git a/var/lib/sorcery/modules/liblock b/var/lib/sorcery/modules/liblock
index 010da47..487c8e4 100755
--- a/var/lib/sorcery/modules/liblock
+++ b/var/lib/sorcery/modules/liblock
@@ -34,6 +34,7 @@
## network | network | ?
## solo | resource name | when using a resource exclusively
## libgrimoire | install | when a spell is in the install stage
+## </pre>
## locking solo will not cause these routines to behave any different.
## catching it has to be done externally (see cast for an example)
##
@@ -462,10 +463,10 @@ function counter_clean() {
##
## Prevents more than one process from entering a section of code
## at a time
-## NOTE: This assumes that two functions of the same name will
-## not havethe SYNCHRONIZE command on the same line in different
-## files.
-##
+## @NOTE This assumes that two functions of the same name will
+## @NOTE not havethe SYNCHRONIZE command on the same line in different
+## @NOTE files.
+## <pre>
## Example:
## #!/bin/bash
## echo "Script started with PID=$$
@@ -496,4 +497,3 @@ UNSYNCHRONIZE='
debug "liblock" "+++ in unsynch code"
unlock_resources "lockfunction" "${FUNCNAME}/${__llSYNCH_LINE}"
unset __llSYNCH_LINE'
-
diff --git a/var/lib/sorcery/modules/libmisc b/var/lib/sorcery/modules/libmisc
index b53d421..7df481c 100755
--- a/var/lib/sorcery/modules/libmisc
+++ b/var/lib/sorcery/modules/libmisc
@@ -5,7 +5,6 @@
## @param delimiter
## @param name of array to put it in
##
-## @Description
## Turns a string into an array. Each element of the array
## is separated in the string by the delimiter.
##
@@ -178,6 +177,17 @@ function real_message() {
}

#---------------------------------------------------------------------
+## @Type Private
+## @param error message to echo
+## @Stdout message
+## @Stderr message
+## echo's the given arguments if SILENT is not set.
+#---------------------------------------------------------------------
+function error_message() {
+ real_message "$@" 1>&2
+}
+
+#---------------------------------------------------------------------
## @param type
## @param message
##
@@ -384,7 +394,8 @@ function esc_str()
function consolidate_params() {
local param
for param in "$@"; do
- echo -n $param | sed 's/ /\\ /g'
+ # add and remove a dummy space, so echo parameters can be used as values
+ echo -n "" $param | sed 's/ //; s/ /\\ /g'
echo -n " "
done
}
@@ -742,8 +753,7 @@ function real_persistent_clear () {
## @param return variable (optional)
##
## @return 1 option is not present in the config
-## @return 0 option is present in the config (even if the option is
-## empty string "") and it's set.
+## @return 0 option is present in the config (even if the option is empty
string "") and it's set.
##
## Retrieves setting from $SPELL_CONFIG file and optionally sets user
## supplied variable. Function is here to make possible changes to
@@ -751,13 +761,6 @@ function real_persistent_clear () {
## function and are not working with variables directly
##
#---------------------------------------------------------------------
-#function config_get_option {
-# local VAR=$2
-# local REPLY=`grep -E "^$1=" $SPELL_CONFIG | head -n 1 | sed
"s/^[^=]*=//"`
-# [ -n "$VAR" ] && eval $VAR=\"$REPLY\"
-# [ -z "$REPLY" ] && return 1
-# return 0
-#}
function config_get_option () {
if [[ $PROTECT_SORCERY ]] ; then
if is_sorcery_var $1; then
@@ -777,13 +780,19 @@ function config_get_option () {
return 1
fi
}
+#function config_get_option {
+# local VAR=$2
+# local REPLY=`grep -E "^$1=" $SPELL_CONFIG | head -n 1 | sed
"s/^[^=]*=//"`
+# [ -n "$VAR" ] && eval $VAR=\"$REPLY\"
+# [ -z "$REPLY" ] && return 1
+# return 0
+#}

#---------------------------------------------------------------------
## @param Name of variable
## @param return variable
##
-## @return 0 if the variable could be found, 1 if no old persistent file
-## exists.
+## @return 0 if the variable could be found, 1 if no old persistent file
exists.
##
## Get value of a persistent variable from the previous cast when
## there is a -r. The persistent data moves to a seperate directory
@@ -836,14 +845,13 @@ function config_get_last_option() {
## working with variables directly
##
#---------------------------------------------------------------------
-#function config_set_option {
-# echo "$1=$2" >> $SPELL_CONFIG
-#}
function config_set_option () {
persistent_add $1
eval "$1=\"$2\""
}
-
+#function config_set_option {
+# echo "$1=$2" >> $SPELL_CONFIG
+#}

#---------------------------------------------------------------------
## @param config file variable
@@ -1242,8 +1250,8 @@ function is_sorcery_var() {

#---------------------------------------------------------------------
## @param Variable name used in complaint
-## @stdout Complain vehemently that a variable name is used by sorcery
-## and the user should file a bug because a spell is using the variable
+## @stdout Complain vehemently that a variable name is used by sorcery and
+## @stdout the user should file a bug because a spell is using the variable
#---------------------------------------------------------------------
function complain_sorcery_var() {
message "${PROBLEM_COLOR}WARNING: ATTEMPTING TO USE" \
@@ -1316,7 +1324,7 @@ function set_architecture() {
[ $SPECFILE ] && break
done
if [[ ! $SPECFILE ]] ; then
- message "${PROBLEM_COLOR}Cannot find arch spec for $arch!"
+ message "${PROBLEM_COLOR}Cannot find arch spec for $arch!$DEFAULT_COLOR"
return 1
fi
debug "libmisc" "set_architecture: SPECFILE=$SPECFILE"
diff --git a/var/lib/sorcery/modules/libresurrect
b/var/lib/sorcery/modules/libresurrect
index f7dcdac..5a308de 100755
--- a/var/lib/sorcery/modules/libresurrect
+++ b/var/lib/sorcery/modules/libresurrect
@@ -547,7 +547,7 @@ function real_handle_changed_config() {
3) mark_file_modified "$to"
touch "$to"
break ;;
- 4) diff "$to" "$from" | $PAGER;;
+ 4) diff -u "$to" "$from" | $PAGER;;
esac
message "\n\nPlease select another option"
done
diff --git a/var/lib/sorcery/modules/libsorcery
b/var/lib/sorcery/modules/libsorcery
index c09a728..30e6538 100755
--- a/var/lib/sorcery/modules/libsorcery
+++ b/var/lib/sorcery/modules/libsorcery
@@ -705,9 +705,9 @@ function optimize() {
esac
done
# use echo to crunch all the whitespace out for broken configure scripts
- export CFLAGS=$(echo -O $CFLAGS $CUSTOM_CFLAGS $OVERRIDE_CFLAGS)
- export CXXFLAGS=$(echo $CFLAGS $CUSTOM_CXXFLAGS $OVERRIDE_CXXFLAGS)
- export LDFLAGS=$(echo $LDFLAGS $CUSTOM_LDFLAGS $OVERRIDE_LDLAGS)
+ export CXXFLAGS=$(echo $CFLAGS $CUSTOM_CXXFLAGS $OVERRIDE_CXXFLAGS
$USER_SPELL_CXXFLAGS)
+ export CFLAGS=$(echo $CFLAGS $CUSTOM_CFLAGS $OVERRIDE_CFLAGS
$USER_SPELL_CFLAGS)
+ export LDFLAGS=$(echo $LDFLAGS $CUSTOM_LDFLAGS $OVERRIDE_LDLAGS
$USER_SPELL_LDFLAGS)
fi

}
diff --git a/var/lib/sorcery/modules/libstate
b/var/lib/sorcery/modules/libstate
index 88667b1..aa6eb40 100755
--- a/var/lib/sorcery/modules/libstate
+++ b/var/lib/sorcery/modules/libstate
@@ -518,9 +518,7 @@ function real_provider_ok() {
## @Type API
## @param Spell name
## @param Provider name
-## @param If empty get the uncommited spell info, if anything else get
-## info from the committed ($DEPENDS_STATUS) database. If the uncommited
-## db doesnt exist (maybe we're not casting) use DEPENDS_STATUS
+## @param If empty get the uncommited spell info, if anything else get info
from the committed ($DEPENDS_STATUS) database. If the uncommited db doesnt
exist (maybe we're not casting) use DEPENDS_STATUS
##
## @return 0 if a provider could be found 1 if not
## @stdout the provider name(s)
@@ -700,9 +698,7 @@ function get_all_spells_with_status () {
## @Type API
## @param Spell name
## @param Target spell name
-## @param If empty get the uncommited spell info, if anything else get
-## info from the committed ($DEPENDS_STATUS) database. If the uncommited
-## db doesnt exist (maybe we're not casting) use DEPENDS_STATUS
+## @param If empty get the uncommited spell info, if anything else get info
from the committed ($DEPENDS_STATUS) database. If the uncommited db doesnt
exist (maybe we're not casting) use DEPENDS_STATUS
##
## @return 0 if a dependency from $1 on $2 is enabled, 1 otherwise.
## @stdout the provider name(s)
diff --git a/var/lib/sorcery/modules/libsummon
b/var/lib/sorcery/modules/libsummon
index 123d0b7..83fb9e7 100755
--- a/var/lib/sorcery/modules/libsummon
+++ b/var/lib/sorcery/modules/libsummon
@@ -381,7 +381,8 @@ function unpack_for_update() {
local _guess_type

# hard-coded list of url prefixes that generally download trees
- local tree_prefixes="cvs dir rsync smgl_tla svn git"
+ local tree_prefixes="cvs dir rsync smgl_tla svn svn_http svn_ssh git"
+ tree_prefixes="$tree_prefixes svn_https git_http"
local prefix=$(url_get_prefix $url_list)
if ! list_find "$hints" file &&
list_find "$hints" tree || list_find "$tree_prefixes" "$prefix" ; then
diff --git a/var/lib/sorcery/modules/libtablet
b/var/lib/sorcery/modules/libtablet
index be64882..bc5472f 100755
--- a/var/lib/sorcery/modules/libtablet
+++ b/var/lib/sorcery/modules/libtablet
@@ -2,7 +2,7 @@
#---------------------------------------------------------------------
## @Synopsis Functions for dealing with tablet
## @Copyright (C) 2004 The Source Mage Team <http://www.sourcemage.org>
-##
+## <pre>
## tablet layout version 0:
## layout 0 is anything unversioned with all its problems, if a
## tablet like this is seen it should be updated to version 1,
@@ -43,7 +43,6 @@
## tablet_0_repair_spell DONE
## no tb_version : tablet_0_repair (bumps to version 1)
##
-#---------------------------------------------------------------------
##
## Terminology:
## "the tablet" the directory $TABLET_PATH and everything in it
@@ -79,11 +78,7 @@
## tablet_coalesce_files : hardlink identical files to save space
## tablet_fix_duplicates
## determine if a tablet points back at itself through the install log
-##
-##
-##
-##
-##
+## </pre>
#---------------------------------------------------------------------


@@ -383,10 +378,10 @@ function tablet_find_spell_dir() {
}

#----------------------------------------------------------------------
-# @param spell name
-# @param upvar
-# quicker dirtier version of above without special checks since the
-# tablet in a cache tarball has nothing to do with the installed system
+## @param spell name
+## @param upvar
+## quicker dirtier version of above without special checks since the
+## tablet in a cache tarball has nothing to do with the installed system
#----------------------------------------------------------------------
function tablet_find_resurrect_dir() {
local SPELL=$1
diff --git a/var/lib/sorcery/modules/libtrack
b/var/lib/sorcery/modules/libtrack
index b38fa0b..5e31ff6 100755
--- a/var/lib/sorcery/modules/libtrack
+++ b/var/lib/sorcery/modules/libtrack
@@ -181,8 +181,7 @@ function check_if_modified() {
## Creates a bzip/gzip'ed tar file containing an archived backup of
## file specified on standard input into $CACHE_COMP
## @stdin files, one per line, to put into the archive
-## @param directory input files are relative to install root for regular
-## files state root for state files
+## @param directory input files are relative to install root for regular
files state root for state files
##
#---------------------------------------------------------------------
function create_cache_archive() {
@@ -221,8 +220,8 @@ function create_cache_archive() {
}

#---------------------------------------------------------------------
-# this is to filter the install log from one form to another
-# for install_root/track_root conversions
+## this is to filter the install log from one form to another
+## for install_root/track_root conversions
#---------------------------------------------------------------------
function install_log_filter() {
sed "s:^$1:$2:"
@@ -232,40 +231,37 @@ function md5_log_filter() {
}

#---------------------------------------------------------------------
-# @param input file (can be /dev/stdin)
-# @param output file (can be /dev/stdout)
-# @param input format (root/log/filterable)
-# @param output format (root/log/filterable)
-# @param filter callback (optional install_log_filter, could be
-# md5_log_filter)
-#
-# This filters an install log from a given format into another format
-#
-# root: relative to / all paths are relative to / file existence tests
-# should work, INSTALL_ROOT and STATE_ROOT are prepended to data and
-# state files respectively
-#
-# log: relative to track_root etc, format used in the logs (see note on
-# special behavior below)
-#
-# filterable: track_root/install_root/state_root stripped out files can
-# have filters applied to them
-#
-# "Special" handling applies depending on whether STATE_ROOT is inside
-# or outside INSTALL_ROOT.
-# For converting into log format:
-# If STATE_ROOT is within INSTALL_ROOT
-# eg: STATE_ROOT=/opt/stuff INSTALL_ROOT=/opt/stuff
-# or STATE_ROOT=/opt/stuff/state INSTALL_ROOT=/opt/stuff
-# the portion of INSTALL_ROOT within STATE_ROOT is replaced with TRACK_ROOT
-# if STATE_ROOT is outside of INSTALL_ROOT (eg /opt/stuff and /opt/state)
-# then STATE_ROOT is left as is
-#
-# Converting from log to root format is the inverse, and of course going
-# to filterable format just requires removing whatever the expected prefix
is.
-#
-#
-#
+## @param input file (can be /dev/stdin)
+## @param output file (can be /dev/stdout)
+## @param input format (root/log/filterable)
+## @param output format (root/log/filterable)
+## @param filter callback (optional install_log_filter, could be
md5_log_filter)
+##
+## This filters an install log from a given format into another format
+## <pre>
+## root: relative to / all paths are relative to / file existence tests
+## should work, INSTALL_ROOT and STATE_ROOT are prepended to data and
+## state files respectively
+##
+## log: relative to track_root etc, format used in the logs (see note on
+## special behavior below)
+##
+## filterable: track_root/install_root/state_root stripped out files can
+## have filters applied to them
+##
+## "Special" handling applies depending on whether STATE_ROOT is inside
+## or outside INSTALL_ROOT.
+## For converting into log format:
+## If STATE_ROOT is within INSTALL_ROOT
+## eg: STATE_ROOT=/opt/stuff INSTALL_ROOT=/opt/stuff
+## or STATE_ROOT=/opt/stuff/state INSTALL_ROOT=/opt/stuff
+## the portion of INSTALL_ROOT within STATE_ROOT is replaced with TRACK_ROOT
+## if STATE_ROOT is outside of INSTALL_ROOT (eg /opt/stuff and /opt/state)
+## then STATE_ROOT is left as is
+##
+## Converting from log to root format is the inverse, and of course going
+## to filterable format just requires removing whatever the expected prefix
is.
+## </pre>
#---------------------------------------------------------------------
function log_adjuster() {
local input=$1
@@ -364,11 +360,9 @@ function log_adjuster() {
## Split a log file into data that should be TRACK_ROOT'd versus
## STATE_ROOT'd.
##
-## @param filename or - (or /dev/stdin) for a pipe. This routine will
-## read the input only once in-order to work with pipes.
+## @param filename or - (or /dev/stdin) for a pipe. This routine will read
the input only once in-order to work with pipes.
## @param filename for non-state files, possibly /dev/stdout or /dev/stderr
-## @param filename for state files, possibly /dev/stdout or /dev/stderr
-## don't use the same stream for both types.
+## @param filename for state files, possibly /dev/stdout or /dev/stderr
don't use the same stream for both types.
##
#---------------------------------------------------------------------
function seperate_state_files() {
diff --git a/var/lib/sorcery/modules/libunpack
b/var/lib/sorcery/modules/libunpack
index 0aa8584..69b9b53 100755
--- a/var/lib/sorcery/modules/libunpack
+++ b/var/lib/sorcery/modules/libunpack
@@ -464,8 +464,8 @@ function unpack_hash() {

if [[ "$HASH" != "$HASHSUM" ]] || [[ $rc != 0 ]]
then
- message "${PROBLEM_COLOR}$ALGORITHM check failed" \
- "$HASH != $HASHSUM !${DEFAULT_COLOR}" &&
+ error_message "${PROBLEM_COLOR}$ALGORITHM check failed!" &&
+ error_message "$HASH (computed) != $HASHSUM (expected)!$DEFAULT_COLOR"
&&
hash_user_query 1 "$SPELL" spell || return 1
else
if is_allowed_hash ${ALGORITHM} ${HLEVEL} ; then rc=0 ; else rc=1 ; fi
diff --git a/var/lib/sorcery/modules/liburl b/var/lib/sorcery/modules/liburl
index 8f30744..fb7674c 100755
--- a/var/lib/sorcery/modules/liburl
+++ b/var/lib/sorcery/modules/liburl
@@ -54,7 +54,7 @@
## The next step is to write the actual functions that
## will handle url requests and put them in the new file you just
## created. The functions that must be implemented are:
-##
+## <pre>
## url_<URL_PREFIX>_bucketize <url>
## url_<URL_PREFIX>_crack <url>
## url_<URL_PREFIX>_expand <url>
@@ -62,7 +62,7 @@
## url_<URL_PREFIX>_is_valid <url>
## url_<URL_PREFIX>_netselect <url>
## url_<URL_PREFIX>_verify <url>
-##
+## </pre>
## The easiest way to figure out what to do is to look at
## one of the existing files (e.g., url_http handles http requests).
##
@@ -77,11 +77,9 @@
##
#---------------------------------------------------------------------

-#---------------------------------------------------------------------
# Load library files (url_*) that contain url handlers
#
-# (2002/09/29) added if so it onlt loads the stuff once
-#---------------------------------------------------------------------
+# (2002/09/29) added if so it only loads the stuff once
if ! [[ $URL_HANDLER_FILES ]] ; then
URL_HANDLER_FILES=`ls $SGL_LIBRARY_MODULES/url_handlers/url_*[^~]`
for url_handler_file in $URL_HANDLER_FILES; do
@@ -431,7 +429,7 @@ function url_expand() {
#---------------------------------------------------------------------
function url_verify() {
$STD_DEBUG
- url_generic_apifunc verify $1
+ url_generic_apifunc verify "$@"
}

#---------------------------------------------------------------------
@@ -493,7 +491,7 @@ function url_generic_apifunc() {
local tmp_func=$1
shift
local tmp_url=$1 tmp_prefix
- tmp_prefix=$(url_get_prefix $1)
+ tmp_prefix=$(url_get_prefix $1) &&
if misc_is_function url_${tmp_prefix}_${tmp_func}; then
url_${tmp_prefix}_${tmp_func} "$@"
else
diff --git a/var/lib/sorcery/modules/url_handlers/url_cvs
b/var/lib/sorcery/modules/url_handlers/url_cvs
index 68ac9f3..fa55616 100755
--- a/var/lib/sorcery/modules/url_handlers/url_cvs
+++ b/var/lib/sorcery/modules/url_handlers/url_cvs
@@ -156,4 +156,3 @@ function url_cvs_netselect() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/url_handlers/url_dir
b/var/lib/sorcery/modules/url_handlers/url_dir
index 0e8a25e..c09b804 100755
--- a/var/lib/sorcery/modules/url_handlers/url_dir
+++ b/var/lib/sorcery/modules/url_handlers/url_dir
@@ -70,4 +70,3 @@ function url_dir_verify() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/url_handlers/url_file
b/var/lib/sorcery/modules/url_handlers/url_file
index b8aabef..25e8d6c 100755
--- a/var/lib/sorcery/modules/url_handlers/url_file
+++ b/var/lib/sorcery/modules/url_handlers/url_file
@@ -49,4 +49,3 @@ function url_file_verify() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/modules/url_handlers/url_http
b/var/lib/sorcery/modules/url_handlers/url_http
index 617d706..8fbb86e 100755
--- a/var/lib/sorcery/modules/url_handlers/url_http
+++ b/var/lib/sorcery/modules/url_handlers/url_http
@@ -2,14 +2,14 @@
#---------------------------------------------------------------------
##
##=head1 SYNOPSIS
-##
+##
## Url handler functions for downloading http, https, and ftp urls
##
##=head1 DESCRIPTION
##
-## This file contains functions for downloading and verifying
+## This file contains functions for downloading and verifying
## http, https, and ftp urls. This file uses the "wget" program.
-##
+##
##=head1 COPYRIGHT
##
## Copyright 2002 by the Source Mage Team
@@ -39,49 +39,55 @@ function url_https_bucketize() {

#---------------------------------------------------------------------
##=item url_http_verify <url>
-##
+##
## Verifies the specified http url. Returns true if the url exists
## OR if the url is an empty string.
##
#---------------------------------------------------------------------
function url_http_verify() {
local URL=$1
+ local hints="$2"
+ local check_certificate
+
+ if list_find "$hints" no-check-certificate; then
+ check_certificate=--no-check-certificate
+ fi

if [ -n "$URL" ]; then
- if OUTPUT=`wget --passive-ftp -t 1 -T 30 --spider "$URL" 2>&1`; then
+ if OUTPUT=`wget --passive-ftp -t 1 -T 30 --spider $check_certificate
"$URL" 2>&1`; then
true
else
echo $OUTPUT
false
fi
- fi
+ fi
}


#---------------------------------------------------------------------
##=item url_https_verify <url>
-##
+##
## Verifies the specified https url. Returns true if the url exists
## OR if the url is an empty string.
##
#---------------------------------------------------------------------
function url_https_verify() {
- url_http_verify $1
+ url_http_verify "$@"
}


#---------------------------------------------------------------------
##=item url_ftp_verify <url>
-##
+##
## Verifies the specified ftp url. Echos results of wget if file
## is not found.
##
-#
-# Implementation note: wget --spider still downloads ftp files in
-# full rather than just checking that the file is there. To get
-# around this problem, we download the directory and see if the file
-# is in the directory listing.
-#
+##
+## @Implementation_note wget --spider still downloads ftp files in full
rather
+## @Implementation_note than just checking that the file is there. To get
+## @Implementation_note around this problem, we download the directory and
see
+## @Implementation_note if the file is in the directory listing.
+##
#---------------------------------------------------------------------
function url_ftp_verify() {
local URL=$1
@@ -91,7 +97,7 @@ function url_ftp_verify() {
local DIRECTORY=`dirname $URL`
local OUTPUT=`wget --passive-ftp -t 1 -T 30 -O - --spider -S
"$DIRECTORY/" 2>&1`

- if echo $OUTPUT | grep -q "$FILENAME"; then
+ if echo $OUTPUT | grep -q " $FILENAME "; then
rm -f .listing
else
echo $OUTPUT | sed 's/LIST.*//g'
@@ -99,7 +105,7 @@ function url_ftp_verify() {
rm -f .listing
false
fi
- fi
+ fi
}

#---------------------------------------------------------------------
diff --git a/var/lib/sorcery/modules/url_handlers/url_rsync
b/var/lib/sorcery/modules/url_handlers/url_rsync
index 4a62fb7..afac2a8 100755
--- a/var/lib/sorcery/modules/url_handlers/url_rsync
+++ b/var/lib/sorcery/modules/url_handlers/url_rsync
@@ -97,4 +97,3 @@ function url_rsync_netselect() {
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-
diff --git a/var/lib/sorcery/subroutines b/var/lib/sorcery/subroutines
index 21fcdea..4d2ed21 100755
--- a/var/lib/sorcery/subroutines
+++ b/var/lib/sorcery/subroutines
@@ -47,4 +47,3 @@ done
## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##
#---------------------------------------------------------------------
-



  • [SM-Commit] GIT changes to stable-1.13 sorcery by Jaka Kranjc (a2ae4e9d9533a10133b06ed0e94620e403c1286b), Jaka Kranjc, 03/24/2008

Archive powered by MHonArc 2.6.24.

Top of Page