Re: [gentoo-dev] Proposal for enhancement to PMS/EAPI7+

2016-05-18 Thread M. J. Everitt
On 18/05/16 07:43, Michał Górny wrote:
> On Wed, 18 May 2016 04:07:07 +0100
> "M. J. Everitt"  wrote:
>
>> I've just been party to a discussion over in the Proxy Maintainers
>> channel .. and the subject of correct ways to install documentation
>> popped up. It seems to me rather quirky, that there is no middle ground
>> in (for example) EAPI6 to have the default documentation installed per
>> https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-144003r4 , PLUS maybe
>> another folder or file(s). The existing framework ONLY allows *either*
>> /only/ the default documentation *or* an override through the DOCS=
>> variable.
>>
>> My idea thus, was inspired by the simple bash DOCS+= ( ) statement, that
>> would allow you to append files/folders to the installdocs list,
>> assuming that DOCS was pre-populated with an existing set of files.
>> Obviously the status quo is set for EAPI6 and algorithms defined, but
>> wondered if it could be considered for a future update/improvement cycle?!
> How is this going to work? In order to pre-populate it, you need to
> know the list of files. And the list of files isn't known until
> src_install(). In fact, with the current behavior it's not even known
> before einstalldocs is actually called, and changing that could break
> stuff.
>
At present the DOCS to be installed in the default function are
hard-coded into the PMS in 'einstalldocs' .. not exactly very good if
you decided later to change it?!



signature.asc
Description: OpenPGP digital signature


Re: [gentoo-dev] Proposal for enhancement to PMS/EAPI7+

2016-05-18 Thread Michał Górny
On Wed, 18 May 2016 04:07:07 +0100
"M. J. Everitt"  wrote:

> I've just been party to a discussion over in the Proxy Maintainers
> channel .. and the subject of correct ways to install documentation
> popped up. It seems to me rather quirky, that there is no middle ground
> in (for example) EAPI6 to have the default documentation installed per
> https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-144003r4 , PLUS maybe
> another folder or file(s). The existing framework ONLY allows *either*
> /only/ the default documentation *or* an override through the DOCS=
> variable.
> 
> My idea thus, was inspired by the simple bash DOCS+= ( ) statement, that
> would allow you to append files/folders to the installdocs list,
> assuming that DOCS was pre-populated with an existing set of files.
> Obviously the status quo is set for EAPI6 and algorithms defined, but
> wondered if it could be considered for a future update/improvement cycle?!

How is this going to work? In order to pre-populate it, you need to
know the list of files. And the list of files isn't known until
src_install(). In fact, with the current behavior it's not even known
before einstalldocs is actually called, and changing that could break
stuff.

-- 
Best regards,
Michał Górny



pgphWBhjvvOI9.pgp
Description: OpenPGP digital signature


Re: [gentoo-dev] Proposal for enhancement to PMS/EAPI7+

2016-05-18 Thread Ulrich Mueller
> On Wed, 18 May 2016, Kent Fredric wrote:

> On 18 May 2016 at 17:40, Ulrich Mueller  wrote:
>> Only two lines. Do you think this is untidy?

> It only becomes untidy where you don't already have a src_install.

> Then it becomes 4 lines.

> 4 lines of which 3 are redundant and simply re-codify existing
> behaviour.

Well, the tradeoff is between adding three lines to a few ebuilds, or
exporting a redundant DOCS variable to _every_ ebuild's environment.

Ulrich


pgp0501thOzf6.pgp
Description: PGP signature


Re: [gentoo-dev] Proposal for enhancement to PMS/EAPI7+

2016-05-17 Thread Sam Jorna
On Wed, May 18, 2016 at 05:44:28PM +1200, Kent Fredric wrote:
> On 18 May 2016 at 17:40, Ulrich Mueller  wrote:
> > Only two lines. Do you think this is untidy?
> 
> 
> It only becomes untidy where you don't already have a src_install.
> 
> Then it becomes 4 lines.
> 
> 4 lines of which 3 are redundant and simply re-codify existing behaviour.

Unless you define DOCS and include the default documents, which is an additional
78 characters on one line (excluding any potential globbing, and assuming all
default files are wanted).

-- 
Sam Jorna
GnuPG Key: D6180C26


signature.asc
Description: Digital signature


Re: [gentoo-dev] Proposal for enhancement to PMS/EAPI7+

2016-05-17 Thread Kent Fredric
On 18 May 2016 at 17:40, Ulrich Mueller  wrote:
> Only two lines. Do you think this is untidy?


It only becomes untidy where you don't already have a src_install.

Then it becomes 4 lines.

4 lines of which 3 are redundant and simply re-codify existing behaviour.


-- 
Kent

KENTNL - https://metacpan.org/author/KENTNL



Re: [gentoo-dev] Proposal for enhancement to PMS/EAPI7+

2016-05-17 Thread Ulrich Mueller
> On Wed, 18 May 2016, M J Everitt wrote:

> My idea thus, was inspired by the simple bash DOCS+= ( ) statement,
> that would allow you to append files/folders to the installdocs
> list, assuming that DOCS was pre-populated with an existing set of
> files. Obviously the status quo is set for EAPI6 and algorithms
> defined, but wondered if it could be considered for a future
> update/improvement cycle?!

This was already discussed three years ago in bug 449806, which was
closed as WONTFIX.

> There are methods (Again, quite clunky) to invoke the default
> method, amend the variable, repeat installdocs .. and/or do
> additional dodoc's manually, but I would have thought it was
> possible to incorporate into the core functions, and keep the ebuild
> tidy and clean (and short!).

Basically, in EAPI 6 you can do the following in src_install():

einstalldocs# or part of "default"
dodoc ANY ADDITIONAL DOC FILES

Only two lines. Do you think this is untidy?

Ulrich


pgp82t2zhUcGz.pgp
Description: PGP signature


[gentoo-dev] Proposal for enhancement to PMS/EAPI7+

2016-05-17 Thread M. J. Everitt
I've just been party to a discussion over in the Proxy Maintainers
channel .. and the subject of correct ways to install documentation
popped up. It seems to me rather quirky, that there is no middle ground
in (for example) EAPI6 to have the default documentation installed per
https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-144003r4 , PLUS maybe
another folder or file(s). The existing framework ONLY allows *either*
/only/ the default documentation *or* an override through the DOCS=
variable.

My idea thus, was inspired by the simple bash DOCS+= ( ) statement, that
would allow you to append files/folders to the installdocs list,
assuming that DOCS was pre-populated with an existing set of files.
Obviously the status quo is set for EAPI6 and algorithms defined, but
wondered if it could be considered for a future update/improvement cycle?!

There are methods (Again, quite clunky) to invoke the default method,
amend the variable, repeat installdocs .. and/or do additional dodoc's
manually, but I would have thought it was possible to incorporate into
the core functions, and keep the ebuild tidy and clean (and short!).

Already been shot down in flames in the IRC channel .. but going for a
second round, to see if there's anyone else similarly insane, who might
agree with me?!

MJE



signature.asc
Description: OpenPGP digital signature