aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-16 23:37:48 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-11-16 23:37:48 +0000
commit34fe5458d12f8c1d7893a89e59a4d2e5f8095980 (patch)
treed13af8c45bcfffa0ec1c856fc475649d10950bf0
parent9f1b93e02b56ef2580a678678b773aca22a342af (diff)
downloadpaludis-34fe5458d12f8c1d7893a89e59a4d2e5f8095980.tar.gz
paludis-34fe5458d12f8c1d7893a89e59a4d2e5f8095980.tar.xz
Support primaryuri for EAPIs 0, 1. +Fixes: ticket:443
-rw-r--r--paludis/repositories/e/e_key.cc5
-rw-r--r--paludis/repositories/e/eapi.cc3
-rw-r--r--paludis/repositories/e/eapi.sr1
-rw-r--r--paludis/repositories/e/eapis/0.conf8
-rw-r--r--paludis/repositories/e/eapis/1.conf8
-rw-r--r--paludis/repositories/e/eapis/exheres-0.conf1
-rw-r--r--paludis/repositories/e/eapis/paludis-1.conf1
7 files changed, 21 insertions, 6 deletions
diff --git a/paludis/repositories/e/e_key.cc b/paludis/repositories/e/e_key.cc
index 3c86dcc..8a9b2ac 100644
--- a/paludis/repositories/e/e_key.cc
+++ b/paludis/repositories/e/e_key.cc
@@ -307,6 +307,11 @@ EFetchableURIKey::initial_label() const
std::find(_imp->id->eapi()->supported->ebuild_options->restrict_fetch->begin(),
_imp->id->eapi()->supported->ebuild_options->restrict_fetch->end(), (*i)->text()))
_imp->initial_label = *parse_uri_label("default-restrict-mirror:", *_imp->id->eapi())->begin();
+
+ else if (_imp->id->eapi()->supported->ebuild_options->restrict_primaryuri->end() !=
+ std::find(_imp->id->eapi()->supported->ebuild_options->restrict_primaryuri->begin(),
+ _imp->id->eapi()->supported->ebuild_options->restrict_primaryuri->end(), (*i)->text()))
+ _imp->initial_label = *parse_uri_label("default-restrict-primaryuri:", *_imp->id->eapi())->begin();
}
if (! _imp->initial_label)
diff --git a/paludis/repositories/e/eapi.cc b/paludis/repositories/e/eapi.cc
index 94dbe44..db5a901 100644
--- a/paludis/repositories/e/eapi.cc
+++ b/paludis/repositories/e/eapi.cc
@@ -108,6 +108,7 @@ namespace paludis
.use_expand_separator(destringify<char>(k.get("use_expand_separator")))
.restrict_fetch(make_shared_ptr(new Set<std::string>))
.restrict_mirror(make_shared_ptr(new Set<std::string>))
+ .restrict_primaryuri(make_shared_ptr(new Set<std::string>))
)))
.ebuild_phases(make_shared_ptr(new EAPIEbuildPhases(
@@ -179,6 +180,8 @@ namespace paludis
eapi->supported->ebuild_options->restrict_fetch->inserter());
WhitespaceTokeniser::tokenise(k.get("restrict_mirror"),
eapi->supported->ebuild_options->restrict_mirror->inserter());
+ WhitespaceTokeniser::tokenise(k.get("restrict_primaryuri"),
+ eapi->supported->ebuild_options->restrict_primaryuri->inserter());
values.insert(std::make_pair(strip_trailing_string(d->basename(), ".conf"), eapi));
}
diff --git a/paludis/repositories/e/eapi.sr b/paludis/repositories/e/eapi.sr
index a4c6b9e..ea9c948 100644
--- a/paludis/repositories/e/eapi.sr
+++ b/paludis/repositories/e/eapi.sr
@@ -134,6 +134,7 @@ make_class_EAPIEbuildOptions()
key restrict_fetch "tr1::shared_ptr<Set<std::string> >"
key restrict_mirror "tr1::shared_ptr<Set<std::string> >"
+ key restrict_primaryuri "tr1::shared_ptr<Set<std::string> >"
doxygen_comment << "END"
/**
diff --git a/paludis/repositories/e/eapis/0.conf b/paludis/repositories/e/eapis/0.conf
index 9c87e0b..7884009 100644
--- a/paludis/repositories/e/eapis/0.conf
+++ b/paludis/repositories/e/eapis/0.conf
@@ -146,10 +146,12 @@ env_portdir = PORTDIR
env_distdir = DISTDIR
uri_labels = \
- default = URIMirrorsThenListedLabel ; \
- default-restrict-fetch = URIManualOnlyLabel ; \
- default-restrict-mirror = URILocalMirrorsOnlyLabel
+ default = URIMirrorsThenListedLabel ; \
+ default-restrict-fetch = URIManualOnlyLabel ; \
+ default-restrict-mirror = URILocalMirrorsOnlyLabel ; \
+ default-restrict-primaryuri = URIListedThenMirrorsLabel
restrict_mirror = mirror nomirror
restrict_fetch = fetch nofetch
+restrict_primaryuri = primaryuri
diff --git a/paludis/repositories/e/eapis/1.conf b/paludis/repositories/e/eapis/1.conf
index f86a95d..f7c12e4 100644
--- a/paludis/repositories/e/eapis/1.conf
+++ b/paludis/repositories/e/eapis/1.conf
@@ -146,11 +146,13 @@ env_portdir = PORTDIR
env_distdir = DISTDIR
uri_labels = \
- default = URIMirrorsThenListedLabel ; \
- default-restrict-fetch = URIManualOnlyLabel ; \
- default-restrict-mirror = URILocalMirrorsOnlyLabel
+ default = URIMirrorsThenListedLabel ; \
+ default-restrict-fetch = URIManualOnlyLabel ; \
+ default-restrict-mirror = URILocalMirrorsOnlyLabel ; \
+ default-restrict-primaryuri = URIListedThenMirrorsLabel
restrict_mirror = mirror nomirror
restrict_fetch = fetch nofetch
+restrict_primaryuri = primaryuri
diff --git a/paludis/repositories/e/eapis/exheres-0.conf b/paludis/repositories/e/eapis/exheres-0.conf
index 9d64d00..313c6cc 100644
--- a/paludis/repositories/e/eapis/exheres-0.conf
+++ b/paludis/repositories/e/eapis/exheres-0.conf
@@ -171,4 +171,5 @@ dependency_labels = \
restrict_mirror = mirror
restrict_fetch = fetch
+restrict_primaryuri =
diff --git a/paludis/repositories/e/eapis/paludis-1.conf b/paludis/repositories/e/eapis/paludis-1.conf
index aefd271..6c433bc 100644
--- a/paludis/repositories/e/eapis/paludis-1.conf
+++ b/paludis/repositories/e/eapis/paludis-1.conf
@@ -154,4 +154,5 @@ uri_labels = \
restrict_mirror = mirror
restrict_fetch = fetch
+restrict_primaryuri =