Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 370225

Summary: [Future EAPI] Support bash arrays for many standard ebuild-defined lists
Product: Gentoo Hosted Projects Reporter: Michał Górny <mgorny>
Component: PMS/EAPIAssignee: PMS/EAPI <pms>
Status: RESOLVED OBSOLETE    
Severity: enhancement CC: binki, esigra, pacho, tomas, tsmksubc
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174380    

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?