Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: bin/
Date: Sun, 24 May 2020 23:49:18
Message-Id: 1590363781.5508bf7a6db59149bbc9ad2ff45fb0329fb83644.zmedico@gentoo
1 commit: 5508bf7a6db59149bbc9ad2ff45fb0329fb83644
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 24 21:02:06 2020 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun May 24 23:43:01 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5508bf7a
7
8 ecompress: ignore docompress -x files in precompressed QA check (bug 721516)
9
10 Ignore files passed to docompress -x in the QA check for
11 precompressed files.
12
13 Bug: https://bugs.gentoo.org/721516
14 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
15
16 bin/ecompress | 16 ++++++++++++++--
17 1 file changed, 14 insertions(+), 2 deletions(-)
18
19 diff --git a/bin/ecompress b/bin/ecompress
20 index dfa1a0b44..2d74ed07a 100755
21 --- a/bin/ecompress
22 +++ b/bin/ecompress
23 @@ -19,16 +19,28 @@ while [[ $# -gt 0 ]] ; do
24 shift
25
26 skip_dirs=()
27 + skip_files=()
28 for skip; do
29 if [[ -d ${ED%/}/${skip#/} ]]; then
30 skip_dirs+=( "${ED%/}/${skip#/}" )
31 else
32 rm -f "${ED%/}/${skip#/}.ecompress" || die
33 + skip_files+=("${ED%/}/${skip#/}")
34 fi
35 done
36
37 if [[ ${#skip_dirs[@]} -gt 0 ]]; then
38 - find "${skip_dirs[@]}" -name '*.ecompress' -delete || die
39 + while read -r -d ''; do
40 + skip_files+=(${REPLY#.ecompress})
41 + done < <(find "${skip_dirs[@]}" -name '*.ecompress' -print0 -delete || die)
42 + fi
43 +
44 + if [[ ${#skip_files[@]} -gt 0 && -s ${T}/.ecompress_had_precompressed ]]; then
45 + sed_args=()
46 + for f in "${skip_files[@]}"; do
47 + sed_args+=(-e "s|^${f}\$||")
48 + done
49 + sed "${sed_args[@]}" -e '/^$/d' -i "${T}/.ecompress_had_precompressed" || die
50 fi
51
52 exit 0
53 @@ -176,7 +188,7 @@ find "${ED}" -name '*.ecompress' -delete -print0 |
54 ___parallel_xargs -0 "${PORTAGE_BIN_PATH}"/ecompress-file
55 ret=${?}
56
57 -if [[ -f ${T}/.ecompress_had_precompressed ]]; then
58 +if [[ -s ${T}/.ecompress_had_precompressed ]]; then
59 eqawarn "One or more compressed files were found in docompress-ed directories."
60 eqawarn "Please fix the ebuild not to install compressed files (manpages,"
61 eqawarn "documentation) when automatic compression is used:"