Re: [gentoo-dev] [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) [2]

2007-12-31 Thread Marius Mauch
On Mon, 31 Dec 2007 14:40:57 +
Ciaran McCreesh <[EMAIL PROTECTED]> wrote:

> On Mon, 31 Dec 2007 15:33:51 +0100
> Marius Mauch <[EMAIL PROTECTED]> wrote:
> > - silently expands the scope of EAPI beyond ebuild contents (which is
> > a blocker for me)
> 
> That already happened with EAPI 1 and slot deps.

Not really. Just because slot deps are included in EAPI 1 doesn't mean that 
they have to be supported everywhere. The complete atom specification should be 
a separate versioned document, and EAPI references version X of it and the 
profile specification references version Y, simple as that.

Marius
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-dev] [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) [2]

2007-12-31 Thread Piotr Jaroszyński
On Monday 31 of December 2007 15:33:51 Marius Mauch wrote:
> Still doesn't address my concerns, namely:
> - silently expands the scope of EAPI beyond ebuild contents (which is a
> blocker for me)

And what is the reason for not doing exactly that? Seems logical to me. And 
btw. slot deps added in EAPI 1 seems to have similiar impact, you can't use 
them in ebuilds using EAPI 0 nor in profiles/.

> - doesn't mention compability issues on the dev side (minor)

Aren't new EAPIs introducing the same problem already? Devs should use up to 
date tools, and especially the devs running some checks on the whole tree.

-- 
Best Regards,
Piotr Jaroszyński
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-dev] [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) [2]

2007-12-31 Thread Ciaran McCreesh
On Mon, 31 Dec 2007 15:33:51 +0100
Marius Mauch <[EMAIL PROTECTED]> wrote:
> - silently expands the scope of EAPI beyond ebuild contents (which is
> a blocker for me)

That already happened with EAPI 1 and slot deps.

-- 
Ciaran McCreesh


signature.asc
Description: PGP signature


Re: [gentoo-dev] [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) [2]

2007-12-31 Thread Marius Mauch
On Sat, 22 Dec 2007 16:43:10 +0100
Piotr Jaroszyński <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> I have updated the GLEP, hopefully it is less confusing now and hence the 
> discussion 
> will be more technical.

Still doesn't address my concerns, namely:
- silently expands the scope of EAPI beyond ebuild contents (which is a
blocker for me)
- doesn't mention compability issues on the dev side (minor)

Marius
-- 
[EMAIL PROTECTED] mailing list



Re: [gentoo-dev] [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) [2]

2007-12-22 Thread Piotr Jaroszyński
On Saturday 22 of December 2007 18:56:12 Daniel Drake wrote:
> Why (in terms of your GLEP) are you still allowing ebuilds to set EAPI
> inside the ebuild?
>
> It seems that one approach you might take is to move the EAPI selection
> into the filename and remove it from the ebuild itself, and it's not
> clear to me why your proposal isn't exactly that.

That's the goal, yes. The "Specification" part shows how to do that in a 
backward compatible way and the "Application" part says how is the new format 
supposed to be used. But seeing it's not clear enough I will look into it.

-- 
Best Regards,
Piotr Jaroszyński
--
[EMAIL PROTECTED] mailing list



Re: [gentoo-dev] [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) [2]

2007-12-22 Thread Daniel Drake

Piotr Jaroszyński wrote:
I have updated the GLEP, hopefully it is less confusing now and hence 
the discussion will be more technical.


As I still didn't get the "ok to commit" from our glep folks, read the 
most current version here:


http://dev.gentoo.org/~peper/glep-0055.html

http://dev.gentoo.org/~peper/glep-0055.txt


Haven't read the previous discussion, apologies if this has been 
clarified already, but I think it would be good to answer the following 
question in the GLEP:


Why (in terms of your GLEP) are you still allowing ebuilds to set EAPI 
inside the ebuild?


It seems that one approach you might take is to move the EAPI selection 
into the filename and remove it from the ebuild itself, and it's not 
clear to me why your proposal isn't exactly that.


Thanks,
Daniel

--
[EMAIL PROTECTED] mailing list



[gentoo-dev] [GLEP] Use EAPI-suffixed ebuilds (.ebuild-EAPI) [2]

2007-12-22 Thread Piotr Jaroszyński
Hello,

I have updated the GLEP, hopefully it is less confusing now and hence the 
discussion will be more technical.

As I still didn't get the "ok to commit" from our glep folks, read the most 
current version here:
http://dev.gentoo.org/~peper/glep-0055.html
http://dev.gentoo.org/~peper/glep-0055.txt

-- 
Best Regards,
Piotr Jaroszyński
GLEP: 55
Title: Use EAPI-suffixed ebuilds (.ebuild-EAPI)
Version: $Revision: $
Last-Modified: $Date: $
Author: Piotr Jaroszyński <[EMAIL PROTECTED]>
Status: Draft
Type: Standards Track
Content-Type: text/x-rst
Created: 17-Dec-2007
Post-History: 17-Dec-2007, 22-Dec-2007

  "A little learning is a dangerous thing; drink deep, or taste not the Pierian
  spring: there shallow draughts intoxicate the brain, and drinking largely
  sobers us again."

  -- Alexander Pope, An Essay on Criticism

Abstract


This GLEP proposes usage of EAPI-suffixed file extensions for ebuilds (for
example, foo-1.2.3.ebuild-1).

Problem
===

The current way of specifying the EAPI in ebuilds is flawed. In order to get the
EAPI the package manager needs to source the ebuild, which itself needs the EAPI
in the first place. Otherwise it imposes a serious limitation, namely every 
ebuild,
using any of the future EAPIs, will have to be source'able by old package
managers and hence there is no way to:

  *  Change behaviour of inherit in any way (for example, to extend or change
 eclass functionality).

  *  Add new global scope functions in any sane way.

  *  Extend versioning rules in an EAPI - for example, addition of the scm
 suffix - GLEP54 [#GLEP54]_.


Abstract solution
=

A solution to this problem has to lift those limitations and the only way to do
it is to make the EAPI of an ebuild available to the package managers in a way
that doesn't require them to source the ebuild. Another important requirement is
for the solution to be backward compatible, which has the pleasant side-effect
of making the solution applicable in the Gentoo tree right away. Opposed to
waiting an arbitrary amount of time, which is never long enough anyway, as the
issues listed on the common portage problems page - [#PortageProblems]_ - show.

Proposed solution
=

The proposed solution is to use EAPI-suffixed file extensions for ebuilds. This
allows package managers to trivially read the EAPI from the ebuild filename. It
is also backward compatible, because currently ebuilds are recognised by the
``.ebuild`` file extension and hence EAPI-suffixed ebuilds are simply ignored by
the package managers.


Specification
=

Let's call the EAPI included in the ebuild filename the pre-source EAPI, and the
EAPI set inside the ebuild the post-source EAPI. Given these two, the final EAPI
used by the ebuild can be established by following these steps:

  *  If the pre-source EAPI is not set it defaults to 0.
  *  If the pre-source EAPI is not recognised it is returned immediately.
  *  If the post-source EAPI is not set, it defaults to the pre-source EAPI.
  *  post-source EAPI is returned.

The above process should be only used to generate the metadata cache. Should the
pre-source EAPI be unsupported the cache entry cannot be generated.

Ebuilds with unsupported EAPIs are masked.

QA tools should consider it an error for both EAPIs to be set explicitly to
different values. Package managers may warn, but must use the post-source EAPI
in such cases.

Examples:

  *  ``pkg-1.ebuild``, no EAPI set inside the ebuild
   pre-source EAPI defaults 0, post-source EAPI defaults to pre-source EAPI.
   EAPI 0 is used.

  *  ``pkg-2.ebuild-1``, no EAPI set inside the ebuild
   pre-source EAPI is 1, post-source EAPI defaults to pre-source EAPI.
   EAPI 1 is used.

  *  ``pkg-3.ebuild``, ``EAPI="1"``
   pre-source EAPI defaults to 0, post-source EAPI is 1.
   EAPI 1 is used.

  *  ``pkg-4.ebuild-2``, ``EAPI="1"``
   pre-source EAPI is 2, post-source EAPI is 1.
   EAPI 1 is used, but note that one should **never** explicitly set both
   EAPIs to different values.

  *  ``pkg-5.ebuild-2``, no EAPI set inside the ebuild, package manager not 
supporting EAPI 2
   pre-source EAPI is 2, post-source EAPI is never checked.
   ebuild masked because of the unsupported pre-source EAPI.

  *  ``pkg-6.ebuild``, ``EAPI="2"``, package manager not supporting EAPI 2
   pre-source EAPI defaults to 0, post-source EAPI is 2 (assuming the
   package manager didn't die when sourcing the ebuild thinking that EAPI 0
   is used).
   ebuild masked because of the unsupported post-source EAPI.

Note that it is still not permitted to have more than one ebuild with equal
category, package name, and version. Although it would have the advantage of
allowing to provide backward compatible ebuilds, it would introduce problems
too. The first is the requirement to have strict EAPI ordering, the second is
ensuring that all the ebuilds for a single category/package-ve