only try to fetch compression schemes which the host supports
authorMike Frysinger <vapier@gentoo.org>
Sat, 23 Feb 2008 01:20:48 +0000 (01:20 -0000)
committerMike Frysinger <vapier@gentoo.org>
Sat, 23 Feb 2008 01:20:48 +0000 (01:20 -0000)
svn path=/main/trunk/; revision=9372

bin/emerge-webrsync

index 6b9aa96be883dfd353ee11354acc952ea5a5aed7..ee9cb7d45af0bc97a641eb5a55da0ca8d0ce19e3 100755 (executable)
@@ -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"