1 |
On Tue, 4 Sep 2012 13:02:36 -0400 |
2 |
Michael Mol <mikemol@×××××.com> wrote: |
3 |
|
4 |
> On Tue, Sep 4, 2012 at 12:43 PM, Michał Górny <mgorny@g.o> |
5 |
> wrote: |
6 |
> > Hello, |
7 |
> > |
8 |
> > As Sid Hayn raised today on #gentoo-portage, it would be useful to |
9 |
> > finally have portage able to fetch updates from VCS-es independently |
10 |
> > of src_unpack(). This could be used, for example, on machines |
11 |
> > temporarily connected to the network -- one would then fetch files |
12 |
> > while connected to the network, and perform the updates later. |
13 |
> > |
14 |
> > There are a few ways how we could handle that but the cleanest and |
15 |
> > most universal one seems to be defining a src_fetch() phase function |
16 |
> > in a future EAPI. |
17 |
> > |
18 |
> > In the EAPIs supporting src_fetch(), that phase function would be |
19 |
> > used by PM when requesting the files to be fetched. A |
20 |
> > default_src_fetch() will be declared as well, providing |
21 |
> > implementation-defined code fetching files like they are fetched |
22 |
> > now. Older EAPIs will simply always use that default. |
23 |
> > |
24 |
> > The phase function would be disjoint from the normal merge process, |
25 |
> > much like pkg_pretend(). In portage, it will be called as 'portage' |
26 |
> > user if FEATURES=userfetch is enabled. |
27 |
> > |
28 |
> > VCS eclasses supporting separated fetching would define two phase |
29 |
> > functions: |
30 |
> > - src_fetch() which would be responsible for fetching updates, |
31 |
> > - src_unpack() which would be responsible for checking out the |
32 |
> > source to work directory. |
33 |
> |
34 |
> The 'checking out' language for src_unpack() sounds like it assumes a |
35 |
> DVCS such as mercurial or git. What about cvs or svn, where fetching |
36 |
> is also checking out? (This is probably a trivial thing to clear up, |
37 |
> though.) |
38 |
|
39 |
They either stay with src_unpack() or do 'cvs up' in src_fetch() |
40 |
and just copy files over in src_unpack(). Anyway, that's what they do |
41 |
now -- update the copy in distfiles/cvs-src and then copy it. |
42 |
|
43 |
> Also, where would the local copy go? distfiles? It's common for |
44 |
> distfiles to be stored on, e.g. an NFS mount, so you may need to be |
45 |
> careful not to place repositories there which have filesystem |
46 |
> semantics that are disagreeable to NFS. (The only example I know of |
47 |
> off the top of my head is svn, where the documentation warns against |
48 |
> using the dbd backend on top of NFS.) |
49 |
|
50 |
The actual code will be eclass-dependent, so it will go whatever it |
51 |
goes now. No magic, no exherbo. Just plain phase function. |
52 |
|
53 |
-- |
54 |
Best regards, |
55 |
Michał Górny |