Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 222441

Summary: emerge-webrsync ignores /etc/portage/mirrors::local
Product: Portage Development Reporter: Alon Bar-Lev (RETIRED) <alonbl>
Component: ToolsAssignee: Portage team <dev-portage>
Status: CONFIRMED ---    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Alon Bar-Lev (RETIRED) gentoo-dev 2008-05-16 21:28:55 UTC
Hello,

emerge-webrsync use GENTOO_MIRRORS in order to fetch the snapshot. This is great!
But in a configuration where there is no conactivity to the internet, setting GENTOO_MIRRORS for portage is incorrect, as ebuilds may specify RESTRICT="mirror" and similar to bypass the GENTOO_MIRRORS.

The /etc/portage/mirrors::local was introduced to solve the above issue, so in these configurations the system has correct value for /etc/portage/mirrors::local and an empty GENTOO_MIRRORS.

As emerge-webrsync is portage tool, it is expected it follow the same rule.

From "man portage" /etc/portage/mirrors:
You may also set a special mirror type called "local".  This list of mirrors will  be  checked  before GENTOO_MIRRORS  and  will  be  used even if the package has RESTRICT="mirror" or RESTRICT="fetch".

Consistent behavior between tools (DISTDIR usage bug#220111, persistence KEYWORDS&USE usage bug#219369, Mirror look up this one) is important for predictable usage.

The following statement can be added to the for loop just before GENTOO_MIRRORS:
 
$([ -e "${ROOT}/etc/portage/mirrors" ] && \ sed -n -e 's/#.*//' -e 's/^[\t]*//g' -e '/local/s/local[\t]*//p' \
"${ROOT}/etc/portage/mirrors")
 
Thank you.