Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 433862 - git-2.eclass: dones't fetch with command "emerge -f"
Summary: git-2.eclass: dones't fetch with command "emerge -f"
Status: RESOLVED DUPLICATE of bug 249086
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-04 03:46 UTC by Yixun Lan
Modified: 2012-09-04 05:17 UTC (History)
2 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 Yixun Lan archtester gentoo-dev 2012-09-04 03:46:00 UTC
In git or git-2 eclass, there is no SRC_URI variable, so "emerge -f/-F" won't fetch the source code from the server ,the real fetch process is in *src_unpack* stage.

the scenario of problem:
0) for single live ebuild, emerge -f/-F =${CATEGORY}/${PN}-9999 don't fetch the source code, we have to do following to workaround this:
 cd ${CATEGORY}/${PN} && ebuild ${PN}-9999.ebuld unpack && ebuild ${PN}-9999.ebuild clean

1) If I install the foo-9999 package which use this eclass, it will be recorded into @world, then we have problem during "emerge -f/F @world", the source code won't be updated.

2) If I have plenty of live ebuilds which base on this eclass, I can't take advantages of parallel fetch. Say, It won't fetch the source code while another is compiling, it will just wait, this is kind of making the build/fetch process serialize, and make the entire building process longer, for slow network, the situation even worse.

3) If I have serveral live ebuilds, say 10 live ebuild, I can't update or clone all the source code in one run without doing upacking, I want the "emerge -f/-F @package_set" also works for live ebuild. 

I'm also thinking about adding one --fetch-live-uri to emerge, and which only fetch the live ebuilds, it's probably useful.

Reproducible: Always
Comment 1 Rick Farina (Zero_Chaos) gentoo-dev 2012-09-04 03:54:08 UTC
I asked dlan to open this bug as this problem has always really bothered me. The fetching could easily be done in src_fetch and the move could happen in src_unpack.  Is there any specific reason why this is not done? I can easily enough provide patches for review.

For instance (roughly)


git-2_src_fetch() {
        debug-print-function ${FUNCNAME} "$@"

        git-2_init_variables
        git-2_prepare_storedir
        git-2_migrate_repository
        git-2_fetch "$@"
        git-2_gc
        git-2_submodules

git-2_src_unpack()
        git-2_move_source
        git-2_branch
        git-2_bootstrap
        git-2_cleanup
Comment 2 Ulrich Müller gentoo-dev 2012-09-04 05:17:06 UTC
A src_fetch phase function doesn't exist...

*** This bug has been marked as a duplicate of bug 249086 ***