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 8FB7F138334 for ; Sun, 20 Oct 2019 17:51:29 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6D577E0C47; Sun, 20 Oct 2019 17:51:26 +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 252F9E0C39 for ; Sun, 20 Oct 2019 17:51:26 +0000 (UTC) Received: from thinkpad.fritz.box (unknown [IPv6:2001:4060:c005:3f00:9491:b020:96bd:fae]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: soap) by smtp.gentoo.org (Postfix) with ESMTPSA id E3F5434C0A4 for ; Sun, 20 Oct 2019 17:51:24 +0000 (UTC) Message-ID: Subject: Re: [gentoo-dev] [PATCH] font.eclass: Ban EAPIs < 5 From: David Seifert To: gentoo-dev@lists.gentoo.org Date: Sun, 20 Oct 2019 19:51:21 +0200 In-Reply-To: References: <20191020165012.3498212-1-soap@gentoo.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Archives-Salt: 67b0aebf-e46f-4347-83e4-d4332edc08fe X-Archives-Hash: af2da0068ab04b484237ee09bd9b3108 On Sun, 2019-10-20 at 19:45 +0200, Ulrich Mueller wrote: > > > > > > On Sun, 20 Oct 2019, David Seifert wrote: > > - if [[ -e fonts.alias ]]; then > > - doins fonts.alias || die "failed to install > > fonts.alias" # TODO old EAPI cleanup > > - fi > > + [[ -e fonts.alias ]] && doins fonts.alias > > fi > > } > > Is the function's return value of any importance? The function will > now > return shell false if fonts.alias doesn't exist, while previously it > returned true. No. > > > - [[ -n ${DOCS} ]] && { dodoc ${DOCS} || die "docs installation > > failed" ; } # TODO old EAPI cleanup > > + einstalldocs > > > # install common docs > > - for commondoc in COPYRIGHT README{,.md,.txt} NEWS AUTHORS BUGS > > ChangeLog FONTLOG.txt; do > > + for commondoc in COPYRIGHT FONTLOG.txt; do > > [[ -s ${commondoc} ]] && dodoc ${commondoc} > > done > > This changes the set of installed files, if the DOCS variable is > defined. Is that intentional? > You mean if it's *not* defined? Yes, that's intentional in line with making eclasses behave around DOCS consistently. If that leads to installing READMEwin32.txt, then so be it. Importantly, this allows using DOCS as an array without copypasta-ing around the einstalldocs whitespace-list-vs-array handling code. > > - if [[ -e > > "${EROOT%/}"/etc/fonts/conf.avail/${conffile##*/} ]]; then > > - elog " ${conffile##*/}" > > - fi > > + [[ -e > > "${EROOT%/}"/etc/fonts/conf.avail/${conffile##*/} ]] && elog > > " ${conffile##*/}" > > This doesn't change any functionality, but it adds an overlong line > for > no good reason. The idea was to avoid if statements if you can use the more succinct form. > > Ulrich