commit:     30d6d1eafdfc74a8f0f1d58515aaadd0b8def383
Author:     Benda Xu <heroxbd <AT> gentoo <DOT> org>
AuthorDate: Thu Aug 24 06:20:36 2017 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Thu Aug 24 06:21:04 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=30d6d1ea

sys-apps/portage: only prefix-guest use gentoo_prefix repository

  prefix-standalone use the default gentoo main repository.
  This fixes the warnings in prefix-standalone like
  !!! Section 'gentoo_prefix' in repos.conf has name different \
  from repository name 'gentoo' set inside repository

Package-Manager: Portage-2.3.3, Repoman-2.3.1

 sys-apps/portage/portage-2.3.8.ebuild | 11 +++++++----
 sys-apps/portage/portage-9999.ebuild  | 11 +++++++----
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/sys-apps/portage/portage-2.3.8.ebuild 
b/sys-apps/portage/portage-2.3.8.ebuild
index a5725312861..af287ccb875 100644
--- a/sys-apps/portage/portage-2.3.8.ebuild
+++ b/sys-apps/portage/portage-2.3.8.ebuild
@@ -129,11 +129,14 @@ python_prepare_all() {
                        -i cnf/make.globals || die "sed failed"
 
                einfo "Adjusting repos.conf ..."
-               sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
-                       -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
-                       -e "s|^\(location = 
\)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
-                       -e "s|^\(sync-uri = 
\).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
+               sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
                        -i cnf/repos.conf || die "sed failed"
+               if prefix-guest ; then
+                       sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
+                               -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
+                               -e "s|^\(sync-uri = 
\).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
+                               -i cnf/repos.conf || die "sed failed"
+               fi
 
                einfo "Adding FEATURES=force-prefix to make.globals ..."
                echo -e '\nFEATURES="${FEATURES} force-prefix"' >> 
cnf/make.globals \

diff --git a/sys-apps/portage/portage-9999.ebuild 
b/sys-apps/portage/portage-9999.ebuild
index ce2b5041bab..04b5b025614 100644
--- a/sys-apps/portage/portage-9999.ebuild
+++ b/sys-apps/portage/portage-9999.ebuild
@@ -128,11 +128,14 @@ python_prepare_all() {
                        -i cnf/make.globals || die "sed failed"
 
                einfo "Adjusting repos.conf ..."
-               sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
-                       -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
-                       -e "s|^\(location = 
\)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
-                       -e "s|^\(sync-uri = 
\).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
+               sed -e "s|^\(location = \)\(/usr/portage\)|\\1${EPREFIX}\\2|" \
                        -i cnf/repos.conf || die "sed failed"
+               if prefix-guest ; then
+                       sed -e "s|^\(main-repo = \).*|\\1gentoo_prefix|" \
+                               -e "s|^\\[gentoo\\]|[gentoo_prefix]|" \
+                               -e "s|^\(sync-uri = 
\).*|\\1rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix|" \
+                               -i cnf/repos.conf || die "sed failed"
+               fi
 
                einfo "Adding FEATURES=force-prefix to make.globals ..."
                echo -e '\nFEATURES="${FEATURES} force-prefix"' >> 
cnf/make.globals \

Reply via email to