1 |
commit: 4a0421e1768dccafd4f9edb77f61cc186afb18d3 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 10 00:29:27 2017 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 10 00:41:21 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4a0421e1 |
7 |
|
8 |
BinpkgExtractorAsync: use posix compatible head arguments (bug 640450) |
9 |
|
10 |
Fixes: b4b0e6b0aaa1 ("BinpkgExtractorAsync: remove trailer when decompressing binary packages") |
11 |
Bug: https://bugs.gentoo.org/640450 |
12 |
|
13 |
pym/_emerge/BinpkgExtractorAsync.py | 4 ++-- |
14 |
1 file changed, 2 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/pym/_emerge/BinpkgExtractorAsync.py b/pym/_emerge/BinpkgExtractorAsync.py |
17 |
index 07ba2a1b7..4468efde6 100644 |
18 |
--- a/pym/_emerge/BinpkgExtractorAsync.py |
19 |
+++ b/pym/_emerge/BinpkgExtractorAsync.py |
20 |
@@ -80,7 +80,7 @@ class BinpkgExtractorAsync(SpawnProcess): |
21 |
# SIGPIPE handling (128 + SIGPIPE) should be compatible with |
22 |
# assert_sigpipe_ok() that's used by the ebuild unpack() helper. |
23 |
self.args = [self._shell_binary, "-c", |
24 |
- ("cmd0=(head -c-%d -- %s) cmd1=(%s) cmd2=(tar -xp %s -C %s -f -); " + \ |
25 |
+ ("cmd0=(head -c %d -- %s) cmd1=(%s) cmd2=(tar -xp %s -C %s -f -); " + \ |
26 |
'"${cmd0[@]}" | "${cmd1[@]}" | "${cmd2[@]}"; ' + \ |
27 |
"p=(${PIPESTATUS[@]}) ; for i in {0..2}; do " + \ |
28 |
"if [[ ${p[$i]} != 0 && ${p[$i]} != %d ]] ; then " + \ |
29 |
@@ -90,7 +90,7 @@ class BinpkgExtractorAsync(SpawnProcess): |
30 |
"echo command $(eval \"echo \\\"'\\${cmd$i[*]}'\\\"\") " + \ |
31 |
"failed with status ${p[$i]} ; exit ${p[$i]} ; fi ; " + \ |
32 |
"exit 0 ;") % \ |
33 |
- (pkg_xpak.xpaksize, |
34 |
+ (pkg_xpak.filestat.st_size - pkg_xpak.xpaksize, |
35 |
portage._shell_quote(self.pkg_path), |
36 |
decomp_cmd, |
37 |
tar_options, |