public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [Future EAPI] src_fetch() phase function to support VCS fetching
@ 2012-09-04 16:43 Michał Górny
  2012-09-04 17:02 ` Rick "Zero_Chaos" Farina
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Michał Górny @ 2012-09-04 16:43 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 2412 bytes --]

Hello,

As Sid Hayn raised today on #gentoo-portage, it would be useful to
finally have portage able to fetch updates from VCS-es independently
of src_unpack(). This could be used, for example, on machines
temporarily connected to the network -- one would then fetch files
while connected to the network, and perform the updates later.

There are a few ways how we could handle that but the cleanest and most
universal one seems to be defining a src_fetch() phase function
in a future EAPI.

In the EAPIs supporting src_fetch(), that phase function would be used
by PM when requesting the files to be fetched. A default_src_fetch()
will be declared as well, providing implementation-defined code
fetching files like they are fetched now. Older EAPIs will simply
always use that default.

The phase function would be disjoint from the normal merge process,
much like pkg_pretend(). In portage, it will be called as 'portage'
user if FEATURES=userfetch is enabled.

VCS eclasses supporting separated fetching would define two phase
functions:
- src_fetch() which would be responsible for fetching updates,
- src_unpack() which would be responsible for checking out the source
  to work directory.

The remaining issue is handling dependencies on the tools necessary to
do fetching. For default_src_fetch(), we can assume that the package
manager provides the necessary tools. For custom src_fetch(), we would
need either to:

1) require satisfying whole DEPEND when fetching -- probably pointless,
   as it will make --fetchonly almost impossible when doing initial
   installs;

2) introduce a new dependency type (please do not get into details how
   we do it -- we will discuss that another time, at the moment please
   just keep it as 'new dependency type') -- and we probably end up
   having a switch for --fetchonly without installing deps (thus
   omitting packages where they are not satisfied), and with deps;

3) [ugly!] assume that src_fetch() should check for its deps and fail
   if they are not satisfied. If that's mostly for live ebuilds, it may
   be acceptable. Then the package manager will just have one 'fetch
   failed' on --fetchonly (or early pre-fetch), and it will have to
   invoke src_fetch() after satisfying the deps, before src_unpack().

What do you think? What are your ideas, suggestions?

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2012-09-11 23:41 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-04 16:43 [gentoo-dev] [Future EAPI] src_fetch() phase function to support VCS fetching Michał Górny
2012-09-04 17:02 ` Rick "Zero_Chaos" Farina
2012-09-04 17:02 ` Michael Mol
2012-09-04 17:23   ` Michał Górny
2012-09-05  7:25     ` Ciaran McCreesh
2012-09-05  8:38       ` Michał Górny
2012-09-05  9:07         ` Ulrich Mueller
2012-09-05 10:07           ` Michał Górny
2012-09-05 10:29             ` Ulrich Mueller
2012-09-05 10:45         ` Andreas K. Huettel
2012-09-05 10:49           ` Ciaran McCreesh
2012-09-05 11:00             ` Michał Górny
2012-09-05 11:07               ` Ciaran McCreesh
2012-09-05 11:25                 ` Michał Górny
2012-09-05 13:25                   ` Ian Stakenvicius
2012-09-06 16:49                 ` Brian Harring
2012-09-06 18:50                   ` Michał Górny
2012-09-06 19:10                     ` Brian Harring
2012-09-11 22:36                     ` Rick "Zero_Chaos" Farina
2012-09-11 23:40                       ` Brian Harring
2012-09-06 15:12       ` James Cloos
2012-09-04 17:24   ` Rick "Zero_Chaos" Farina
2012-09-04 17:05 ` Rick "Zero_Chaos" Farina
2012-09-04 17:32   ` Zac Medico
2012-09-04 19:56     ` Ian Stakenvicius
2012-09-04 20:05       ` Rick "Zero_Chaos" Farina
2012-09-04 20:09       ` Michał Górny
2012-09-04 20:12       ` Andreas K. Huettel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox