1 |
As suggested by ssuominen on bug #311101, I am posting the issue |
2 |
to the mailing list. |
3 |
|
4 |
Currently, various SCM eclasses differ very much in the subset |
5 |
of features and control variables implemented. The idea is to establish |
6 |
a single subset of such variables and rules for all SCM eclasses |
7 |
to follow, and maybe even develop a common scm.eclass which would be |
8 |
sourced by other SCM eclasses. |
9 |
|
10 |
Variables suggested by me: |
11 |
|
12 |
a) Common variables - the variables which would have to be used by |
13 |
various SCM eclasses as default/fallback values. |
14 |
|
15 |
1. ESCM_DISTDIR (defaulting to PORTAGE_ACTUAL_DISTDIR/PORTDIR) |
16 |
- an alternate parent dir to all SCM stores. It would be useful |
17 |
if user would like to use an small file-inefficient filesystem |
18 |
for main DISTDIR or rsync it with other machine (where SCM |
19 |
files are not as important as the tarballs are). |
20 |
|
21 |
2. ESCM_OFFLINE (most eclasses use it already) |
22 |
- a common switch to easily switch off all network interaction. |
23 |
|
24 |
3. ESCM_LIVE_FAIL_IF_REPO_NOT_UPDATED (similar to the one in git.eclass) |
25 |
- a common switch to force unpack() phase to fail if no updates |
26 |
were found during the pull/update. |
27 |
|
28 |
b) Common eclass-specific variables - these ones should allow user to |
29 |
override above variables for single SCM. |
30 |
|
31 |
1. E*_STORE_DIR (defaulting to ${ESCM_DISTDIR}/*-src) |
32 |
- already used by few eclasses, allowing user to change |
33 |
the location where SCM-specific clones are stored. |
34 |
|
35 |
2. E*_OFFLINE (defaulting to ${ESCM_OFFLINE}) |
36 |
- allowing user to override global 'offline switch'. Thus, it |
37 |
should also support setting 'false' value to enable network |
38 |
interaction for single SCM. |
39 |
|
40 |
3. E*_LIVE_FAIL_... |
41 |
- another override for the global one. |
42 |
|
43 |
4. E*_REPO_URI |
44 |
- the URI to the main repository. It might be extended to support |
45 |
multiple URIs. |
46 |
|
47 |
5. E*_REVISION |
48 |
- explicit expected-revision/tag specification, preferably along |
49 |
with implicit one (e.g. in ESVN_REPO_URI) deprecation. |
50 |
This would allow applications to easily distinguish |
51 |
between 'real' live ebuilds and snapshot ones fetching directly |
52 |
from the repo. |
53 |
|
54 |
c) Common export variables - these ones should be exported by SCM eclass |
55 |
and stored in environment.bz2 after successful emerge. |
56 |
|
57 |
1. E*_VERSION (or _REVISION, or ...) |
58 |
- the version/revision to which the package was updated. This would |
59 |
be useful to determine whether the current repo is newer |
60 |
than one used when merging package. |
61 |
|
62 |
2. E*_WC_PATH |
63 |
- the absolute path to the last-used clone dir (i.e. |
64 |
${E*_STORE_DIR}/sth) and thus the most probable location |
65 |
to perform further updates in. |
66 |
|
67 |
d) Other: |
68 |
|
69 |
1. ESCM_CUSTOM_FETCH |
70 |
- this one is not directly related to eclasses but for use of ebuild |
71 |
authors. Setting this in an ebuild should notice applications |
72 |
that the ebuild does use custom fetching procedures |
73 |
(i.e. fetches from multiple repositories in a manner |
74 |
unsupported directly by the eclass) and thus external |
75 |
applications should not try to update the repository themselves. |
76 |
|
77 |
-- |
78 |
Best regards, |
79 |
Michał Górny |
80 |
|
81 |
<http://mgorny.alt.pl> |
82 |
<xmpp:mgorny@××××××.ru> |