summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2008-02-23 01:20:48 +0000
committerMike Frysinger <vapier@gentoo.org>2008-02-23 01:20:48 +0000
commit71d65bd86281706c2b80024533508ea3aff00d5c (patch)
treec82c684f22a9417a611c58271c5f09f1200ec963
parent228a3528eee93995f912f66451d6aced08738a79 (diff)
downloadportage-71d65bd86281706c2b80024533508ea3aff00d5c.tar.gz
portage-71d65bd86281706c2b80024533508ea3aff00d5c.tar.bz2
portage-71d65bd86281706c2b80024533508ea3aff00d5c.zip
only try to fetch compression schemes which the host supports
svn path=/main/trunk/; revision=9372
-rwxr-xr-xbin/emerge-webrsync11
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index 6b9aa96be..ee9cb7d45 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -219,11 +219,20 @@ do_snapshot() {
local have_files=0
local mirror
+ local compressions=""
+ type lzcat > /dev/null && compressions="${compressions} lzma"
+ type bzcat > /dev/null && compressions="${compressions} bz2"
+ type zcat > /dev/null && compressions="${compressions} gz"
+ if [[ -z ${compressions} ]] ; then
+ eecho "unable to locate any decompressors (lzcat or bzcat or zcat)"
+ exit 1
+ fi
+
for mirror in ${GENTOO_MIRRORS} ; do
vecho "Trying to retrieve ${date} snapshot from ${mirror} ..."
- for compression in lzma bz2 gz ; do
+ for compression in ${compressions} ; do
local file="portage-${date}.tar.${compression}"
local digest="${file}.md5sum"
local signature="${file}.gpgsig"