Gentoo Archives: gentoo-dev

From: Luca Barbato <lu_zero@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] A more natural (human-friendly) syntax for dependencies
Date: Sat, 22 Sep 2012 16:14:53
Message-Id: 505DE3BC.8060201@gentoo.org
In Reply to: [gentoo-dev] A more natural (human-friendly) syntax for dependencies by "Michał Górny"
1 On 09/22/2012 09:55 AM, Michał Górny wrote:
2 > Hello,
3 >
4 > The current dependency syntax:
5 >
6 > [VERSION-OP] PACKAGE-NAME ["-" PACKAGE-VERSION]
7 >
8 > suffers a few problems:
9
10 I like the current one your proposal seems quite a problem for a large
11 deal of usecases.
12
13 > 1. It is not really human-friendly.
14 >
15 > People don't say things like:
16 >
17 > I need newer than monkey-1.2.
18 >
19 > They say instead:
20 >
21 > I need monkey, newer than version 1.2.
22
23 "I need monkey-1.2 or newer" sounds natural to me.
24
25 > 2. With long package names and versions, it becomes hard-to-read.
26 >
27 > Consider the following:
28 >
29 > >=dev-foo/bar-very-long-my-name-is-4-beta-17
30 >
31 > Where does the version number start? And yes, this is a valid package
32 > name to our rules.
33
34
35 > 4. Adding, removing and changing versions is not friendly at all.
36 >
37 > Consider the following dep:
38 >
39 > >=dev-foo/bar-bas-bat-11.2.4_alpha
40 >
41 > Now, you want to bump the dep to 11.3. You need to find the version
42 > number, and modify it. Depending on the configuration, ^w is going to
43 > eat the whole package name or just a single component.
44
45 Use a better editor.
46
47 > Then, you want to remove the whole version. You need to first remove
48 > the version number, making sure it doesn't eat a bit of package name
49 > as well. Then, you have to go back to the beginning of the string,
50 > and remove the operator.
51
52 > PACKAGE-NAME [[*WSP] VERSION-OP [*WSP] PACKAGE-VERSION]]
53
54 whitespace as separator for atoms looks a huge can of worms waiting to
55 be opened. how you'd pass that to emerge? How you make a list of atoms?
56
57 Please try not fix/break what is not broken.
58
59 lu

Replies