summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2021-12-24 11:08:33 -0500
committerMike Gilbert <floppym@gentoo.org>2021-12-24 11:08:33 -0500
commit8007a8a22364aeaefc7c4219c4b06efe347f05a1 (patch)
treeafa95e5f939b0031c31486baceab9878419b2776 /net-misc
parentmedia-gfx/sane-backends: Stabilize 1.0.32 ppc64, #829924 (diff)
downloadgentoo-8007a8a22364aeaefc7c4219c4b06efe347f05a1.tar.gz
gentoo-8007a8a22364aeaefc7c4219c4b06efe347f05a1.tar.bz2
gentoo-8007a8a22364aeaefc7c4219c4b06efe347f05a1.zip
net-misc/openssh: rework pkg_pretend code
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/openssh/openssh-8.8_p1-r4.ebuild16
1 files 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."