Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 370225 - [Future EAPI] Support bash arrays for many standard ebuild-defined lists
Summary: [Future EAPI] Support bash arrays for many standard ebuild-defined lists
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2011-06-06 06:28 UTC by Michał Górny
Modified: 2019-03-08 06:15 UTC (History)
5 users (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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2011-06-06 06:28:57 UTC
Many of the standard ebuild variables contain lists of items, and those could be specified as bash arrays instead of quoted strings.

Those could be *DEPEND especially. Sometimes one likes to add a comment about a particular dependency listed there, and bash arrays would allow doing that nicely.

For example:

DEPEND="${RDEPEND}
	dev-foo/bar
	>=dev-bar/foo-4"
# bar DEP needed because of configure bug (#nnnnn)
# although upstream states foo-3 is enough, baz-7 forces using foo-4

Could be expressed as:

DEPEND=(
	${RDEPEND[@]}
	# configure bug (#nnnnn)
	dev-foo/bar
	# although upstream states foo-3 is enough, baz-7 forces using foo-4
	>=dev-bar/foo-4
)
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-07-09 20:46:27 UTC
Thinking about it more, it will probably be a good idea to introduce alternate grouping character with this since () has to be escaped in bash arrays; for example {}.
Comment 2 Ulrich Müller gentoo-dev 2019-03-04 07:46:55 UTC
Are you still pursuing this?