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 CC931138334 for ; Mon, 5 Nov 2018 18:49:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 91CDEE0C63; Mon, 5 Nov 2018 18:49:05 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 58A8DE0C63 for ; Mon, 5 Nov 2018 18:49:04 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 8A58F335CA3 for ; Mon, 5 Nov 2018 18:49:02 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E60483DB for ; Mon, 5 Nov 2018 18:48:59 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1541443681.946cb7a9a690ac7f9c7222872d97b3df899441c9.mgorny@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/misc-functions.sh X-VCS-Directories: bin/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 946cb7a9a690ac7f9c7222872d97b3df899441c9 X-VCS-Branch: master Date: Mon, 5 Nov 2018 18:48:59 +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-Archives-Salt: 2796b686-eb4a-44b5-991d-e193c348ece7 X-Archives-Hash: cf0eda6e0782606d765fc83c4c87a455 commit: 946cb7a9a690ac7f9c7222872d97b3df899441c9 Author: Michał Górny gentoo org> AuthorDate: Wed Oct 31 16:44:43 2018 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Nov 5 18:48:01 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=946cb7a9 misc-functions.sh: Inline and reflow __prepall Inline the __prepall function into install_qa_check(), and reflow it to cover the code more correctly. The arbitrary split between these functions has resulted in mismatches, with e.g. prepstrip being covered by mtree flag saving but dostrip being accidentally omitted. Signed-off-by: Michał Górny gentoo.org> bin/misc-functions.sh | 48 ++++++++++++++++++++++-------------------------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index ff3d2a1ff..db7aaed5a 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -43,30 +43,6 @@ install_symlink_html_docs() { fi } -__prepall() { - if has chflags $FEATURES ; then - # Save all the file flags for restoration at the end of prepall. - mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree" - # Remove all the file flags so that prepall can do anything necessary. - chflags -R noschg,nouchg,nosappnd,nouappnd "${ED}" - chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null - fi - - [[ -d ${ED%/}/usr/share/info ]] && prepinfo - - # Apply compression. - "${PORTAGE_BIN_PATH}"/ecompress --queue "${PORTAGE_DOCOMPRESS[@]}" - "${PORTAGE_BIN_PATH}"/ecompress --ignore "${PORTAGE_DOCOMPRESS_SKIP[@]}" - "${PORTAGE_BIN_PATH}"/ecompress --dequeue - - ___eapi_has_dostrip || prepallstrip - - if has chflags $FEATURES ; then - # Restore all the file flags that were saved at the beginning of prepall. - mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null - fi -} - install_qa_check() { local d f i qa_var x paths qa_checks=() checks_run=() if ! ___eapi_has_prefix_variables; then @@ -123,13 +99,33 @@ install_qa_check() { ) done < <(printf "%s\0" "${qa_checks[@]}" | LC_ALL=C sort -u -z) - export STRIP_MASK - __prepall + if has chflags $FEATURES ; then + # Save all the file flags for restoration afterwards. + mtree -c -p "${ED}" -k flags > "${T}/bsdflags.mtree" + # Remove all the file flags so that we can do anything necessary. + chflags -R noschg,nouchg,nosappnd,nouappnd "${ED}" + chflags -R nosunlnk,nouunlnk "${ED}" 2>/dev/null + fi + + [[ -d ${ED%/}/usr/share/info ]] && prepinfo + + # Apply compression. + "${PORTAGE_BIN_PATH}"/ecompress --queue "${PORTAGE_DOCOMPRESS[@]}" + "${PORTAGE_BIN_PATH}"/ecompress --ignore "${PORTAGE_DOCOMPRESS_SKIP[@]}" + "${PORTAGE_BIN_PATH}"/ecompress --dequeue + export STRIP_MASK if ___eapi_has_dostrip; then "${PORTAGE_BIN_PATH}"/estrip --queue "${PORTAGE_DOSTRIP[@]}" "${PORTAGE_BIN_PATH}"/estrip --ignore "${PORTAGE_DOSTRIP_SKIP[@]}" "${PORTAGE_BIN_PATH}"/estrip --dequeue + else + prepallstrip + fi + + if has chflags $FEATURES ; then + # Restore all the file flags that were saved earlier on. + mtree -U -e -p "${ED}" -k flags < "${T}/bsdflags.mtree" &> /dev/null fi # Create NEEDED.ELF.2 regardless of RESTRICT=binchecks, since this info is