aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-08-28 18:00:35 +0000
committerAvatar Piotr Jaroszyński <peper@gentoo.org> 2007-08-28 18:00:35 +0000
commit73605866f2e6f214019b3e000144589bcf5e9068 (patch)
treeb0ab9a8256438be455c6f866a18fb461108dc83a
parent44d4b03d9d2a4a3638d086f09f6acb9b9bf46d2d (diff)
downloadpaludis-73605866f2e6f214019b3e000144589bcf5e9068.tar.gz
paludis-73605866f2e6f214019b3e000144589bcf5e9068.tar.xz
Honour mirror-restrict.
-rw-r--r--paludis/repositories/e/ebuild_entries.cc3
-rw-r--r--paludis/repositories/e/fetch_visitor.cc17
-rw-r--r--paludis/repositories/e/fetch_visitor.hh3
3 files changed, 17 insertions, 6 deletions
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 9ffb30c..e930a58 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -411,7 +411,8 @@ EbuildEntries::fetch(const tr1::shared_ptr<const ERepositoryID> & id,
stringify(_imp->e_repository->params().master_repository->name()) :
stringify(_imp->e_repository->name()));
FetchVisitor f(_imp->params.environment, id, *id->eapi(),
- _imp->e_repository->params().distdir, o.fetch_unneeded, fetch_userpriv_ok, mirrors_name, fetch_restrict);
+ _imp->e_repository->params().distdir, o.fetch_unneeded, fetch_userpriv_ok,
+ mirrors_name, fetch_restrict, no_mirror);
id->src_uri_key()->value()->accept(f);
CheckFetchedFilesVisitor c(_imp->environment, id, _imp->e_repository->params().distdir, o.fetch_unneeded, fetch_restrict, ((_imp->e_repository->layout()->package_directory(id->name())) / "Manifest"));
id->src_uri_key()->value()->accept(c);
diff --git a/paludis/repositories/e/fetch_visitor.cc b/paludis/repositories/e/fetch_visitor.cc
index d7e4cd5..332cd67 100644
--- a/paludis/repositories/e/fetch_visitor.cc
+++ b/paludis/repositories/e/fetch_visitor.cc
@@ -55,6 +55,7 @@ namespace paludis
const bool userpriv;
const std::string mirrors_name;
const bool fetch_restrict;
+ const bool no_mirror;
tr1::shared_ptr<LabelsDepSpec<URILabelVisitorTypes> > default_label;
std::list<const LabelsDepSpec<URILabelVisitorTypes> *> labels;
@@ -67,7 +68,8 @@ namespace paludis
const bool f,
const bool u,
const std::string & m,
- const bool n) :
+ const bool n,
+ const bool nm) :
env(e),
id(i),
eapi(p),
@@ -75,13 +77,19 @@ namespace paludis
fetch_unneeded(f),
userpriv(u),
mirrors_name(m),
- fetch_restrict(n)
+ fetch_restrict(n),
+ no_mirror(nm)
{
if (fetch_restrict)
{
default_label.reset(new LabelsDepSpec<URILabelVisitorTypes>);
default_label->add_label(make_shared_ptr(new URIManualOnlyLabel("fetch-restrict")));
}
+ else if (no_mirror)
+ {
+ default_label.reset(new LabelsDepSpec<URILabelVisitorTypes>);
+ default_label->add_label(make_shared_ptr(new URIListedOnlyLabel("mirror-restrict")));
+ }
else
default_label = parse_uri_label("default:", eapi);
@@ -98,8 +106,9 @@ FetchVisitor::FetchVisitor(
const bool f,
const bool u,
const std::string & m,
- const bool n) :
- PrivateImplementationPattern<FetchVisitor>(new Implementation<FetchVisitor>(e, i, p, d, f, u, m, n))
+ const bool n,
+ const bool nm) :
+ PrivateImplementationPattern<FetchVisitor>(new Implementation<FetchVisitor>(e, i, p, d, f, u, m, n, nm))
{
}
diff --git a/paludis/repositories/e/fetch_visitor.hh b/paludis/repositories/e/fetch_visitor.hh
index edca26f..8f968c9 100644
--- a/paludis/repositories/e/fetch_visitor.hh
+++ b/paludis/repositories/e/fetch_visitor.hh
@@ -47,7 +47,8 @@ namespace paludis
const bool fetch_unneeded,
const bool userpriv,
const std::string & mirrors_name,
- const bool fetch_restrict);
+ const bool fetch_restrict,
+ const bool no_mirror);
~FetchVisitor();