Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: lu_zero@g.o
Subject: Re: [gentoo-dev] A more natural (human-friendly) syntax for dependencies
Date: Sat, 22 Sep 2012 16:32:08
Message-Id: 20120922183052.1d737256@pomiocik.lan
In Reply to: Re: [gentoo-dev] A more natural (human-friendly) syntax for dependencies by Luca Barbato
1 On Sat, 22 Sep 2012 18:13:48 +0200
2 Luca Barbato <lu_zero@g.o> wrote:
3
4 > On 09/22/2012 09:55 AM, Michał Górny wrote:
5 > > Hello,
6 > >
7 > > The current dependency syntax:
8 > >
9 > > [VERSION-OP] PACKAGE-NAME ["-" PACKAGE-VERSION]
10 > >
11 > > suffers a few problems:
12 >
13 > I like the current one your proposal seems quite a problem for a large
14 > deal of usecases.
15 >
16 > > 1. It is not really human-friendly.
17 > >
18 > > People don't say things like:
19 > >
20 > > I need newer than monkey-1.2.
21 > >
22 > > They say instead:
23 > >
24 > > I need monkey, newer than version 1.2.
25 >
26 > "I need monkey-1.2 or newer" sounds natural to me.
27
28 'monkey-1.2' or 'monkey version 1.2'? The former being a package name.
29
30 > > 4. Adding, removing and changing versions is not friendly at all.
31 > >
32 > > Consider the following dep:
33 > >
34 > > >=dev-foo/bar-bas-bat-11.2.4_alpha
35 > >
36 > > Now, you want to bump the dep to 11.3. You need to find the version
37 > > number, and modify it. Depending on the configuration, ^w is going
38 > > to eat the whole package name or just a single component.
39 >
40 > Use a better editor.
41
42 Which one has automagic atom stripping?
43
44 > > Then, you want to remove the whole version. You need to first remove
45 > > the version number, making sure it doesn't eat a bit of package name
46 > > as well. Then, you have to go back to the beginning of the string,
47 > > and remove the operator.
48 >
49 > > PACKAGE-NAME [[*WSP] VERSION-OP [*WSP] PACKAGE-VERSION]]
50 >
51 > whitespace as separator for atoms looks a huge can of worms waiting to
52 > be opened. how you'd pass that to emerge? How you make a list of
53 > atoms?
54
55 emerge 'foo >= 1.1' 'bar < 1.0'?
56 emerge foo '>=' 1.1 bar '<' 1.0?
57
58 And what do you mean by 'a list of atoms'? I don't see a single problem
59 parsing this syntax. It's a very simple stream of tokens.
60
61 > Please try not fix/break what is not broken.
62
63 So we're now switching Gentoo to EOL and just fixing bugs?
64
65 --
66 Best regards,
67 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies