public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: David Seifert <soap@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] [PATCH] font.eclass: Ban EAPIs < 5
Date: Sun, 20 Oct 2019 19:51:21 +0200	[thread overview]
Message-ID: <a7eefd13933a6f02b320760527dadd4fc18602bb.camel@gentoo.org> (raw)
In-Reply-To: <w6glftf9upr.fsf@kph.uni-mainz.de>

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



  reply	other threads:[~2019-10-20 17:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-20 16:50 [gentoo-dev] [PATCH] font.eclass: Ban EAPIs < 5 David Seifert
2019-10-20 17:45 ` Ulrich Mueller
2019-10-20 17:51   ` David Seifert [this message]
2019-10-20 18:57     ` Ulrich Mueller
2019-10-20 19:28       ` David Seifert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a7eefd13933a6f02b320760527dadd4fc18602bb.camel@gentoo.org \
    --to=soap@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox