diff options
author | 2011-09-04 22:08:23 +0100 | |
---|---|---|
committer | 2011-09-04 22:08:23 +0100 | |
commit | e4445c29bad5f4b6eca307dcb5927ab7ac021df7 (patch) | |
tree | 506cf193175dba526c81fbec54469fc7b3c1413c /paludis | |
parent | c90d4dec7920a8d70949d8e2e71e704d2800d2c1 (diff) | |
download | paludis-e4445c29bad5f4b6eca307dcb5927ab7ac021df7.tar.gz paludis-e4445c29bad5f4b6eca307dcb5927ab7ac021df7.tar.xz |
Remove PackageID::contents_key
Diffstat (limited to 'paludis')
33 files changed, 13 insertions, 117 deletions
diff --git a/paludis/broken_linkage_finder.cc b/paludis/broken_linkage_finder.cc index d8bdd9afb..2cc0cbaa9 100644 --- a/paludis/broken_linkage_finder.cc +++ b/paludis/broken_linkage_finder.cc @@ -331,10 +331,7 @@ Imp<BrokenLinkageFinder>::gather_package(const std::shared_ptr<const PackageID> Context ctx("When gathering the contents of " + stringify(*pkg) + ":"); - std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > key(pkg->contents_key()); - if (! key) - return; - std::shared_ptr<const Contents> contents(key->parse_value()); + auto contents(pkg->contents()); if (! contents) return; diff --git a/paludis/contents.hh b/paludis/contents.hh index 38fde1a19..818f55b84 100644 --- a/paludis/contents.hh +++ b/paludis/contents.hh @@ -191,7 +191,7 @@ namespace paludis }; /** - * A package's contents, obtainable by PackageID::contents_key. + * A package's contents, obtainable by PackageID::contents. * * \ingroup g_contents * \nosubgrouping diff --git a/paludis/package_id.hh b/paludis/package_id.hh index d1a43d5f0..65d32e8f7 100644 --- a/paludis/package_id.hh +++ b/paludis/package_id.hh @@ -246,14 +246,6 @@ namespace paludis virtual const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const = 0; /** - * The contents_key, if non-zero, contains the contents of a - * package. For installed packages, this means the files installed; - * for installable packages, this means the files that will be - * installed (if known, which it may be for some binary packages). - */ - virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > contents_key() const = 0; - - /** * The installed_time_key, if non-zero, contains the time a package * was installed. It affects dependency resolution if DepList is * using dl_reinstall_scm_daily or dl_reinstall_scm_weekly. diff --git a/paludis/repositories/accounts/accounts_id.cc b/paludis/repositories/accounts/accounts_id.cc index 88a80affe..a0e7c1f91 100644 --- a/paludis/repositories/accounts/accounts_id.cc +++ b/paludis/repositories/accounts/accounts_id.cc @@ -371,12 +371,6 @@ AccountsID::long_description_key() const return make_null_shared_ptr(); } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -AccountsID::contents_key() const -{ - return make_null_shared_ptr(); -} - const std::shared_ptr<const MetadataTimeKey> AccountsID::installed_time_key() const { diff --git a/paludis/repositories/accounts/accounts_id.hh b/paludis/repositories/accounts/accounts_id.hh index a310b0528..3fd41db77 100644 --- a/paludis/repositories/accounts/accounts_id.hh +++ b/paludis/repositories/accounts/accounts_id.hh @@ -70,7 +70,6 @@ namespace paludis virtual const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > contents_key() const; virtual const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; virtual const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const; virtual const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; diff --git a/paludis/repositories/accounts/installed_accounts_id.cc b/paludis/repositories/accounts/installed_accounts_id.cc index 50580c4c1..c69aa2889 100644 --- a/paludis/repositories/accounts/installed_accounts_id.cc +++ b/paludis/repositories/accounts/installed_accounts_id.cc @@ -282,12 +282,6 @@ InstalledAccountsID::long_description_key() const return make_null_shared_ptr(); } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -InstalledAccountsID::contents_key() const -{ - return make_null_shared_ptr(); -} - const std::shared_ptr<const MetadataTimeKey> InstalledAccountsID::installed_time_key() const { diff --git a/paludis/repositories/accounts/installed_accounts_id.hh b/paludis/repositories/accounts/installed_accounts_id.hh index 5328c2626..02572f525 100644 --- a/paludis/repositories/accounts/installed_accounts_id.hh +++ b/paludis/repositories/accounts/installed_accounts_id.hh @@ -68,7 +68,6 @@ namespace paludis virtual const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > contents_key() const; virtual const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; virtual const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const; virtual const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; diff --git a/paludis/repositories/e/e_installed_repository_id.cc b/paludis/repositories/e/e_installed_repository_id.cc index 16bcea26d..a3a03b6ca 100644 --- a/paludis/repositories/e/e_installed_repository_id.cc +++ b/paludis/repositories/e/e_installed_repository_id.cc @@ -860,17 +860,11 @@ EInstalledRepositoryID::long_description_key() const return _imp->keys->long_description; } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -EInstalledRepositoryID::contents_key() const -{ - need_keys_added(); - return _imp->keys->contents; -} - const std::shared_ptr<const Contents> EInstalledRepositoryID::contents() const { - return contents_key()->parse_value(); + need_keys_added(); + return _imp->keys->contents->parse_value(); } const std::shared_ptr<const MetadataTimeKey> diff --git a/paludis/repositories/e/e_installed_repository_id.hh b/paludis/repositories/e/e_installed_repository_id.hh index 8fa93bc66..58000fc4d 100644 --- a/paludis/repositories/e/e_installed_repository_id.hh +++ b/paludis/repositories/e/e_installed_repository_id.hh @@ -69,7 +69,6 @@ namespace paludis virtual const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > contents_key() const; virtual const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; virtual const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; virtual const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const; diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc index 0a34b5779..5ced8bcd4 100644 --- a/paludis/repositories/e/ebuild_id.cc +++ b/paludis/repositories/e/ebuild_id.cc @@ -869,12 +869,6 @@ EbuildID::long_description_key() const return _imp->long_description; } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -EbuildID::contents_key() const -{ - return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > >(); -} - const std::shared_ptr<const MetadataTimeKey> EbuildID::installed_time_key() const { diff --git a/paludis/repositories/e/ebuild_id.hh b/paludis/repositories/e/ebuild_id.hh index db76271e8..bc9d706a2 100644 --- a/paludis/repositories/e/ebuild_id.hh +++ b/paludis/repositories/e/ebuild_id.hh @@ -79,7 +79,6 @@ namespace paludis virtual const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > contents_key() const; virtual const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; virtual const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > choices_key() const; diff --git a/paludis/repositories/e/exndbam_id.cc b/paludis/repositories/e/exndbam_id.cc index 7cc08faa6..21c530ba6 100644 --- a/paludis/repositories/e/exndbam_id.cc +++ b/paludis/repositories/e/exndbam_id.cc @@ -119,4 +119,3 @@ ExndbamID::make_contents_key() const return std::make_shared<ExndbamContentsKey>(this, _ndbam); } - diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc index fe26f26f4..902e7c605 100644 --- a/paludis/repositories/e/vdb_repository.cc +++ b/paludis/repositories/e/vdb_repository.cc @@ -443,7 +443,7 @@ VDBRepository::perform_uninstall( std::shared_ptr<const Contents> contents(a.options.override_contents()); if (! contents) - contents = id->contents_key()->parse_value(); + contents = id->contents(); /* unmerge */ VDBUnmerger unmerger( @@ -689,7 +689,7 @@ VDBRepository::merge(const MergeParams & m) std::shared_ptr<const Contents> is_replace_contents; if (is_replace) { - is_replace_contents = is_replace->contents_key()->parse_value(); + is_replace_contents = is_replace->contents(); FSPath old_vdb_dir(_imp->params.location()); old_vdb_dir /= stringify(is_replace->name().category()); diff --git a/paludis/repositories/e/vdb_repository_TEST.cc b/paludis/repositories/e/vdb_repository_TEST.cc index b1c764646..5c1c36fa6 100644 --- a/paludis/repositories/e/vdb_repository_TEST.cc +++ b/paludis/repositories/e/vdb_repository_TEST.cc @@ -222,7 +222,7 @@ TEST(VDBRepository, Contents) PackageDepSpec(parse_user_package_dep_spec("=cat-one/pkg-one-1", &env, { })), make_null_shared_ptr(), { }))]->begin()); ContentsGatherer gatherer; - auto contents(e1->contents_key()->parse_value()); + auto contents(e1->contents()); std::for_each(indirect_iterator(contents->begin()), indirect_iterator(contents->end()), accept_visitor(gatherer)); diff --git a/paludis/repositories/e/vdb_unmerger_TEST.cc b/paludis/repositories/e/vdb_unmerger_TEST.cc index 949c09f91..37c3809db 100644 --- a/paludis/repositories/e/vdb_unmerger_TEST.cc +++ b/paludis/repositories/e/vdb_unmerger_TEST.cc @@ -122,7 +122,7 @@ namespace unmerger = std::make_shared<VDBUnmergerNoDisplay>(make_named_values<VDBUnmergerOptions>( n::config_protect() = "/protected_file /protected_dir", n::config_protect_mask() = "/protected_dir/unprotected_file /protected_dir/unprotected_dir", - n::contents() = id->contents_key()->parse_value(), + n::contents() = id->contents(), n::environment() = &env, n::ignore() = &ignore_nothing, n::output_manager() = std::make_shared<StandardOutputManager>(), diff --git a/paludis/repositories/fake/fake_package_id.cc b/paludis/repositories/fake/fake_package_id.cc index 5fbc7aa43..37d0c58a9 100644 --- a/paludis/repositories/fake/fake_package_id.cc +++ b/paludis/repositories/fake/fake_package_id.cc @@ -841,13 +841,6 @@ FakePackageID::long_description_key() const return std::shared_ptr<const MetadataValueKey<std::string> >(); } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -FakePackageID::contents_key() const -{ - need_keys_added(); - return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > >(); -} - const std::shared_ptr<const MetadataTimeKey> FakePackageID::installed_time_key() const { diff --git a/paludis/repositories/fake/fake_package_id.hh b/paludis/repositories/fake/fake_package_id.hh index 59d5b9d1b..7ae2185ab 100644 --- a/paludis/repositories/fake/fake_package_id.hh +++ b/paludis/repositories/fake/fake_package_id.hh @@ -249,7 +249,6 @@ namespace paludis virtual const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > contents_key() const; virtual const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; virtual const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; virtual const std::shared_ptr<const MetadataValueKey<long> > size_of_download_required_key() const; diff --git a/paludis/repositories/gemcutter/gemcutter_id.cc b/paludis/repositories/gemcutter/gemcutter_id.cc index ef426b04a..520628826 100644 --- a/paludis/repositories/gemcutter/gemcutter_id.cc +++ b/paludis/repositories/gemcutter/gemcutter_id.cc @@ -383,12 +383,6 @@ GemcutterID::homepage_key() const return _imp->homepage_uri_key; } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -GemcutterID::contents_key() const -{ - return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > >(); -} - const std::shared_ptr<const MetadataTimeKey> GemcutterID::installed_time_key() const { diff --git a/paludis/repositories/gemcutter/gemcutter_id.hh b/paludis/repositories/gemcutter/gemcutter_id.hh index 495b787ff..6ea648537 100644 --- a/paludis/repositories/gemcutter/gemcutter_id.hh +++ b/paludis/repositories/gemcutter/gemcutter_id.hh @@ -79,8 +79,6 @@ namespace paludis const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > - contents_key() const; const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key() const; diff --git a/paludis/repositories/repository/repository_id.cc b/paludis/repositories/repository/repository_id.cc index 2e2789305..f2c6ac9e2 100644 --- a/paludis/repositories/repository/repository_id.cc +++ b/paludis/repositories/repository/repository_id.cc @@ -246,12 +246,6 @@ RepositoryID::homepage_key() const return std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> >(); } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -RepositoryID::contents_key() const -{ - return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > >(); -} - const std::shared_ptr<const MetadataTimeKey> RepositoryID::installed_time_key() const { diff --git a/paludis/repositories/repository/repository_id.hh b/paludis/repositories/repository/repository_id.hh index 71f439310..a03c4d359 100644 --- a/paludis/repositories/repository/repository_id.hh +++ b/paludis/repositories/repository/repository_id.hh @@ -77,8 +77,6 @@ namespace paludis const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > - contents_key() const; const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key() const; diff --git a/paludis/repositories/unavailable/unavailable_package_id.cc b/paludis/repositories/unavailable/unavailable_package_id.cc index 6552c905e..a2714034b 100644 --- a/paludis/repositories/unavailable/unavailable_package_id.cc +++ b/paludis/repositories/unavailable/unavailable_package_id.cc @@ -270,12 +270,6 @@ UnavailablePackageID::homepage_key() const return std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> >(); } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -UnavailablePackageID::contents_key() const -{ - return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > >(); -} - const std::shared_ptr<const MetadataTimeKey> UnavailablePackageID::installed_time_key() const { diff --git a/paludis/repositories/unavailable/unavailable_package_id.hh b/paludis/repositories/unavailable/unavailable_package_id.hh index c99c0eea5..c2604b83a 100644 --- a/paludis/repositories/unavailable/unavailable_package_id.hh +++ b/paludis/repositories/unavailable/unavailable_package_id.hh @@ -91,8 +91,6 @@ namespace paludis const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > - contents_key() const; const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key() const; diff --git a/paludis/repositories/unavailable/unavailable_repository_id.cc b/paludis/repositories/unavailable/unavailable_repository_id.cc index a3f0c2f19..b1cc70c54 100644 --- a/paludis/repositories/unavailable/unavailable_repository_id.cc +++ b/paludis/repositories/unavailable/unavailable_repository_id.cc @@ -379,12 +379,6 @@ UnavailableRepositoryID::homepage_key() const return std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> >(); } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -UnavailableRepositoryID::contents_key() const -{ - return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > >(); -} - const std::shared_ptr<const MetadataTimeKey> UnavailableRepositoryID::installed_time_key() const { diff --git a/paludis/repositories/unavailable/unavailable_repository_id.hh b/paludis/repositories/unavailable/unavailable_repository_id.hh index 7791d8341..c50993e10 100644 --- a/paludis/repositories/unavailable/unavailable_repository_id.hh +++ b/paludis/repositories/unavailable/unavailable_repository_id.hh @@ -91,8 +91,6 @@ namespace paludis const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > - contents_key() const; const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key() const; diff --git a/paludis/repositories/unpackaged/installed_id.cc b/paludis/repositories/unpackaged/installed_id.cc index 79ebe9a3e..0d6a4bdfb 100644 --- a/paludis/repositories/unpackaged/installed_id.cc +++ b/paludis/repositories/unpackaged/installed_id.cc @@ -598,16 +598,10 @@ InstalledUnpackagedID::long_description_key() const return std::shared_ptr<const MetadataValueKey<std::string> >(); } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -InstalledUnpackagedID::contents_key() const -{ - return _imp->contents_key; -} - const std::shared_ptr<const Contents> InstalledUnpackagedID::contents() const { - return contents_key()->parse_value(); + return _imp->contents_key->parse_value(); } const std::shared_ptr<const MetadataTimeKey> diff --git a/paludis/repositories/unpackaged/installed_id.hh b/paludis/repositories/unpackaged/installed_id.hh index fbb36a10f..558ebdaaa 100644 --- a/paludis/repositories/unpackaged/installed_id.hh +++ b/paludis/repositories/unpackaged/installed_id.hh @@ -66,7 +66,6 @@ namespace paludis virtual const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > contents_key() const; virtual const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; virtual const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; virtual const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key() const; diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc index 72c5e2a7c..70f047f40 100644 --- a/paludis/repositories/unpackaged/installed_repository_TEST.cc +++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc @@ -139,9 +139,9 @@ TEST(InstalledRepository, Metadata) EXPECT_TRUE(bool(id1->fs_location_key())); EXPECT_EQ(id1->fs_location_key()->parse_value(), FSPath::cwd() / "installed_repository_TEST_dir/repo1/data/giant-space-weasel/1:0:foo/"); - EXPECT_TRUE(bool(id1->contents_key())); + EXPECT_TRUE(bool(id1->contents())); ContentsDumper d1; - auto contents1(id1->contents_key()->parse_value()); + auto contents1(id1->contents()); std::for_each(indirect_iterator(contents1->begin()), indirect_iterator(contents1->end()), accept_visitor(d1)); EXPECT_EQ("dir</fnord>", d1.s.str()); @@ -156,9 +156,9 @@ TEST(InstalledRepository, Metadata) EXPECT_TRUE(bool(id2->fs_location_key())); EXPECT_EQ(id2->fs_location_key()->parse_value(), FSPath::cwd() / "installed_repository_TEST_dir/repo1/data/giant-space-weasel/2:1:bar/"); - EXPECT_TRUE(bool(id2->contents_key())); + EXPECT_TRUE(bool(id2->contents())); ContentsDumper d2; - auto contents2(id2->contents_key()->parse_value()); + auto contents2(id2->contents()); std::for_each(indirect_iterator(contents2->begin()), indirect_iterator(contents2->end()), accept_visitor(d2)); EXPECT_EQ("dir</stilton>file</stilton/cheese>file</stilton/is delicious>", d2.s.str()); } diff --git a/paludis/repositories/unpackaged/unpackaged_id.cc b/paludis/repositories/unpackaged/unpackaged_id.cc index 65ec5d20e..5c312b8f7 100644 --- a/paludis/repositories/unpackaged/unpackaged_id.cc +++ b/paludis/repositories/unpackaged/unpackaged_id.cc @@ -257,12 +257,6 @@ UnpackagedID::long_description_key() const return std::shared_ptr<const MetadataValueKey<std::string> >(); } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -UnpackagedID::contents_key() const -{ - return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > >(); -} - const std::shared_ptr<const MetadataTimeKey> UnpackagedID::installed_time_key() const { diff --git a/paludis/repositories/unpackaged/unpackaged_id.hh b/paludis/repositories/unpackaged/unpackaged_id.hh index 71e948e2a..89200a5dd 100644 --- a/paludis/repositories/unpackaged/unpackaged_id.hh +++ b/paludis/repositories/unpackaged/unpackaged_id.hh @@ -65,7 +65,6 @@ namespace paludis virtual const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; virtual const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > contents_key() const; virtual const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; virtual const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; virtual const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key() const; diff --git a/paludis/repositories/unwritten/unwritten_id.cc b/paludis/repositories/unwritten/unwritten_id.cc index 83e22f5e1..c9d3f468e 100644 --- a/paludis/repositories/unwritten/unwritten_id.cc +++ b/paludis/repositories/unwritten/unwritten_id.cc @@ -276,12 +276,6 @@ UnwrittenID::homepage_key() const return _imp->homepage_key; } -const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > -UnwrittenID::contents_key() const -{ - return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > >(); -} - const std::shared_ptr<const MetadataTimeKey> UnwrittenID::installed_time_key() const { diff --git a/paludis/repositories/unwritten/unwritten_id.hh b/paludis/repositories/unwritten/unwritten_id.hh index a4a4f9238..43518ceac 100644 --- a/paludis/repositories/unwritten/unwritten_id.hh +++ b/paludis/repositories/unwritten/unwritten_id.hh @@ -103,8 +103,6 @@ namespace paludis const std::shared_ptr<const MetadataSpecTreeKey<SimpleURISpecTree> > homepage_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > short_description_key() const; const std::shared_ptr<const MetadataValueKey<std::string> > long_description_key() const; - const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Contents> > > - contents_key() const; const std::shared_ptr<const MetadataTimeKey> installed_time_key() const; const std::shared_ptr<const MetadataValueKey<FSPath> > fs_location_key() const; const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > behaviours_key() const; diff --git a/paludis/user_dep_spec.cc b/paludis/user_dep_spec.cc index 65453b391..7c336f686 100644 --- a/paludis/user_dep_spec.cc +++ b/paludis/user_dep_spec.cc @@ -929,8 +929,6 @@ UserKeyRequirement::requirement_met( key = id->build_dependencies_key().get(); else if (_imp->key == "$choices") key = id->choices_key().get(); - else if (_imp->key == "$contents") - key = id->contents_key().get(); else if (_imp->key == "$dependencies") key = id->dependencies_key().get(); else if (_imp->key == "$fetches") |