1 |
On Tue, Sep 4, 2012 at 12:43 PM, Michał Górny <mgorny@g.o> wrote: |
2 |
> Hello, |
3 |
> |
4 |
> As Sid Hayn raised today on #gentoo-portage, it would be useful to |
5 |
> finally have portage able to fetch updates from VCS-es independently |
6 |
> of src_unpack(). This could be used, for example, on machines |
7 |
> temporarily connected to the network -- one would then fetch files |
8 |
> while connected to the network, and perform the updates later. |
9 |
> |
10 |
> There are a few ways how we could handle that but the cleanest and most |
11 |
> universal one seems to be defining a src_fetch() phase function |
12 |
> in a future EAPI. |
13 |
> |
14 |
> In the EAPIs supporting src_fetch(), that phase function would be used |
15 |
> by PM when requesting the files to be fetched. A default_src_fetch() |
16 |
> will be declared as well, providing implementation-defined code |
17 |
> fetching files like they are fetched now. Older EAPIs will simply |
18 |
> always use that default. |
19 |
> |
20 |
> The phase function would be disjoint from the normal merge process, |
21 |
> much like pkg_pretend(). In portage, it will be called as 'portage' |
22 |
> user if FEATURES=userfetch is enabled. |
23 |
> |
24 |
> VCS eclasses supporting separated fetching would define two phase |
25 |
> functions: |
26 |
> - src_fetch() which would be responsible for fetching updates, |
27 |
> - src_unpack() which would be responsible for checking out the source |
28 |
> to work directory. |
29 |
|
30 |
The 'checking out' language for src_unpack() sounds like it assumes a |
31 |
DVCS such as mercurial or git. What about cvs or svn, where fetching |
32 |
is also checking out? (This is probably a trivial thing to clear up, |
33 |
though.) |
34 |
|
35 |
Also, where would the local copy go? distfiles? It's common for |
36 |
distfiles to be stored on, e.g. an NFS mount, so you may need to be |
37 |
careful not to place repositories there which have filesystem |
38 |
semantics that are disagreeable to NFS. (The only example I know of |
39 |
off the top of my head is svn, where the documentation warns against |
40 |
using the dbd backend on top of NFS.) |
41 |
|
42 |
Other common remote mounts (such as cifs) may have restrictions that |
43 |
could force munging of filenames, too, and VCS infrastructures (or |
44 |
even unpacked checkouts with strange filenames) placed on those |
45 |
filesystems may have unanticipated results. |
46 |
|
47 |
It may be helpful to have some kind of adapter mount in place, or even |
48 |
generate a tarball of the local copy and store that instead. (That'd |
49 |
be problematic if multiple boxes were modifying the local copy on the |
50 |
same share, but that's obviously problematic anyway.) |
51 |
|
52 |
-- |
53 |
:wq |