New commits:
commit 3fd314ae8551875f02a13552ff1e434050856066
Author: Andrew Stitt <astitt AT sourcemage.org>
Commit: Andrew Stitt <astitt AT sourcemage.org>
fix bug 12387
diff --git a/ChangeLog b/ChangeLog
index d6d43e1..2e7858e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,7 @@
2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
+ * scribe: check for tar failure from unpacking, fixes bug 12387
+
+2006-11-25 Andrew Stitt <astitt AT sourcemage.org>
* libdepends: fix bug 11865, ignore stored sub-depends if the
requesting spell has already been processed.
diff --git a/usr/sbin/scribe b/usr/sbin/scribe
index 942a3f5..047d63a 100755
--- a/usr/sbin/scribe
+++ b/usr/sbin/scribe
@@ -74,16 +74,19 @@ function unpackage_grimoire_tarball() {
local tarball=$1
local grimoire=$2
local grim_name=$3
- #untar the new grimoire update and remove zip
- bzcat $tarball| tar -x 1>/dev/null 2>&1
- #check for a successful unzip
- if ! [ -d $grimoire ]; then
- #uh oh! bad unzip.
- message "ERROR: Grimoire tarball for $grim_name not" \
- "formatted correctly!."
+ #untar the new grimoire tarball
+ if tar -xjf $tarball 1>/dev/null 2>&1; then
+ # ensure the grimoire unpacked where it was expected to
+ if ! [ -d $grimoire ]; then
+ message "ERROR: Grimoire tarball for $grim_name not" \
+ "formatted correctly!."
+ return 1
+ fi
+ return 0
+ else
+ message "ERROR: Grimoire tarball for $grim_name did not unpack properly!"
return 1
- fi
- return 0
+ fi
}