FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 08-18-2012, 03:25 AM
Mike Frysinger
 
Default Add dointo && newinto.

On Thursday 16 August 2012 16:19:44 Michał Górny wrote:
> --- a/eutils.eclass
> +++ b/eutils.eclass
>
> +# Install all specified <file>s into <directory>. This doesn't modify global
> +# 'insinto' path. Alike doins, calls 'die' on failure in EAPI 4+; in earlier
> +# EAPIs, returns false in that case.

i don't really see the point in differentiating here. we have plenty of
helpers that have always implicitly called die regardless of the EAPI level,
and it's not like you'd be breaking any existing behavior since no one is
using this already. and even then, you'd be "breaking" builds that were
already broken.

> +dointo() {
> + [[ ${#} -gt 2 ]] || die 'Synopsis: dointo <directory> <file> [...]'

"Usage" is the standard prefix, not "Synopsis"

style wise, {} around #/@/1/2/3/4/5/6/7/8/9/? variables is noise imo
-mike
 
Old 08-18-2012, 07:21 AM
Michał Górny
 
Default Add dointo && newinto.

On Fri, 17 Aug 2012 23:25:10 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> On Thursday 16 August 2012 16:19:44 Michał Górny wrote:
> > --- a/eutils.eclass
> > +++ b/eutils.eclass
> >
> > +# Install all specified <file>s into <directory>. This doesn't
> > modify global +# 'insinto' path. Alike doins, calls 'die' on
> > failure in EAPI 4+; in earlier +# EAPIs, returns false in that case.
>
> i don't really see the point in differentiating here. we have plenty
> of helpers that have always implicitly called die regardless of the
> EAPI level, and it's not like you'd be breaking any existing behavior
> since no one is using this already. and even then, you'd be
> "breaking" builds that were already broken.

Maybe. Alternatively, I could end up doing doins || die || die. It will
work but what's the point?

> > +dointo() {
> > + [[ ${#} -gt 2 ]] || die 'Synopsis: dointo <directory>
> > <file> [...]'
>
> "Usage" is the standard prefix, not "Synopsis"

Fixed.

--
Best regards,
Michał Górny
 
Old 08-18-2012, 03:45 PM
Mike Frysinger
 
Default Add dointo && newinto.

On Saturday 18 August 2012 03:21:20 Michał Górny wrote:
> On Fri, 17 Aug 2012 23:25:10 -0400 Mike Frysinger wrote:
> > On Thursday 16 August 2012 16:19:44 Michał Górny wrote:
> > > --- a/eutils.eclass
> > > +++ b/eutils.eclass
> > >
> > > +# Install all specified <file>s into <directory>. This doesn't
> > > modify global +# 'insinto' path. Alike doins, calls 'die' on
> > > failure in EAPI 4+; in earlier +# EAPIs, returns false in that case.
> >
> > i don't really see the point in differentiating here. we have plenty
> > of helpers that have always implicitly called die regardless of the
> > EAPI level, and it's not like you'd be breaking any existing behavior
> > since no one is using this already. and even then, you'd be
> > "breaking" builds that were already broken.
>
> Maybe. Alternatively, I could end up doing doins || die || die. It will
> work but what's the point?

the double die only kicks in with EAPI=4+, and even then is hidden to most
people at the code level. it also looks a lot better than:
(
insinto ... && doins ...
)
case ${EAPI:-0} in 0|1|2|3) [[ $? -ne 0 ]] && die ;; esac
vs
(insinto ... && doins ...) || die
-mike
 
Old 09-19-2012, 05:45 AM
Mike Frysinger
 
Default Add dointo && newinto.

were you going to post an updated version for merging ?
-mike
 
Old 09-19-2012, 07:51 AM
Michał Górny
 
Default Add dointo && newinto.

On Wed, 19 Sep 2012 01:45:04 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> were you going to post an updated version for merging ?

The whole idea was blocked by Diego, and was submitted for the next
Council meeting.

--
Best regards,
Michał Górny
 

Thread Tools




All times are GMT. The time now is 05:43 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org