Gentoo Archives: gentoo-dev

From: "Piotr Jaroszyński" <peper@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] GLEP 54 and hyphens in PV
Date: Thu, 28 May 2009 15:55:39
Message-Id: d77765540905280855m5158722aqeed6a3842fca7311@mail.gmail.com
In Reply to: Re: [gentoo-dev] GLEP 54 and hyphens in PV by "Marijn Schouten (hkBst)"
1 2009/5/28 Marijn Schouten (hkBst) <hkBst@g.o>:
2 > -----BEGIN PGP SIGNED MESSAGE-----
3 > Hash: SHA1
4 >
5 > Piotr Jaroszyński wrote:
6 >> 2009/5/28 Ulrich Mueller <ulm@g.o>:
7 >>>>>>>> On Thu, 28 May 2009, Tiziano Müller wrote:
8 >>>>> ${PORTDIR}/app-misc/foo/foo-1a_live.ebuild
9 >>>>> ${PORTDIR}/app-misc/foo-1a/foo-1a-live.ebuild
10 >>>> you probably mean:
11 >>>> ${PORTDIR}/app-misc/foo-1a/foo-1a.live.ebuild
12 >>> No, I mean what I had written, namely to use an underscore as
13 >>> separator, i.e., "_live". But when the version is just "live" alone,
14 >>> one would suppress the underscore for aesthetic reasons, i.e. instead
15 >>> of "foo-1a-_live" it would be "foo-1a-live".
16 >>>
17 >>>> but how would their vdb or binpkg names be unique?
18 >>>> vdb for example:
19 >>>> app-misc/foo-1a_live for app-misc/foo
20 >>> PN=foo, PV=1a_live => app-misc/foo-1a_live
21 >>>
22 >>>> app-misc/foo-1a_live for app-misc/foo-1a
23 >>> PN=foo-1a, PV=live => app-misc/foo-1a-live
24 >>>
25 >>>> am I missing something?
26 >>> Everything is easy, if you keep the following rule in mind:
27 >>>
28 >>>>> With our current versioning scheme the rule is very simple: ${P} is
29 >>>>> split into ${PN} and ${PV} at the last hyphen. This can be done in
30 >>>>> a straight forward way by regexp matching, and I would really hate
31 >>>>> to lose this nice property.
32 >>>> I don't understand why this property is important. Can you please
33 >>>> explain?
34 >>> See above, it automatically avoids any ambiguities in splitting P into
35 >>> PN and PV. And look at function "pkgsplit" in Portage: It can just
36 >>> treat PV as an opaque string.
37 >>>
38 >>> What would be the advantage to use a hyphen instead of an underscore?
39 >>
40 >> Mainly the thing you observed yourself - foo_live is a bit
41 >> inconsistent with current versions.
42 >
43 > Ulrich is proposing foo-live if live is the entire version, foo_live is not a
44 > legal `package name and version'. (It could be a package name though.)
45
46 I know, it's also inconsistent. Anyway that's really not that
47 important. We could forbid package names that end with a -$PV where
48 $PV is a valid version spec. That would make package names like foo-1b
49 invalid (didn't see anything named like that in the tree anyway).
50
51 >> The case you mention can be avoided with another restriction in PMS.
52 >> Buut we might as well go all the way and change the version separator
53 >> to -- or something, which would be the most flexible.
54 >
55 > That would also be a good solution though we don't seem to need it yet. It would
56 > also entail compatibility issues.
57
58 Not with g55.
59
60 --
61 Best Regards,
62 Piotr Jaroszyński