Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 394211 - [Future EAPI] Add globbing support to the DOCS array
Summary: [Future EAPI] Add globbing support to the DOCS array
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
: 459054 (view as bug list)
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2011-12-10 05:13 UTC by Tim Harder
Modified: 2014-09-06 21:56 UTC (History)
2 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 Tim Harder gentoo-dev 2011-12-10 05:13:22 UTC
It would be nice to allow file globbing in the DOCS array so something like the following would work as expected:

DOCS=( doc/*.txt )

similar to how:

DOCS="doc/*.txt"

already is used in many ebuilds.
Comment 1 Ulrich Müller gentoo-dev 2011-12-10 09:35:37 UTC
I had always thought of it as a feature: Non-array DOCS gives you globbing support, whereas specifying it as an array allows for strange filenames with embedded spaces, stars, etc.
Comment 2 Tim Harder gentoo-dev 2011-12-10 09:43:22 UTC
(In reply to comment #1)
> I had always thought of it as a feature: Non-array DOCS gives you globbing
> support, whereas specifying it as an array allows for strange filenames with
> embedded spaces, stars, etc.

Sure, but certain eclasses inherit base.eclass which doesn't give you a choice.
Comment 3 Tim Harder gentoo-dev 2011-12-10 09:48:16 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > I had always thought of it as a feature: Non-array DOCS gives you globbing
> > support, whereas specifying it as an array allows for strange filenames with
> > embedded spaces, stars, etc.
> 
> Sure, but certain eclasses inherit base.eclass which doesn't give you a choice.

I should note that some eclasses, like the cmake-utils eclass provide backwards compatibility for non-array DOCS, but some don't.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-24 18:12:15 UTC
*** Bug 459054 has been marked as a duplicate of this bug. ***
Comment 5 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-02-24 18:14:45 UTC
  DOCS=( 'doc/*.txt' )

should it rather be.

Aside from that, I think the non-array syntax shall be eventually deprecated. However, I have no idea how to perform the expansion without losing spaces...
Comment 6 Ulrich Müller gentoo-dev 2013-02-24 19:47:03 UTC
(In reply to comment #5)
> Aside from that, I think the non-array syntax shall be eventually
> deprecated.

We have no choice but supporting it indefinitely for existing EAPIs. And it's widely used.
Comment 7 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2013-03-28 18:10:32 UTC
I'd say the EAPI-provided doc-install function shall solve one side of this.

The other is to use something like:

  src_install() {
    local DOCS=( doc/*.txt )
    default
  }

which is probably a little better since it's explicit on where the files will be found.
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2014-09-06 21:56:53 UTC
We have opposing goals here since bringing glob support will break whitespace and noglob character of the array. Since non-array DOCS work fine and there was no more replies in 1.5yr, I'm assuming this is a WONTFIX.