Gentoo Archives: gentoo-dev

From: "Rick \\\"Zero_Chaos\\\" Farina" <zerochaos@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [Future EAPI] src_fetch() phase function to support VCS fetching
Date: Tue, 04 Sep 2012 17:01:08
Message-Id: 5046341E.5050209@gentoo.org
In Reply to: [gentoo-dev] [Future EAPI] src_fetch() phase function to support VCS fetching by "Michał Górny"
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 If you insist on using real names mine is Rick ;-)
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 most
15 > 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 used
19 > by PM when requesting the files to be fetched. A default_src_fetch()
20 > will be declared as well, providing implementation-defined code
21 > fetching files like they are fetched now. Older EAPIs will simply
22 > 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 source
32 > to work directory.
33 >
34 > The remaining issue is handling dependencies on the tools necessary to
35 > do fetching. For default_src_fetch(), we can assume that the package
36 > manager provides the necessary tools. For custom src_fetch(), we would
37 > need either to:
38 >
39 > 1) require satisfying whole DEPEND when fetching -- probably pointless,
40 > as it will make --fetchonly almost impossible when doing initial
41 > installs;
42 >
43 > 2) introduce a new dependency type (please do not get into details how
44 > we do it -- we will discuss that another time, at the moment please
45 > just keep it as 'new dependency type') -- and we probably end up
46 > having a switch for --fetchonly without installing deps (thus
47 > omitting packages where they are not satisfied), and with deps;
48 >
49 > 3) [ugly!] assume that src_fetch() should check for its deps and fail
50 > if they are not satisfied. If that's mostly for live ebuilds, it may
51 > be acceptable. Then the package manager will just have one 'fetch
52 > failed' on --fetchonly (or early pre-fetch), and it will have to
53 > invoke src_fetch() after satisfying the deps, before src_unpack().
54 >
55 > What do you think? What are your ideas, suggestions?
56 >
57
58 -----BEGIN PGP SIGNATURE-----
59 Version: GnuPG v2.0.19 (GNU/Linux)
60 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
61
62 iQIcBAEBAgAGBQJQRjQeAAoJEKXdFCfdEflKdDAP/jyV8+NwEBX+etKq7e+qzbVg
63 oIgjqOLfqYEmbEkO9WMsUltsf8YATy9zGB1itRiLUb5v+eptjEDvp2dx/AA4YVio
64 RLYwtMBJsESXd6d+3PbCTeoZHTZwb7ue6yY+qC0auyC4mD6nrkDY8swungcDwFHN
65 GZ99gAtRnQ5h8+phrKHyWzePTkBN5+32GCIn2XfRwMo+T0tGyTeMGqYfPJPlEu0y
66 LNJmdBU0TfzE7N8QA4sp/IDQQvBmZNpH6aQM+zkJWpvBUXBATdIPZZHBAy55TWaJ
67 t9KxiHD6XF/h0ShlTIpsbfSj31FTil2l/LfhAQdXSrB4GPxLaoovOJb2vl9L+ZyP
68 QJclNeL1kNaOO1MIm20tGJOV6Wh0iHsn/fJlbh4YYn4PaNF+F+UXyp69uGcniuCe
69 PxFC/aosq39LoFRrZdyRfx3DWPXnhYfcFWRwEDosa/Qb/Mbljs+BZRRPIB2Y8ItV
70 9j5WokM6BkNPNeoNnaS1JvCaac7xiurizs7IaXxfYC5q8aZja1OdDrV9Jh7KxIUe
71 q8rsKMk6y9KqGvSBfW3Y9JDgIdUUG8x0bVM/j9+gqOtPH5uFgPRnZxX/Hfb0+1J5
72 iLjFXgwLl2AtEuflY07KfKB9xyEV58x8gkCo/BUX8Y8E6re5/4o+kNiArQL2Z+YS
73 SOD2BmvyVHOlurug9Lq4
74 =FOao
75 -----END PGP SIGNATURE-----