1 |
On Sat, 19 Jun 2010 13:18:21 -0700 |
2 |
Brian Harring <ferringb@×××××.com> wrote: |
3 |
> From pkgcore's view, the 1st ':' is required- if there is no slot |
4 |
> dep, leave it empty. The second demarks the start of a repository |
5 |
> dep. |
6 |
|
7 |
I prefer the "always ::" form, simply because it's easier to go "if |
8 |
repo, then add ::repo" than it is to go "if repo, then add :repo, but |
9 |
also stick another : in there if we've not done a slot". What a repo |
10 |
dep looks like shouldn't change based upon whether there's also a slot |
11 |
dep there. |
12 |
|
13 |
> > Also note that that specifically only covers packages that are *in* |
14 |
> > the ::gentoo repository. The package you have installed *from* the |
15 |
> > gentoo repository is ::gentoo->/ or ::gentoo->installed . |
16 |
> |
17 |
> '->' doesn't work very well though; specifically, the '-' is allowed |
18 |
> as part of a repository name. Backtracking parsers can handle that |
19 |
> fine, it's just nonoptimal to have one of the splitter char's be part |
20 |
> of the allowed character set for a name. |
21 |
|
22 |
Eh, I'd hardly take "your parser must support a single character |
23 |
lookahead" to be a defining argument, especially when you consider the |
24 |
mess that's needed to split pkg-ver up. |
25 |
|
26 |
> @, or some other char that is explicitly disallow seems a better |
27 |
> choice. |
28 |
|
29 |
The rationale behind -> is that it reads clearly. ::from->to reads like |
30 |
what it does. Experience has shown that users do need and make use of |
31 |
both forms (although unfortunately they're less inclined to appreciate |
32 |
the difference between ::installed and ::/ ), so it's best to pick |
33 |
something they can eventually understand. |
34 |
|
35 |
On a semi-related note: real world experience has also shown that every |
36 |
time we've thought about using ::repo deps of any kind in a repository |
37 |
rather than a user context, it's been the wrong thing to do, and the |
38 |
right thing to do is almost always [feature(-)]. |
39 |
|
40 |
-- |
41 |
Ciaran McCreesh |