Re: [gentoo-dev] When the version scheme changes

2008-06-29 Thread Rémi Cardona

Hi Marijn,

Marijn Schouten (hkBst) wrote:

PV=${PV/0./}


MY_PV=...

As others have said, PV is read only.


to that new ebuild. This is the cleanest way to do it and doesn't require any
variable name changes or any other changes to the ebuild regardless of what it
does. Unfortunately it is also illegal per current PMS as PV is a read-only
variable. Right now I feel that the gain of having PV read-only (catch a few
bugs?) is much lower than the pain (extensive ebuild-dependend changes when the
version scheme changes). Please comment.


It's a pain, but then again, your old ebuilds are likely to go away as 
time passes, and the various hacks you've put in them will be long 
forgotten :)


There are only a couple cases were having PV writeable is a good idea. 
But let's keep this part of our ebuilds simple.


Right now, the section in devmanual that talks about PV is really short. 
Keeping it that way seems a good idea for potential new comers and old 
timers (that may forget stuff as time goes on) alike.


My 2 euro ¢

Cheers

Rémi
--
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] When the version scheme changes

2008-06-29 Thread Santiago M. Mola
On Sun, Jun 29, 2008 at 9:41 PM, Marijn Schouten (hkBst)
<[EMAIL PROTECTED]> wrote:
>
> The benefit is being able to automatically reversion an ebuild. Reversioning 
> may
> not be necessary very often, but it's annoying when it is and there is no good
> reason that it should. There is no benefit in keeping the version variables
> read-only.
>
> Marijn
>

I think that doing "PV=${PV/0./}" is asking for trouble, even if we
had a function for reseting it after the change. In any case it should
be a function like reset_pv ${PV/0./} which keeps other variables (P,
S...) consistent. Also, this would imply an EAPI bump.

I doubt this change is worth the trouble.

Regards,
-- 
Santiago M. Mola
Jabber ID: [EMAIL PROTECTED]
-- 
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] When the version scheme changes

2008-06-29 Thread Marijn Schouten (hkBst)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marius Mauch wrote:
> On Sun, 29 Jun 2008 18:20:06 +0200
> "Marijn Schouten (hkBst)" <[EMAIL PROTECTED]> wrote:
> 
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Marius Mauch wrote:
>>> On Sun, 29 Jun 2008 15:52:37 +0200
>>> "Marijn Schouten (hkBst)" <[EMAIL PROTECTED]> wrote:
>>>
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Bo Ørsted Andresen wrote:
> On Saturday 28 June 2008 17:03:13 Marijn Schouten (hkBst) wrote:
>> PV=${PV/0./}
>>
>> to that new ebuild. This is the cleanest way to do it and doesn't
>> require any variable name changes or any other changes to the
>> ebuild regardless of what it does. Unfortunately it is also
>> illegal per current PMS as PV is a read-only variable. Right now
>> I feel that the gain of having PV read-only (catch a few bugs?)
>> is much lower than the pain (extensive ebuild-dependend changes
>> when the version scheme changes). Please comment.
> I don't really see how making PV not read-only is any easier than
> using MY_PV. Did you expect changing PV to magically change P, PVR
> and PF too?
 If we can agree to have those values writable we could define a
 function that will handle resetting all those too.
>>> Not going to happen. These variables are used internally by portage
>>> in various ways, and making their content inconsistent with the
>>> version in the filename is likely to cause subtle bugs and/or weird
>>> behavior. Besides, you've yet to explain the benefit of it, short
>>> of avoiding a simple replace operation in an ebuild, and the given
>>> use case isn't all that common anyway.
>> Why can't portage use its own variables and export these with an
>> initial value but not use them further?
> 
> Because there is no need to create even more variables when there is
> absolutely no benefit.

The benefit is being able to automatically reversion an ebuild. Reversioning may
not be necessary very often, but it's annoying when it is and there is no good
reason that it should. There is no benefit in keeping the version variables
read-only.

Marijn

- --
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
, #gentoo-{lisp,ml} on FreeNode
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhn5XkACgkQp/VmCx0OL2xBgwCfbOtDaJ27kj1A2CbO95dkrkZb
x0MAn1usfmfaktYA83MoiukBvlXIuuUN
=BQs/
-END PGP SIGNATURE-
-- 
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] When the version scheme changes

2008-06-29 Thread Marius Mauch
On Sun, 29 Jun 2008 18:20:06 +0200
"Marijn Schouten (hkBst)" <[EMAIL PROTECTED]> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Marius Mauch wrote:
> > On Sun, 29 Jun 2008 15:52:37 +0200
> > "Marijn Schouten (hkBst)" <[EMAIL PROTECTED]> wrote:
> > 
> >> -BEGIN PGP SIGNED MESSAGE-
> >> Hash: SHA1
> >>
> >> Bo Ørsted Andresen wrote:
> >>> On Saturday 28 June 2008 17:03:13 Marijn Schouten (hkBst) wrote:
>  PV=${PV/0./}
> 
>  to that new ebuild. This is the cleanest way to do it and doesn't
>  require any variable name changes or any other changes to the
>  ebuild regardless of what it does. Unfortunately it is also
>  illegal per current PMS as PV is a read-only variable. Right now
>  I feel that the gain of having PV read-only (catch a few bugs?)
>  is much lower than the pain (extensive ebuild-dependend changes
>  when the version scheme changes). Please comment.
> >>> I don't really see how making PV not read-only is any easier than
> >>> using MY_PV. Did you expect changing PV to magically change P, PVR
> >>> and PF too?
> >> If we can agree to have those values writable we could define a
> >> function that will handle resetting all those too.
> > 
> > Not going to happen. These variables are used internally by portage
> > in various ways, and making their content inconsistent with the
> > version in the filename is likely to cause subtle bugs and/or weird
> > behavior. Besides, you've yet to explain the benefit of it, short
> > of avoiding a simple replace operation in an ebuild, and the given
> > use case isn't all that common anyway.
> 
> Why can't portage use its own variables and export these with an
> initial value but not use them further?

Because there is no need to create even more variables when there is
absolutely no benefit.

Marius
--
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] When the version scheme changes

2008-06-29 Thread Marijn Schouten (hkBst)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Marius Mauch wrote:
> On Sun, 29 Jun 2008 15:52:37 +0200
> "Marijn Schouten (hkBst)" <[EMAIL PROTECTED]> wrote:
> 
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Bo Ørsted Andresen wrote:
>>> On Saturday 28 June 2008 17:03:13 Marijn Schouten (hkBst) wrote:
 PV=${PV/0./}

 to that new ebuild. This is the cleanest way to do it and doesn't
 require any variable name changes or any other changes to the
 ebuild regardless of what it does. Unfortunately it is also
 illegal per current PMS as PV is a read-only variable. Right now I
 feel that the gain of having PV read-only (catch a few bugs?) is
 much lower than the pain (extensive ebuild-dependend changes when
 the version scheme changes). Please comment.
>>> I don't really see how making PV not read-only is any easier than
>>> using MY_PV. Did you expect changing PV to magically change P, PVR
>>> and PF too?
>> If we can agree to have those values writable we could define a
>> function that will handle resetting all those too.
> 
> Not going to happen. These variables are used internally by portage in
> various ways, and making their content inconsistent with the version in
> the filename is likely to cause subtle bugs and/or weird behavior.
> Besides, you've yet to explain the benefit of it, short of avoiding a
> simple replace operation in an ebuild, and the given use case isn't all
> that common anyway.

Why can't portage use its own variables and export these with an initial value
but not use them further?

Marijn

- --
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
, #gentoo-{lisp,ml} on FreeNode
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhntjYACgkQp/VmCx0OL2yxdgCght6buiC3nTWqQiaADBOVR2Xw
ezYAnA57T74GJ6izX2mk8XuOX/c8MyL4
=zW3N
-END PGP SIGNATURE-
-- 
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] When the version scheme changes

2008-06-29 Thread Marius Mauch
On Sun, 29 Jun 2008 15:52:37 +0200
"Marijn Schouten (hkBst)" <[EMAIL PROTECTED]> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Bo Ørsted Andresen wrote:
> > On Saturday 28 June 2008 17:03:13 Marijn Schouten (hkBst) wrote:
> >> PV=${PV/0./}
> >>
> >> to that new ebuild. This is the cleanest way to do it and doesn't
> >> require any variable name changes or any other changes to the
> >> ebuild regardless of what it does. Unfortunately it is also
> >> illegal per current PMS as PV is a read-only variable. Right now I
> >> feel that the gain of having PV read-only (catch a few bugs?) is
> >> much lower than the pain (extensive ebuild-dependend changes when
> >> the version scheme changes). Please comment.
> > 
> > I don't really see how making PV not read-only is any easier than
> > using MY_PV. Did you expect changing PV to magically change P, PVR
> > and PF too?
> 
> If we can agree to have those values writable we could define a
> function that will handle resetting all those too.

Not going to happen. These variables are used internally by portage in
various ways, and making their content inconsistent with the version in
the filename is likely to cause subtle bugs and/or weird behavior.
Besides, you've yet to explain the benefit of it, short of avoiding a
simple replace operation in an ebuild, and the given use case isn't all
that common anyway.

Marius
--
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] When the version scheme changes

2008-06-29 Thread Marijn Schouten (hkBst)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bo Ørsted Andresen wrote:
> On Saturday 28 June 2008 17:03:13 Marijn Schouten (hkBst) wrote:
>> PV=${PV/0./}
>>
>> to that new ebuild. This is the cleanest way to do it and doesn't require
>> any variable name changes or any other changes to the ebuild regardless of
>> what it does. Unfortunately it is also illegal per current PMS as PV is a
>> read-only variable. Right now I feel that the gain of having PV read-only
>> (catch a few bugs?) is much lower than the pain (extensive ebuild-dependend
>> changes when the version scheme changes). Please comment.
> 
> I don't really see how making PV not read-only is any easier than using 
> MY_PV. 
> Did you expect changing PV to magically change P, PVR and PF too?

If we can agree to have those values writable we could define a function that
will handle resetting all those too.

Marijn

- --
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
, #gentoo-{lisp,ml} on FreeNode
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhnk6UACgkQp/VmCx0OL2xJPgCghPdttL5ruS/qkoZzsrKn8WL7
9OAAn3FGZrQMRsRGHlmAgdf1uiyjuJH9
=EmW/
-END PGP SIGNATURE-
-- 
gentoo-dev@lists.gentoo.org mailing list



Re: [gentoo-dev] When the version scheme changes

2008-06-29 Thread Bo Ørsted Andresen
On Saturday 28 June 2008 17:03:13 Marijn Schouten (hkBst) wrote:
> PV=${PV/0./}
>
> to that new ebuild. This is the cleanest way to do it and doesn't require
> any variable name changes or any other changes to the ebuild regardless of
> what it does. Unfortunately it is also illegal per current PMS as PV is a
> read-only variable. Right now I feel that the gain of having PV read-only
> (catch a few bugs?) is much lower than the pain (extensive ebuild-dependend
> changes when the version scheme changes). Please comment.

I don't really see how making PV not read-only is any easier than using MY_PV. 
Did you expect changing PV to magically change P, PVR and PF too?

-- 
Bo Andresen
Gentoo KDE Dev


signature.asc
Description: This is a digitally signed message part.


[gentoo-dev] When the version scheme changes

2008-06-28 Thread Marijn Schouten (hkBst)
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi list,

recently drscheme changed versioning scheme in such a way that the newer
versions(4.0.1) rank lower than the old versions(372). The only way to affect
ordering is to change the PV part of the filename, preferably the old one, so I
created a 0.372 version that was to be a copy of the old 372 version. To make
this work I also added a

PV=${PV/0./}

to that new ebuild. This is the cleanest way to do it and doesn't require any
variable name changes or any other changes to the ebuild regardless of what it
does. Unfortunately it is also illegal per current PMS as PV is a read-only
variable. Right now I feel that the gain of having PV read-only (catch a few
bugs?) is much lower than the pain (extensive ebuild-dependend changes when the
version scheme changes). Please comment.

Marijn

- --
Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
, #gentoo-{lisp,ml} on FreeNode
-BEGIN PGP SIGNATURE-
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhmUrEACgkQp/VmCx0OL2wKcACePBrxQ9N6sQVenMLewf3fVR95
1fQAoIBIookA65il9e70Hqs3SgWaLaoT
=V0bU
-END PGP SIGNATURE-
-- 
gentoo-dev@lists.gentoo.org mailing list