aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:24:07 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-07-14 03:28:55 +0100
commit33e7bdf8d35762559eb5b162f9ee46bcf6cad0e9 (patch)
tree1adb77356ba80f5d8872e54cdf3e94ce7160e579
parent8d626661eebf9e33e852dd86affc5f2fa86f611f (diff)
downloadpaludis-33e7bdf8d35762559eb5b162f9ee46bcf6cad0e9.tar.gz
paludis-33e7bdf8d35762559eb5b162f9ee46bcf6cad0e9.tar.xz
Boring api-use changes for previous (continued)
-rw-r--r--paludis/dep_list.cc9
-rw-r--r--paludis/find_unused_packages_task.cc2
-rw-r--r--paludis/fuzzy_finder.cc7
-rw-r--r--paludis/install_task.cc4
-rw-r--r--paludis/range_rewriter.cc11
-rw-r--r--paludis/repositories/e/e_repository_sets.cc4
-rw-r--r--paludis/repositories/e/qa/visibility.cc4
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc26
-rw-r--r--paludis/repositories/virtuals/package_id.cc2
-rw-r--r--src/clients/accerso/accerso.cc2
-rw-r--r--src/clients/adjutrix/keywords_graph.cc2
-rw-r--r--src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc2
-rw-r--r--src/clients/instruo/instruo.cc2
-rw-r--r--src/output/console_install_task.cc4
-rw-r--r--src/output/console_query_task.cc4
15 files changed, 48 insertions, 37 deletions
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 7e78be2..a9a8b42 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -888,7 +888,8 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
* ourself */
if (! (a.blocked_spec()->version_requirements_ptr() || a.blocked_spec()->slot_requirement_ptr()
- || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->repository_ptr())
+ || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->in_repository_ptr()
+ || a.blocked_spec()->from_repository_ptr())
&& d->_imp->current_package_id())
{
if ((*aa)->name() == d->_imp->current_package_id()->name())
@@ -929,7 +930,8 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
* ourself */
if (! (a.blocked_spec()->version_requirements_ptr() || a.blocked_spec()->slot_requirement_ptr()
- || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->repository_ptr())
+ || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->in_repository_ptr()
+ || a.blocked_spec()->from_repository_ptr())
&& d->_imp->current_package_id())
{
if ((*r)->package_id->name() == d->_imp->current_package_id()->name())
@@ -954,7 +956,8 @@ DepList::AddVisitor::visit_leaf(const BlockDepSpec & a)
/* ignore if it's a virtual/blah (not <virtual/blah-1) block and it's blocking
* ourself */
if (! (a.blocked_spec()->version_requirements_ptr() || a.blocked_spec()->slot_requirement_ptr()
- || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->repository_ptr())
+ || a.blocked_spec()->additional_requirements_ptr() || a.blocked_spec()->in_repository_ptr()
+ || a.blocked_spec()->from_repository_ptr())
&& d->_imp->current_package_id())
{
if (r->package_id->name() == d->_imp->current_package_id()->name())
diff --git a/paludis/find_unused_packages_task.cc b/paludis/find_unused_packages_task.cc
index 2a19448..34f3bda 100644
--- a/paludis/find_unused_packages_task.cc
+++ b/paludis/find_unused_packages_task.cc
@@ -47,7 +47,7 @@ FindUnusedPackagesTask::execute(const QualifiedPackageName & package)
std::tr1::shared_ptr<const PackageIDSequence> packages((*_env)[selection::AllVersionsGroupedBySlot(
generator::Matches(make_package_dep_spec()
.package(package)
- .repository(_repo->name()))
+ .in_repository(_repo->name()))
)]);
SlotName old_slot("I_am_a_slot");
diff --git a/paludis/fuzzy_finder.cc b/paludis/fuzzy_finder.cc
index 856850c..bab4f8f 100644
--- a/paludis/fuzzy_finder.cc
+++ b/paludis/fuzzy_finder.cc
@@ -144,8 +144,11 @@ FuzzyCandidatesFinder::FuzzyCandidatesFinder(const Environment & e, const std::s
package = stringify(pds.package_ptr()->package);
}
- if (pds.repository_ptr())
- g = g & generator::Repository(*pds.repository_ptr());
+ if (pds.in_repository_ptr())
+ g = g & generator::InRepository(*pds.in_repository_ptr());
+
+ if (pds.from_repository_ptr())
+ g = g & generator::FromRepository(*pds.from_repository_ptr());
}
std::tr1::shared_ptr<const PackageIDSequence> ids(e[selection::BestVersionOnly(g | FuzzyPackageName(package) | filter)]);
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index 0f6921c..9b0d137 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -435,7 +435,7 @@ InstallTask::_add_package_id(const std::tr1::shared_ptr<const PackageID> & targe
.package(target->name())
.version_requirement(VersionRequirement(vo_equal, target->version()))
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(target->slot())))
- .repository(target->repository()->name())));
+ .in_repository(target->repository()->name())));
spec->set_tag(std::tr1::shared_ptr<const DepTag>(new TargetDepTag));
_imp->targets->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
@@ -720,7 +720,7 @@ InstallTask::_one(const DepList::Iterator dep, const int x, const int y, const i
generator::Matches(make_package_dep_spec()
.package(dep->package_id->name())
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(dep->package_id->slot())))
- .repository(dep->destination->name())) |
+ .in_repository(dep->destination->name())) |
filter::SupportsAction<UninstallAction>())];
// don't clean the thing we just installed
diff --git a/paludis/range_rewriter.cc b/paludis/range_rewriter.cc
index 87881a4..42dfb7f 100644
--- a/paludis/range_rewriter.cc
+++ b/paludis/range_rewriter.cc
@@ -122,7 +122,12 @@ namespace
return std::tr1::shared_ptr<const SlotRequirement>();
}
- virtual std::tr1::shared_ptr<const RepositoryName> repository_ptr() const
+ virtual std::tr1::shared_ptr<const RepositoryName> from_repository_ptr() const
+ {
+ return std::tr1::shared_ptr<const RepositoryName>();
+ }
+
+ virtual std::tr1::shared_ptr<const RepositoryName> in_repository_ptr() const
{
return std::tr1::shared_ptr<const RepositoryName>();
}
@@ -217,8 +222,8 @@ RangeRewriter::visit_leaf(const PackageDepSpec & a)
if (_imp->invalid)
return;
- if (a.additional_requirements_ptr() || a.slot_requirement_ptr() || a.repository_ptr() || a.package_name_part_ptr()
- || a.category_name_part_ptr() || ! a.version_requirements_ptr() || ! a.package_ptr())
+ if (a.additional_requirements_ptr() || a.slot_requirement_ptr() || a.in_repository_ptr() || a.package_name_part_ptr()
+ || a.category_name_part_ptr() || ! a.version_requirements_ptr() || ! a.package_ptr() || a.from_repository_ptr())
{
_imp->invalid = true;
return;
diff --git a/paludis/repositories/e/e_repository_sets.cc b/paludis/repositories/e/e_repository_sets.cc
index 2422619..b830628 100644
--- a/paludis/repositories/e/e_repository_sets.cc
+++ b/paludis/repositories/e/e_repository_sets.cc
@@ -284,7 +284,7 @@ ERepositorySets::security_set(bool insecurity) const
make_package_dep_spec()
.package((*c)->name())
.version_requirement(VersionRequirement(vo_equal, (*c)->version()))
- .repository((*c)->repository()->name())));
+ .in_repository((*c)->repository()->name())));
spec->set_tag(glsa_tags.find(glsa->id())->second);
security_packages->add(std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> >(
new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
@@ -317,7 +317,7 @@ ERepositorySets::security_set(bool insecurity) const
std::tr1::shared_ptr<PackageDepSpec> spec(new PackageDepSpec(make_package_dep_spec()
.package((*r)->name())
.version_requirement(VersionRequirement(vo_equal, (*r)->version()))
- .repository((*r)->repository()->name())));
+ .in_repository((*r)->repository()->name())));
spec->set_tag(glsa_tags.find(glsa->id())->second);
security_packages->add(std::tr1::shared_ptr<SetSpecTree::ConstItem>(
new TreeLeaf<SetSpecTree, PackageDepSpec>(spec)));
diff --git a/paludis/repositories/e/qa/visibility.cc b/paludis/repositories/e/qa/visibility.cc
index 4601e86..96b8d98 100644
--- a/paludis/repositories/e/qa/visibility.cc
+++ b/paludis/repositories/e/qa/visibility.cc
@@ -132,8 +132,8 @@ namespace
pp.package(*v->second->package_ptr());
if (orig_p.slot_requirement_ptr())
pp.slot_requirement(orig_p.slot_requirement_ptr());
- if (orig_p.repository_ptr())
- pp.repository(*orig_p.repository_ptr());
+ if (orig_p.in_repository_ptr())
+ pp.in_repository(*orig_p.in_repository_ptr());
local_p.reset(new PackageDepSpec(pp));
local_p->set_tag(orig_p.tag());
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index 23479a8..d8732fd 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -383,7 +383,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "), "");
}
@@ -394,7 +394,7 @@ namespace test_cases
(k::no_config_protect(), false)
(k::checks(), iaco_default)
(k::debug_build(), iado_none));
- (*env[selection::RequireExactlyOne(generator::Repository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
+ (*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir").is_directory());
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir/4a").is_regular_file());
@@ -402,7 +402,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged");
}
@@ -439,7 +439,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged");
}
@@ -449,7 +449,7 @@ namespace test_cases
(k::no_config_protect(), false)
(k::checks(), iaco_default)
(k::debug_build(), iado_none));
- (*env[selection::RequireExactlyOne(generator::Repository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
+ (*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir").is_directory());
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir/4a").is_regular_file());
@@ -460,7 +460,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged cat/pkg4b-1.0:foo::installed-unpackaged");
}
@@ -497,7 +497,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged cat/pkg4b-1.0:foo::installed-unpackaged");
}
@@ -507,7 +507,7 @@ namespace test_cases
(k::no_config_protect(), false)
(k::checks(), iaco_default)
(k::debug_build(), iado_none));
- (*env[selection::RequireExactlyOne(generator::Repository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
+ (*env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("unpackaged")))]->begin())->perform_action(action);
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir").is_directory());
TEST_CHECK(FSEntry("installed_repository_TEST_dir/root4/dir/4a").is_regular_file());
@@ -518,7 +518,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged cat/pkg4b-1.0:foo::installed-unpackaged");
}
@@ -539,7 +539,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4a-1.0:foo::installed-unpackaged cat/pkg4b-1.0:foo::installed-unpackaged");
}
@@ -559,7 +559,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(
- env[selection::RequireExactlyOne(generator::Repository(RepositoryName("installed-unpackaged")))]);
+ env[selection::RequireExactlyOne(generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4b-1.0:foo::installed-unpackaged");
}
@@ -580,7 +580,7 @@ namespace test_cases
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"cat/pkg4b-1.0:foo::installed-unpackaged");
}
@@ -596,7 +596,7 @@ namespace test_cases
repo->invalidate();
{
const std::tr1::shared_ptr<const PackageIDSequence> pre_ids(env[selection::AllVersionsSorted(
- generator::Repository(RepositoryName("installed-unpackaged")))]);
+ generator::InRepository(RepositoryName("installed-unpackaged")))]);
TEST_CHECK_EQUAL(join(indirect_iterator(pre_ids->begin()), indirect_iterator(pre_ids->end()), " "),
"");
}
diff --git a/paludis/repositories/virtuals/package_id.cc b/paludis/repositories/virtuals/package_id.cc
index 16bb556..d5d5339 100644
--- a/paludis/repositories/virtuals/package_id.cc
+++ b/paludis/repositories/virtuals/package_id.cc
@@ -65,7 +65,7 @@ namespace paludis
.package(v->name())
.version_requirement(VersionRequirement(vo_equal, v->version()))
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(v->slot())))
- .repository(v->repository()->name()))))
+ .in_repository(v->repository()->name()))))
:
new TreeLeaf<DependencySpecTree, PackageDepSpec>(make_shared_ptr(new PackageDepSpec(
make_package_dep_spec()
diff --git a/src/clients/accerso/accerso.cc b/src/clients/accerso/accerso.cc
index b083283..163f913 100644
--- a/src/clients/accerso/accerso.cc
+++ b/src/clients/accerso/accerso.cc
@@ -115,7 +115,7 @@ main(int argc, char *argv[])
.master_repository_dir(FSEntry(CommandLine::get_instance()->a_master_repository_dir.argument())));
std::tr1::shared_ptr<const PackageIDSequence> ids(env[selection::AllVersionsSorted(
- generator::Repository(env.main_repository()->name()))]);
+ generator::InRepository(env.main_repository()->name()))]);
std::multimap<std::tr1::shared_ptr<const PackageID>, std::string, PackageIDComparator> results(
PackageIDComparator(env.package_database().get()));
unsigned success(0), total(0);
diff --git a/src/clients/adjutrix/keywords_graph.cc b/src/clients/adjutrix/keywords_graph.cc
index 77c8f1b..5e0a41d 100644
--- a/src/clients/adjutrix/keywords_graph.cc
+++ b/src/clients/adjutrix/keywords_graph.cc
@@ -75,7 +75,7 @@ namespace
std::tr1::shared_ptr<const PackageIDSequence> packages(e[selection::AllVersionsGroupedBySlot(
generator::Matches(make_package_dep_spec()
.package(package)
- .repository(repo.name())))]);
+ .in_repository(repo.name())))]);
std::tr1::shared_ptr<const PackageIDSequence> unused(task.execute(package));
if (packages->empty())
diff --git a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
index 4bcf957..e3a5769 100644
--- a/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
+++ b/src/clients/gtkpaludis/libgtkpaludis/packages_repository_filter_model.cc
@@ -93,7 +93,7 @@ PackagesRepositoryFilterModel::populate_in_gui_thread(std::tr1::shared_ptr<const
iterator r(append(repositories->children()));
(*r)[_imp->columns.col_text] = stringify(*n);
(*r)[_imp->columns.col_sensitive] = true;
- (*r)[_imp->columns.col_generator] = std::tr1::shared_ptr<Generator>(new generator::Repository(*n));
+ (*r)[_imp->columns.col_generator] = std::tr1::shared_ptr<Generator>(new generator::InRepository(*n));
}
}
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index d3d7bf5..db269de 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -236,7 +236,7 @@ main(int argc, char *argv[])
.master_repository_dir(FSEntry(CommandLine::get_instance()->a_master_repository_dir.argument())));
std::tr1::shared_ptr<const PackageIDSequence> ids(env[selection::AllVersionsSorted(
- generator::Repository(env.main_repository()->name()))]);
+ generator::InRepository(env.main_repository()->name()))]);
std::multimap<std::tr1::shared_ptr<const PackageID>, std::string, PackageIDComparator> results(env.package_database().get());
unsigned success(0), total(0);
diff --git a/src/output/console_install_task.cc b/src/output/console_install_task.cc
index 1a31fea..540f366 100644
--- a/src/output/console_install_task.cc
+++ b/src/output/console_install_task.cc
@@ -364,7 +364,7 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
std::tr1::shared_ptr<const PackageIDSequence> existing_repo((*environment())[selection::AllVersionsSorted(
generator::Matches(repo ?
- make_package_dep_spec().package(d.package_id->name()).repository(*repo) :
+ make_package_dep_spec().package(d.package_id->name()).in_repository(*repo) :
make_package_dep_spec().package(d.package_id->name())))]);
std::tr1::shared_ptr<const PackageIDSequence> existing_slot_repo((*environment())[selection::AllVersionsSorted(
@@ -372,7 +372,7 @@ ConsoleInstallTask::on_display_merge_list_entry(const DepListEntry & d)
make_package_dep_spec()
.package(d.package_id->name())
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(d.package_id->slot())))
- .repository(*repo) :
+ .in_repository(*repo) :
make_package_dep_spec()
.package(d.package_id->name())
.slot_requirement(make_shared_ptr(new UserSlotExactRequirement(d.package_id->slot())))
diff --git a/src/output/console_query_task.cc b/src/output/console_query_task.cc
index b50968b..bcef223 100644
--- a/src/output/console_query_task.cc
+++ b/src/output/console_query_task.cc
@@ -111,7 +111,7 @@ void
ConsoleQueryTask::display_header(const PackageDepSpec & a, const std::tr1::shared_ptr<const PackageID> & e) const
{
if (a.version_requirements_ptr() || a.slot_requirement_ptr() || a.additional_requirements_ptr() ||
- a.repository_ptr())
+ a.in_repository_ptr() || a.from_repository_ptr())
output_starred_item(render_as_package_name(stringify(a)));
else
output_starred_item(render_as_package_name(stringify(e->name())));
@@ -121,7 +121,7 @@ void
ConsoleQueryTask::display_compact(const PackageDepSpec & a, const std::tr1::shared_ptr<const PackageID> & e) const
{
if (a.version_requirements_ptr() || a.slot_requirement_ptr() || a.additional_requirements_ptr() ||
- a.repository_ptr())
+ a.in_repository_ptr() || a.from_repository_ptr())
{
std::string pad(std::max<long>(1, 30 - stringify(a).length()), ' ');
output_starred_item_no_endl(render_as_package_name(stringify(a)) + pad);