Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 249086 - emerge --fetchonly doesn't work for repository-based ebuilds
Summary: emerge --fetchonly doesn't work for repository-based ebuilds
Status: RESOLVED DUPLICATE of bug 481434
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: PMS/EAPI
URL:
Whiteboard:
Keywords:
: 352686 433858 433860 433862 433866 433868 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-27 15:00 UTC by Martin Baute
Modified: 2021-05-13 15:29 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Baute 2008-11-27 15:00:07 UTC
This was already mentioned in bug #80015 back in 2005...

'emerge -f' does nothing for e.g. CVS-based ebuilds, as it is embedded in src_unpack. 

Imagine:

'emerge -f <cvs_based_package>'

<disconnect>

'emerge <cvs_based_package>'

<fails because sources aren't there>

This has bitten me several times in the past. When handling many packages at once, there's no easy way to tell *if* one of the packages is affected by this. You think you downloaded all you needed for a day's worth of compiling, but instead one of the first packages fails due to missing sources and your system spends the day idling...
Comment 1 Jeroen Roovers (RETIRED) gentoo-dev 2008-11-27 17:14:14 UTC
What would be your solution? Would `emerge -f world` need to fail?

This bug report will probably go the way of bug #80015 if you don't provide any kind of solution to the problem.
Comment 2 Zac Medico gentoo-dev 2008-11-27 17:29:09 UTC
We'd have to mark the ebuilds with some sort of metadata, such as PROPERTIES, and the ebuilds would have to implement a function that performs the fetch. Current ebuilds use src_unpack which is inappropriate for this purpose.
Comment 3 Ciaran McCreesh 2008-11-27 17:44:22 UTC
Rather than a PROPERTIES for "I have src_fetch_extra", it'd probably be useful to have a special package manager generated cached metadata key containing all the phases that are specified by the ebuild. DEFINED_PHASES="pkg_setup src_compile src_test", say. This would also let the package manager avoid having to exclusively run pkg_* phases for ebuilds that use the default, empty pkg_*.
Comment 4 Zac Medico gentoo-dev 2008-11-27 18:18:28 UTC
Yeah, the DEFINED_PHASES idea makes sense. I suppose we can retroactively add a new src_fetch phase to existing EAPIs for this purpose, if it's not required to be supported. We could make src_fetch support mandatory in a new EAPI if necessary.
Comment 5 Ciaran McCreesh 2008-11-27 18:25:49 UTC
I'd be inclined to do src_fetch_extra (let's not call it src_fetch -- that'll give people the idea it's ok to use it to replace SRC_URI) purely as a new EAPI thing. Otherwise ebuilds will have to do some fairly messy hacks to work out whether or not the new phase has been run.

DEFINED_PHASES can go in retroactively and optionally for all EAPIs without any difficulty. We'd need to have some way of telling the difference between "DEFINED_PHASES isn't implemented" and "this ebuild defines no phases", though. Could just shove a - in there...

I can write up a proposal for DEFINED_PHASES if you like -- it's something I want for Paludis for other nefarious purposes anyway.
Comment 6 Zac Medico gentoo-dev 2008-11-27 18:35:14 UTC
Yes, a DEFINED_PHASES proposal would be nice.
Comment 7 Martin Baute 2008-12-01 09:02:55 UTC
> What would be your solution? Would `emerge -f world` need to fail?

Of course not!

To be precise and working with a 'real' example, I would expect that...

'ebuild /usr/portage/media-tv/v4l-dvb-hg/v4l-dvb-hg-0.1-r2.ebuild fetch'

would actually *fetch* the sources (which it does not), and

'ebuild /usr/portage/media-tv/v4l-dvb-hg/v4l-dvb-hg-0.1-r2.ebuild unpack'

to *NOT* require an online connection.

As far as I can see, this would require an internal reorganization of the cvs.eclass (and other repository access eclasses), so that cvs_fetch() (and equivalents) are actually called during the *fetch* stage instead of the *unpack* stage.
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-01-25 14:21:37 UTC
*** Bug 352686 has been marked as a duplicate of this bug. ***
Comment 9 Martin Baute 2011-06-27 09:06:44 UTC
Not that I'm biting my nails about this one, but is there *any* progress on it?
Comment 10 Zac Medico gentoo-dev 2011-06-27 09:14:03 UTC
I'm not aware of any progress. Meanwhile, you might want to check if smart-live-rebuild can help:

  http://packages.gentoo.org/package/app-portage/smart-live-rebuild
Comment 11 Ulrich Müller gentoo-dev 2012-09-04 05:14:22 UTC
*** Bug 433868 has been marked as a duplicate of this bug. ***
Comment 12 Ulrich Müller gentoo-dev 2012-09-04 05:16:14 UTC
*** Bug 433858 has been marked as a duplicate of this bug. ***
Comment 13 Ulrich Müller gentoo-dev 2012-09-04 05:16:39 UTC
*** Bug 433860 has been marked as a duplicate of this bug. ***
Comment 14 Ulrich Müller gentoo-dev 2012-09-04 05:17:06 UTC
*** Bug 433862 has been marked as a duplicate of this bug. ***
Comment 15 Ulrich Müller gentoo-dev 2012-09-04 05:17:28 UTC
*** Bug 433866 has been marked as a duplicate of this bug. ***
Comment 16 Ulrich Müller gentoo-dev 2016-05-18 07:12:50 UTC
I believe that this is pretty much a duplicate of bug 481434. Resolving it in that direction because the newer bug has a cleaner history.

*** This bug has been marked as a duplicate of bug 481434 ***
Comment 17 Ulrich Müller gentoo-dev 2016-05-18 07:52:23 UTC
(In reply to Martin Baute from comment #9)
> Not that I'm biting my nails about this one, but is there *any* progress on
> it?

I am well aware that this bug is open since almost a decade. However, we are a volunteers' project. So, if you want a certain feature, you can either:
1) provide an implementation and a spec yourself,
2) convince others that this is important and has high priority, so that they do the work, or
3) hire someone to work on it.