1 |
-----BEGIN PGP SIGNED MESSAGE----- |
2 |
Hash: SHA1 |
3 |
|
4 |
On 09/04/2012 12:43 PM, Michał Górny wrote: |
5 |
> Hello, |
6 |
> |
7 |
> As Sid Hayn raised today on #gentoo-portage, it would be useful to |
8 |
> finally have portage able to fetch updates from VCS-es independently |
9 |
> of src_unpack(). This could be used, for example, on machines |
10 |
> temporarily connected to the network -- one would then fetch files |
11 |
> while connected to the network, and perform the updates later. |
12 |
> |
13 |
> There are a few ways how we could handle that but the cleanest and most |
14 |
> universal one seems to be defining a src_fetch() phase function |
15 |
> in a future EAPI. |
16 |
> |
17 |
> In the EAPIs supporting src_fetch(), that phase function would be used |
18 |
> by PM when requesting the files to be fetched. A default_src_fetch() |
19 |
> will be declared as well, providing implementation-defined code |
20 |
> fetching files like they are fetched now. Older EAPIs will simply |
21 |
> always use that default. |
22 |
> |
23 |
> The phase function would be disjoint from the normal merge process, |
24 |
> much like pkg_pretend(). In portage, it will be called as 'portage' |
25 |
> user if FEATURES=userfetch is enabled. |
26 |
> |
27 |
> VCS eclasses supporting separated fetching would define two phase |
28 |
> functions: |
29 |
> - src_fetch() which would be responsible for fetching updates, |
30 |
> - src_unpack() which would be responsible for checking out the source |
31 |
> to work directory. |
32 |
> |
33 |
> The remaining issue is handling dependencies on the tools necessary to |
34 |
> do fetching. For default_src_fetch(), we can assume that the package |
35 |
> manager provides the necessary tools. For custom src_fetch(), we would |
36 |
> need either to: |
37 |
> |
38 |
> 1) require satisfying whole DEPEND when fetching -- probably pointless, |
39 |
> as it will make --fetchonly almost impossible when doing initial |
40 |
> installs; |
41 |
> |
42 |
> 2) introduce a new dependency type (please do not get into details how |
43 |
> we do it -- we will discuss that another time, at the moment please |
44 |
> just keep it as 'new dependency type') -- and we probably end up |
45 |
> having a switch for --fetchonly without installing deps (thus |
46 |
> omitting packages where they are not satisfied), and with deps; |
47 |
> |
48 |
> 3) [ugly!] assume that src_fetch() should check for its deps and fail |
49 |
> if they are not satisfied. If that's mostly for live ebuilds, it may |
50 |
> be acceptable. Then the package manager will just have one 'fetch |
51 |
> failed' on --fetchonly (or early pre-fetch), and it will have to |
52 |
> invoke src_fetch() after satisfying the deps, before src_unpack(). |
53 |
|
54 |
I believe the easiest (and honestly most sane) method is to simply have |
55 |
src_fetch in the live classes check for needed deps and die (with a |
56 |
"please emerge blah") if deps are not found. Adding something like |
57 |
FDEPEND just seems to be getting way too crazy on the dependency tree |
58 |
AND would require things to build during fetch-only which doesn't make |
59 |
sense. |
60 |
|
61 |
Thanks, |
62 |
Zero |
63 |
> |
64 |
> What do you think? What are your ideas, suggestions? |
65 |
> |
66 |
|
67 |
-----BEGIN PGP SIGNATURE----- |
68 |
Version: GnuPG v2.0.19 (GNU/Linux) |
69 |
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ |
70 |
|
71 |
iQIcBAEBAgAGBQJQRjTjAAoJEKXdFCfdEflKGPoP+wYhzeFNcXO9Lv4qm5/oPXuC |
72 |
RIrCs2q6erWxowFbiTO//XILVbiH1nHBWx/uJV9S0hTM+dBRIh/zZaCXy5PYnLrK |
73 |
dTKiHgmpNPgTQ41QGI7BZl4lQFGLgGfdJnCncSTLmLZQtMGwXD4jZ8SQ/QE1wbwK |
74 |
rpHtYQ/Z5kUKFJG25MRFtFZ2ifZQVpVIPmmrFfyDh+1l9Oh8AtF6XKZTriwX1ppG |
75 |
osPz8jo2XtoYejqvD0kFEZwc5C7FKmULYyrB+tcl5dmOgf60LvcDTBkUGi7U2ewk |
76 |
DWhVoLX0zXWMZfoEi3c6GRsJgZ81yXIMfPC+SUYipdfBvdH6iWYuxfgJpSioUtbV |
77 |
s4xC4IyOGQehnt8OAe5PpHHJcqxlDVXidmVz0sKkmJB3dM6rIsamiNZajmKVrnyh |
78 |
1zle8g4XBP8AFg/fB+OiOSuYNoI5GnC2D/rp7zAtajl+0GtVWvApPUFEa0DP8LlR |
79 |
bYXMIGpx+LAi9rYlEdNs3tW1C4OVjZpCKYU7cjNO15f2ZOVX4WNmAWtRmpoG6O5l |
80 |
zL1Mv6DRgdtoITfYfogupZBgjynHsCzKL1Mb2skqtmJ853ZjV4HGgXqxcica12O7 |
81 |
EoJ65EU5rrzCGSUz5rqunNwK9A11VBjxXWJ/e29NKt2vACxRuiwMXkl7EK2a/oCA |
82 |
pTBk5q6CvQFJCyzw2bee |
83 |
=ueCf |
84 |
-----END PGP SIGNATURE----- |