public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: "Justin Lecher (jlec)" <jlec@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] RFC: intel-sdp-r1.eclass
Date: Mon, 15 Feb 2016 15:55:15 +0100	[thread overview]
Message-ID: <20160215155515.3460aae2.mgorny@gentoo.org> (raw)
In-Reply-To: <56C1E3B6.9090108@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 3017 bytes --]

On Mon, 15 Feb 2016 15:41:58 +0100
"Justin Lecher (jlec)" <jlec@gentoo.org> wrote:

> On 15/02/16 15:35, Michał Górny wrote:
> > On Mon, 15 Feb 2016 14:37:41 +0100
> > "Justin Lecher (jlec)" <jlec@gentoo.org> wrote:
> >   
> >> On 15/02/16 13:59, Michał Górny wrote:  
> >>> On Mon, 15 Feb 2016 09:16:53 +0100
> >>> "Justin Lecher (jlec)" <jlec@gentoo.org> wrote:
> >>>     
> >>>> # @ECLASS-VARIABLE: INTEL_SUBDIR
> >>>> # @DEFAULT_UNSET
> >>>> # @DESCRIPTION:
> >>>> # The package sub-directory where it will end-up in /opt/intel
> >>>> # To find out its value, you have to do a raw install from the Intel tar ball    
> >>>
> >>> To be honest, I find this kinda terrible. There's a huge block of docs
> >>> which makes me feel small and confused. Maybe it'd useful to give some
> >>> semi-complete example on top (in global doc)?    
> >>
> >> That makes definitely make sense. We will add one.
> >>
> >> Although nobody other then the maintainer of this eclass will ever use it.  
> > 
> > Remember that maintainers can change. It's better to have good then
> > have new maintainers figure out all stuff over again.
> >   
> >>>> # e.g. CLI_install/rpm/intel-vtune-amplifier-xe-cli
> >>>> : ${INTEL_BIN_RPMS:=()}    
> >>>
> >>> $ : ${foo:=()}
> >>> $ declare -p foo
> >>> declare -- foo="()"
> >>>
> >>> In other words, it doesn't work the way you expect it to.    
> >>
> >> I already wondered about this. Is there any way to force a variable to
> >> be an array in bash? Or define it as an empty array?  
> > 
> > Look at e.g. python-utils-r1.
> > 
> > To check for array:
> > 
> >   if [[ $(declare -p foo) != "declare -a"* ]]; then
> >     ...
> >   fi
> > 
> > To default to empty, simple (yet a bit imperfect) way:
> > 
> >   [[ ${foo[@]} }] || foo=()  
> 
> And what about the default assignment for the man page?

Have no clue. I think someone mentioned some hack somewhere. Or maybe
we could finally fix eclass-manpages script to handle this.

> >>> Err, this is not code, you know.    
> >>
> >> This is needed for nice formatting. Otherwise there is no line break  
> > 
> > Add an empty line between the two. That should do it correctly, without
> > code blocks in devmanual.  
> 
> That will introduce an empty line between the two points.

Which is quite correct. And in any case, it's definitely not worse than
what you're causing now:

https://devmanual.gentoo.org/eclass-reference/intel-sdp.eclass/index.html

> >>> Wouldn't you be able to collapse that into one loop?    
> >>
> >> no, because the first has ${INTEL_X86}.rpm as suffeix and the later has
> >> ${INTEL_X86}.rpm.  
> > 
> > Errrrr... am I reading wrong, or did you just type the same thing twice?  
> 
> right, it should be ${INTEL_X86}.rpm vs noarch.rpm

Well, I think you still could handle this with some extra code
and conditionals, at least reduced code duplication.

-- 
Best regards,
Michał Górny
<http://dev.gentoo.org/~mgorny/>

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 949 bytes --]

  reply	other threads:[~2016-02-15 14:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-15  8:16 [gentoo-dev] RFC: intel-sdp-r1.eclass Justin Lecher (jlec)
2016-02-15 12:59 ` Michał Górny
2016-02-15 13:37   ` Justin Lecher (jlec)
2016-02-15 14:35     ` Michał Górny
2016-02-15 14:41       ` Justin Lecher (jlec)
2016-02-15 14:55         ` Michał Górny [this message]
2016-02-17  4:48       ` [gentoo-dev] " Ryan Hill
2016-02-17  6:47         ` Michał Górny
2016-02-17 10:53           ` Duncan
2016-02-17 11:09             ` David Seifert
2016-02-17 11:20             ` Michał Górny
2016-02-15 18:48     ` Martin Vaeth

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=20160215155515.3460aae2.mgorny@gentoo.org \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=jlec@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