Gentoo Archives: gentoo-commits

From: Mike Gilbert <floppym@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/openssh/
Date: Fri, 24 Dec 2021 16:09:27
Message-Id: 1640362113.8007a8a22364aeaefc7c4219c4b06efe347f05a1.floppym@gentoo
1 commit: 8007a8a22364aeaefc7c4219c4b06efe347f05a1
2 Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 24 16:08:33 2021 +0000
4 Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 24 16:08:33 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8007a8a2
7
8 net-misc/openssh: rework pkg_pretend code
9
10 Signed-off-by: Mike Gilbert <floppym <AT> gentoo.org>
11
12 net-misc/openssh/openssh-8.8_p1-r4.ebuild | 16 +++++++---------
13 1 file changed, 7 insertions(+), 9 deletions(-)
14
15 diff --git a/net-misc/openssh/openssh-8.8_p1-r4.ebuild b/net-misc/openssh/openssh-8.8_p1-r4.ebuild
16 index 38b10330277e..0160b1ecb4ac 100644
17 --- a/net-misc/openssh/openssh-8.8_p1-r4.ebuild
18 +++ b/net-misc/openssh/openssh-8.8_p1-r4.ebuild
19 @@ -92,16 +92,14 @@ BDEPEND="
20 pkg_pretend() {
21 # this sucks, but i'd rather have people unable to `emerge -u openssh`
22 # than not be able to log in to their server any more
23 - maybe_fail() { [[ -z ${!2} ]] && echo "$1" ; }
24 - local fail="
25 - $(use hpn && maybe_fail hpn HPN_VER)
26 - $(use sctp && maybe_fail sctp SCTP_PATCH)
27 - $(use X509 && maybe_fail X509 X509_PATCH)
28 - "
29 - fail=$(echo ${fail})
30 - if [[ -n ${fail} ]] ; then
31 + local missing=()
32 + check_feature() { use "${1}" && [[ -z ${!2} ]] && missing+=( "${1}" ); }
33 + check_feature hpn HPN_VER
34 + check_feature sctp SCTP_PATCH
35 + check_feature X509 X509_PATCH
36 + if [[ ${#missing[@]} -ne 0 ]] ; then
37 eerror "Sorry, but this version does not yet support features"
38 - eerror "that you requested: ${fail}"
39 + eerror "that you requested: ${missing[*]}"
40 eerror "Please mask ${PF} for now and check back later:"
41 eerror " # echo '=${CATEGORY}/${PF}' >> /etc/portage/package.mask"
42 die "Missing requested third party patch."