1 |
On 03/24/10 11:28, Michał Górny wrote: |
2 |
> As suggested by ssuominen on bug #311101, I am posting the issue |
3 |
> to the mailing list. |
4 |
> |
5 |
> Currently, various SCM eclasses differ very much in the subset |
6 |
> of features and control variables implemented. The idea is to establish |
7 |
> a single subset of such variables and rules for all SCM eclasses |
8 |
> to follow, and maybe even develop a common scm.eclass which would be |
9 |
> sourced by other SCM eclasses. |
10 |
|
11 |
Overall: I like the idea of common vcs.eclass - that would make easier not only |
12 |
to use/write ebuilds using various VCS'es but also to maintain the eclasses. |
13 |
|
14 |
> Variables suggested by me: |
15 |
> |
16 |
> a) Common variables - the variables which would have to be used by |
17 |
> various SCM eclasses as default/fallback values. |
18 |
> |
19 |
> 1. ESCM_DISTDIR (defaulting to PORTAGE_ACTUAL_DISTDIR/PORTDIR) |
20 |
> - an alternate parent dir to all SCM stores. It would be useful |
21 |
> if user would like to use an small file-inefficient filesystem |
22 |
> for main DISTDIR or rsync it with other machine (where SCM |
23 |
> files are not as important as the tarballs are). |
24 |
> |
25 |
> 2. ESCM_OFFLINE (most eclasses use it already) |
26 |
> - a common switch to easily switch off all network interaction. |
27 |
> |
28 |
> 3. ESCM_LIVE_FAIL_IF_REPO_NOT_UPDATED (similar to the one in git.eclass) |
29 |
> - a common switch to force unpack() phase to fail if no updates |
30 |
> were found during the pull/update. |
31 |
|
32 |
What about ESCM_REVISION defaulting to empty value meaning to use head/tip/etc |
33 |
revision? |
34 |
|
35 |
> b) Common eclass-specific variables - these ones should allow user to |
36 |
> override above variables for single SCM. |
37 |
> |
38 |
> 1. E*_STORE_DIR (defaulting to ${ESCM_DISTDIR}/*-src) |
39 |
> - already used by few eclasses, allowing user to change |
40 |
> the location where SCM-specific clones are stored. |
41 |
|
42 |
Is it really necessary? Can't we switch to one, common vcs-src/ (or something |
43 |
like this) directory? |
44 |
|
45 |
> 2. E*_OFFLINE (defaulting to ${ESCM_OFFLINE}) |
46 |
> - allowing user to override global 'offline switch'. Thus, it |
47 |
> should also support setting 'false' value to enable network |
48 |
> interaction for single SCM. |
49 |
|
50 |
If there's a ESCM_OFFLINE is it necessary to copy the information again to |
51 |
vcs-specific eclasses? I don't think so. In other words: I don't think that |
52 |
copying variables from parent eclass to vcs-specific one has any point. |
53 |
|
54 |
> 3. E*_LIVE_FAIL_... |
55 |
> - another override for the global one. |
56 |
> |
57 |
> 4. E*_REPO_URI |
58 |
> - the URI to the main repository. It might be extended to support |
59 |
> multiple URIs. |
60 |
> |
61 |
> 5. E*_REVISION |
62 |
> - explicit expected-revision/tag specification, preferably along |
63 |
> with implicit one (e.g. in ESVN_REPO_URI) deprecation. |
64 |
> This would allow applications to easily distinguish |
65 |
> between 'real' live ebuilds and snapshot ones fetching directly |
66 |
> from the repo. |
67 |
> |
68 |
> c) Common export variables - these ones should be exported by SCM eclass |
69 |
> and stored in environment.bz2 after successful emerge. |
70 |
> |
71 |
> 1. E*_VERSION (or _REVISION, or ...) |
72 |
> - the version/revision to which the package was updated. This would |
73 |
> be useful to determine whether the current repo is newer |
74 |
> than one used when merging package. |
75 |
> |
76 |
> 2. E*_WC_PATH |
77 |
> - the absolute path to the last-used clone dir (i.e. |
78 |
> ${E*_STORE_DIR}/sth) and thus the most probable location |
79 |
> to perform further updates in. |
80 |
> |
81 |
> d) Other: |
82 |
> |
83 |
> 1. ESCM_CUSTOM_FETCH |
84 |
> - this one is not directly related to eclasses but for use of ebuild |
85 |
> authors. Setting this in an ebuild should notice applications |
86 |
> that the ebuild does use custom fetching procedures |
87 |
> (i.e. fetches from multiple repositories in a manner |
88 |
> unsupported directly by the eclass) and thus external |
89 |
> applications should not try to update the repository themselves. |
90 |
|
91 |
Overall: looks good. It would be extremely helpful if we could discuss an actual |
92 |
implementation, setting up a repo and starting work there may be an awesome idea. |
93 |
|
94 |
-- |
95 |
Krzysztof Pawlik <nelchael at gentoo.org> key id: 0xF6A80E46 |
96 |
desktop-misc, java, apache, ppc, vim, kernel, python... |