Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Subject: [gentoo-python] PYTHON_USEDEP - '?' vs '(-)?' USE-deps
Date: Tue, 22 Jan 2013 16:11:03
Message-Id: 20130122171128.65d22f6c@pomiocik.lan
1 Hello,
2
3 There has been some debate whether we should be using plain '?'
4 USE-dependencies or the USE-default form '(-)?'. I have reviewed
5 the practical differences between them (using portage), and I'd like
6 to shortly summarize them.
7
8 Just for clarity, the general problem: dev-python/foo depends
9 on dev-python/setuptools. Therefore, the Python implementations enabled
10 in dev-python/foo, need to be enabled (and supported) in setuptools
11 as well.
12
13
14 The 'flag?' syntax requires the dependency to have flag in IUSE
15 (the implementation in PYTHON_COMPAT). If it's not there, the package
16 does not satisfy the dependency *even if* the flag is disabled.
17
18 IOW, dev-python/foo deps on dev-python/bar. foo has python3_3
19 in PYTHON_COMPAT, bar-2 does not. Even people with python3_3 disabled
20 won't be able to emerge bar-2 as a dependency of foo.
21
22 The 'flag(-)?' syntax assumes that a missing flag in the dependency
23 is equivalent to the flag being disabled. In this particular case, it
24 means that the dependency won't be satisfied if py3.3 is enabled.
25
26
27 That was for the formal part. Now the practical implications.
28
29 1. No version of the dependency supports the requested implementation:
30
31 portage: with both variants, refuses to merge the package, shows a bit
32 about missing USE flags
33
34 repoman: with 'flag?' variant, complains about it for most profiles with
35 an error of missing dep. with 'flag(-)?' variant, no errors nor
36 warnings.
37
38 +1 for 'flag?'
39
40
41 2. The newest version of the dependency doesn't support the requested
42 implementation:
43
44 portage:
45 - with 'flag?', always uses the older version,
46 - with 'flag(-)?', uses the older version only if the unsupported
47 implementation is enabled.
48
49 repoman: no errors nor warnings.
50
51 +1 for 'flag(-)?'
52
53
54 I'd say that the both cases are not 'good enough'. 'flag?' is a bit
55 saner for QA, 'flag(-)?' for when QA fails (and people use repoman
56 --force because they NEED that python3.3 so much)...
57
58 Maybe we should make repoman more paranoid about missing flags
59 in the first place?
60
61 --
62 Best regards,
63 Michał Górny

Attachments

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