Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201511 - mirrorselect removes local distfiles directories from mirror list
Summary: mirrorselect removes local distfiles directories from mirror list
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-06 19:43 UTC by Guenther Brunthaler
Modified: 2007-12-21 19:09 UTC (History)
2 users (show)

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


Attachments
mirrorselect patch to retain mounted filesystems (retain_mounted_filesystems.patch,2.18 KB, patch)
2007-12-21 00:16 UTC, Mike Pagano
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guenther Brunthaler 2007-12-06 19:43:17 UTC
$GENTOO_MIRRORS in /etc/make.conf is allowed to contain local filesystem paths.

Unfortunately, mirrorselect removes such paths, requiring the admin to manually re-insert those paths into GENTOO_MIRRORS after mirrorselect has been run.

Reproducible: Always

Steps to Reproduce:
1. Prefix GENTOO_MIRRORS with something like "/usr/local/portage/distfiles "
2. Run "mirrorselect".


Actual Results:  
The prefix is lost.

Expected Results:  
All leading GENTOO_MIRRORS entries which do not look like some URI syntax should be retained.

When writing private ebuilds in an overlay for the local host only, it is common to add a directory like /usr/local/portage/distfiles before the first mirror listed in $GENTOO_MIRRORS.

Unfortunately, mirrorselect removes such entries, and so the admin has to manually re-insert them.

I would suggest parsing the old $GENTOO_MIRRORS value, split it into words and remember all such leading words which start with a slash (and are therefore local paths).

Then mirrorselect should do what it does now. But before writing back the newly detected GENTOO_MIRRORS, the saved paths should be inserted before the first actual mirror.
Comment 1 Mike Pagano gentoo-dev 2007-12-21 00:16:28 UTC
Created attachment 139002 [details, diff]
mirrorselect patch to retain mounted filesystems

Here's a patch providing a potential fix. Comments and testing are welcome. You can apply the patch via:

patch -p0 < /path/to/retain_mounted_filesystems.patch 

in a directory where mirrorselect is.

Please back up /etc/make.conf first!
Comment 2 Guenther Brunthaler 2007-12-21 08:48:40 UTC
(In reply to comment #1)
> Here's a patch providing a potential fix. Comments and testing are welcome.

Well done - works like a charm! :-)
Comment 3 Mike Pagano gentoo-dev 2007-12-21 19:06:45 UTC
fixed in mirrorselect 1.3
Comment 4 Mike Pagano gentoo-dev 2007-12-21 19:09:32 UTC
closing