summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-01 07:26:36 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-01 07:26:36 +0000
commitb8133ede0e82ff081c61b1ca11ab0213f7c4ba6f (patch)
treeab5d5060658b2f54b5794c97ecf135ebecfcf004
parentec48c11319f20bbcc3c8959ae106f5aa5e1130fb (diff)
downloadportage-b8133ede0e82ff081c61b1ca11ab0213f7c4ba6f.tar.gz
portage-b8133ede0e82ff081c61b1ca11ab0213f7c4ba6f.tar.bz2
portage-b8133ede0e82ff081c61b1ca11ab0213f7c4ba6f.zip
Detect an old version of tarsync and use bzip2 compression in that case.
svn path=/main/trunk/; revision=10056
-rwxr-xr-xbin/emerge-webrsync12
1 files changed, 9 insertions, 3 deletions
diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync
index fbb2cd509..a428a4059 100755
--- a/bin/emerge-webrsync
+++ b/bin/emerge-webrsync
@@ -173,8 +173,7 @@ sync_local() {
vecho "Syncing local tree ..."
- # tarsync-0.2.1 doesn't seem to support lzma compression.
- if [ "${file##*.}" != "lzma" ] && type -P tarsync > /dev/null; then
+ if type -P tarsync > /dev/null ; then
if ! tarsync $(vvecho -v) -s 1 -o portage -g portage -e /distfiles -e /packages -e /local "${file}" "${PORTDIR}"; then
eecho "tarsync failed; tarball is corrupt? (${file})"
return 1
@@ -221,7 +220,14 @@ do_snapshot() {
local mirror
local compressions=""
- type -P lzcat > /dev/null && compressions="${compressions} lzma"
+ # lzma is not supported in <=app-arch/tarsync-0.2.1, so use
+ # bz2 format if we have an old version of tarsync.
+ if type -P tarsync > /dev/null && \
+ portageq has_version / '<=app-arch/tarsync-0.2.1' ; then
+ true
+ else
+ type -P lzcat > /dev/null && compressions="${compressions} lzma"
+ fi
type -P bzcat > /dev/null && compressions="${compressions} bz2"
type -P zcat > /dev/null && compressions="${compressions} gz"
if [[ -z ${compressions} ]] ; then