Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r10057 - main/branches/2.1.2/bin
Date: Thu, 01 May 2008 07:27:34
Message-Id: E1JrTCW-0000Lw-5S@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-05-01 07:27:31 +0000 (Thu, 01 May 2008)
3 New Revision: 10057
4
5 Modified:
6 main/branches/2.1.2/bin/emerge-webrsync
7 Log:
8 Detect an old version of tarsync and use bzip2 compression in that case.
9 (trunk r10056)
10
11
12 Modified: main/branches/2.1.2/bin/emerge-webrsync
13 ===================================================================
14 --- main/branches/2.1.2/bin/emerge-webrsync 2008-05-01 07:26:36 UTC (rev 10056)
15 +++ main/branches/2.1.2/bin/emerge-webrsync 2008-05-01 07:27:31 UTC (rev 10057)
16 @@ -173,8 +173,7 @@
17
18 vecho "Syncing local tree ..."
19
20 - # tarsync-0.2.1 doesn't seem to support lzma compression.
21 - if [ "${file##*.}" != "lzma" ] && type -P tarsync > /dev/null; then
22 + if type -P tarsync > /dev/null ; then
23 if ! tarsync $(vvecho -v) -s 1 -o portage -g portage -e /distfiles -e /packages -e /local "${file}" "${PORTDIR}"; then
24 eecho "tarsync failed; tarball is corrupt? (${file})"
25 return 1
26 @@ -221,7 +220,14 @@
27 local mirror
28
29 local compressions=""
30 - type -P lzcat > /dev/null && compressions="${compressions} lzma"
31 + # lzma is not supported in <=app-arch/tarsync-0.2.1, so use
32 + # bz2 format if we have an old version of tarsync.
33 + if type -P tarsync > /dev/null && \
34 + portageq has_version / '<=app-arch/tarsync-0.2.1' ; then
35 + true
36 + else
37 + type -P lzcat > /dev/null && compressions="${compressions} lzma"
38 + fi
39 type -P bzcat > /dev/null && compressions="${compressions} bz2"
40 type -P zcat > /dev/null && compressions="${compressions} gz"
41 if [[ -z ${compressions} ]] ; then
42
43 --
44 gentoo-commits@l.g.o mailing list