From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C769F1382C5 for ; Sun, 24 May 2020 23:49:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0C931E08AD; Sun, 24 May 2020 23:49:18 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6F467E08AD for ; Sun, 24 May 2020 23:49:17 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 33C9C34F00C for ; Sun, 24 May 2020 23:49:15 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8C5C21C8 for ; Sun, 24 May 2020 23:49:12 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1590363781.5508bf7a6db59149bbc9ad2ff45fb0329fb83644.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/ecompress X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: 5508bf7a6db59149bbc9ad2ff45fb0329fb83644 X-VCS-Branch: master Date: Sun, 24 May 2020 23:49:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a2eb70e6-158b-48ef-aadd-7060d5cafd04 X-Archives-Hash: 40d069e9f57528f15bf6c00bd3c94def commit: 5508bf7a6db59149bbc9ad2ff45fb0329fb83644 Author: Zac Medico gentoo org> AuthorDate: Sun May 24 21:02:06 2020 +0000 Commit: Zac Medico gentoo org> CommitDate: Sun May 24 23:43:01 2020 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5508bf7a ecompress: ignore docompress -x files in precompressed QA check (bug 721516) Ignore files passed to docompress -x in the QA check for precompressed files. Bug: https://bugs.gentoo.org/721516 Signed-off-by: Zac Medico gentoo.org> bin/ecompress | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/bin/ecompress b/bin/ecompress index dfa1a0b44..2d74ed07a 100755 --- a/bin/ecompress +++ b/bin/ecompress @@ -19,16 +19,28 @@ while [[ $# -gt 0 ]] ; do shift skip_dirs=() + skip_files=() for skip; do if [[ -d ${ED%/}/${skip#/} ]]; then skip_dirs+=( "${ED%/}/${skip#/}" ) else rm -f "${ED%/}/${skip#/}.ecompress" || die + skip_files+=("${ED%/}/${skip#/}") fi done if [[ ${#skip_dirs[@]} -gt 0 ]]; then - find "${skip_dirs[@]}" -name '*.ecompress' -delete || die + while read -r -d ''; do + skip_files+=(${REPLY#.ecompress}) + done < <(find "${skip_dirs[@]}" -name '*.ecompress' -print0 -delete || die) + fi + + if [[ ${#skip_files[@]} -gt 0 && -s ${T}/.ecompress_had_precompressed ]]; then + sed_args=() + for f in "${skip_files[@]}"; do + sed_args+=(-e "s|^${f}\$||") + done + sed "${sed_args[@]}" -e '/^$/d' -i "${T}/.ecompress_had_precompressed" || die fi exit 0 @@ -176,7 +188,7 @@ find "${ED}" -name '*.ecompress' -delete -print0 | ___parallel_xargs -0 "${PORTAGE_BIN_PATH}"/ecompress-file ret=${?} -if [[ -f ${T}/.ecompress_had_precompressed ]]; then +if [[ -s ${T}/.ecompress_had_precompressed ]]; then eqawarn "One or more compressed files were found in docompress-ed directories." eqawarn "Please fix the ebuild not to install compressed files (manpages," eqawarn "documentation) when automatic compression is used:"