Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36123 - FETCHCOMMAND for each protocol
Summary: FETCHCOMMAND for each protocol
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2003-12-19 09:01 UTC by Rick Jenkins
Modified: 2004-10-22 08:48 UTC (History)
0 users

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


Attachments
patch to use FETCHCOMMAND_HTTP, FETCHCOMMAND_FTP, ... (protocol-fetchcommand.diff,1.32 KB, patch)
2004-02-04 19:21 UTC, Marius Mauch (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Jenkins 2003-12-19 09:01:01 UTC
This is a request for a small feature in the new portage.

It would be helpful if the FETCHCOMAND in make.conf could be sensitive to the transfer protocol of the mirror in use. This is particularly needed for those of us who try to minimise the load on gentoo mirrors by using a local rsync server. At present an rsync FETCHCOMMAND will not work with external mirrors.

What is needed is to be able to have a mirror list in make.conf such as:

GENTOO_MIRRORS="rsync://192.168.1.4/gentoo-distfiles ftp://cs.ubishops.ca/pub/gentoo ... "

And several protocol-sensitive FETCHCOMMANDS such as 

FETCHCOMMAND=(ftp:, http:) "/usr/bin/wget -t 5 --passive-ftp \${URI} -P \${DISTDIR}"
FETCHCOMMAND=(rsync:) "rsync \${URI} \${DISTDIR}"

which are selected by the protocol prefix on the mirror URL (i.e. ftp:, rsync:)

This would allow a package to be fetched locally if available, from the external mirror system otherwise.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2004-01-05 19:10:31 UTC
This syntax wouldn't work, if implemented it would be new variables like FTP_FETCHCOMMAND which would use FETCHCOMMAND as default.
Comment 2 Rick Jenkins 2004-01-08 11:57:50 UTC
I'm not in any way attached to my proposed syntax, which was devised purely by way of example and without proper study of how portage works. The syntax Marius Mauch proposes will do the job just as well, and if it's easier to implement it is clearly better.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-02-04 19:21:32 UTC
Created attachment 24978 [details, diff]
patch to use FETCHCOMMAND_HTTP, FETCHCOMMAND_FTP, ...
Comment 4 Rick Jenkins 2004-02-05 10:22:25 UTC
Thanks, that looks really good. 

I'm snowed under with work just now, but I'll do serious testing next week.
Comment 5 Nicholas Jones (RETIRED) gentoo-dev 2004-10-22 08:48:10 UTC
Bug has been fixed and released in stable portages on or before 2.0.51-r2