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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id E93B8158086 for ; Fri, 24 Dec 2021 16:09:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 388DF2BC00E; Fri, 24 Dec 2021 16:09:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id ABC252BC00E for ; Fri, 24 Dec 2021 16:09:26 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9C425343282 for ; Fri, 24 Dec 2021 16:09:25 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 34BC91BF for ; Fri, 24 Dec 2021 16:09:24 +0000 (UTC) From: "Mike Gilbert" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Gilbert" Message-ID: <1640362113.8007a8a22364aeaefc7c4219c4b06efe347f05a1.floppym@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/openssh/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/openssh/openssh-8.8_p1-r4.ebuild X-VCS-Directories: net-misc/openssh/ X-VCS-Committer: floppym X-VCS-Committer-Name: Mike Gilbert X-VCS-Revision: 8007a8a22364aeaefc7c4219c4b06efe347f05a1 X-VCS-Branch: master Date: Fri, 24 Dec 2021 16:09:24 +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: 7ebb7b1d-3c94-465d-8268-19e28bb77489 X-Archives-Hash: d5df02df5cc20206ca43db10747b6791 commit: 8007a8a22364aeaefc7c4219c4b06efe347f05a1 Author: Mike Gilbert gentoo org> AuthorDate: Fri Dec 24 16:08:33 2021 +0000 Commit: Mike Gilbert gentoo org> CommitDate: Fri Dec 24 16:08:33 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8007a8a2 net-misc/openssh: rework pkg_pretend code Signed-off-by: Mike Gilbert gentoo.org> net-misc/openssh/openssh-8.8_p1-r4.ebuild | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/net-misc/openssh/openssh-8.8_p1-r4.ebuild b/net-misc/openssh/openssh-8.8_p1-r4.ebuild index 38b10330277e..0160b1ecb4ac 100644 --- a/net-misc/openssh/openssh-8.8_p1-r4.ebuild +++ b/net-misc/openssh/openssh-8.8_p1-r4.ebuild @@ -92,16 +92,14 @@ BDEPEND=" pkg_pretend() { # this sucks, but i'd rather have people unable to `emerge -u openssh` # than not be able to log in to their server any more - maybe_fail() { [[ -z ${!2} ]] && echo "$1" ; } - local fail=" - $(use hpn && maybe_fail hpn HPN_VER) - $(use sctp && maybe_fail sctp SCTP_PATCH) - $(use X509 && maybe_fail X509 X509_PATCH) - " - fail=$(echo ${fail}) - if [[ -n ${fail} ]] ; then + local missing=() + check_feature() { use "${1}" && [[ -z ${!2} ]] && missing+=( "${1}" ); } + check_feature hpn HPN_VER + check_feature sctp SCTP_PATCH + check_feature X509 X509_PATCH + if [[ ${#missing[@]} -ne 0 ]] ; then eerror "Sorry, but this version does not yet support features" - eerror "that you requested: ${fail}" + eerror "that you requested: ${missing[*]}" eerror "Please mask ${PF} for now and check back later:" eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask" die "Missing requested third party patch."