Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 362923 - app-portage/eclass-manpages: Need support for @ECLASS-ARRAY
Summary: app-portage/eclass-manpages: Need support for @ECLASS-ARRAY
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-10 18:09 UTC by Samuli Suominen (RETIRED)
Modified: 2011-04-30 07:41 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Samuli Suominen (RETIRED) gentoo-dev 2011-04-10 18:09:08 UTC
xfconf.eclass supports XFCONF as an array, but has no support for it as an variable.  this is by design.

the eclass-manpages lacks support for describing this, I propose to clone the code of @ECLASS-VARIABLE to @ECLASS-ARRAY to create a proper manpage.
Comment 1 SpanKY gentoo-dev 2011-04-10 20:17:46 UTC
an array is a variable.  i'm guessing you mean scalar vs array.

you could make this clearer by simply mentioning it in the @DESCRIPTION.  i dont think a new tag is necessary to convey information to people.

also, i'm guessing the reason you picked an array over a scalar was to handle whitespace correctly ... but your usage of the array in the src_configure is wrong which makes it kind of pointless.  you need to be doing `econf "${XFCONF[@]}"` so that the args are expanded correctly.

if you want to sanity check people, it's fairly easy to add to your eclass:
if [[ ${XFCONF+set} == "set" ]] && [[ $(typeset -p XFCONF) != "declare -a XFCONF="* ]] ; then
    die "XFCONF needs to be an array, not a scalar"
fi
Comment 2 Samuli Suominen (RETIRED) gentoo-dev 2011-04-30 07:41:58 UTC
(In reply to comment #1)
> an array is a variable.  i'm guessing you mean scalar vs array.
> 
> you could make this clearer by simply mentioning it in the @DESCRIPTION.  i
> dont think a new tag is necessary to convey information to people.

Fair enough, done

> also, i'm guessing the reason you picked an array over a scalar was to handle
> whitespace correctly ... but your usage of the array in the src_configure is
> wrong which makes it kind of pointless.  you need to be doing `econf
> "${XFCONF[@]}"` so that the args are expanded correctly.

Yeah, fixed, thanks

> 
> if you want to sanity check people, it's fairly easy to add to your eclass:
> if [[ ${XFCONF+set} == "set" ]] && [[ $(typeset -p XFCONF) != "declare -a
> XFCONF="* ]] ; then
>     die "XFCONF needs to be an array, not a scalar"
> fi

Nice one, but I don't think we really need that.   Thanks anyway

Closing, nothing really left to do here