aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Danny van Dyk <dvandyk@exherbo.org> 2006-12-02 23:23:21 +0000
committerAvatar Danny van Dyk <dvandyk@exherbo.org> 2006-12-02 23:23:21 +0000
commit86ff297c3de3a9d89bd5774612c16b709b778cd8 (patch)
tree4f827630ea87b6e91d5e3f4e2aa689752dadc037
parent69cade72d6fb011666c962110ff6e4cb873b4a8d (diff)
downloadpaludis-86ff297c3de3a9d89bd5774612c16b709b778cd8.tar.gz
paludis-86ff297c3de3a9d89bd5774612c16b709b778cd8.tar.xz
Kill unused code. Fix bug in entry-loading.
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 9c62530..106e3d3 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -76,9 +76,6 @@ namespace paludis
/// Load entries.
void load_entries() const;
- /// Load metadata for one entry.
- void load_entry(std::vector<CRANDescription>::iterator) const;
-
/// Metadata cache
mutable MetadataMap metadata;
@@ -227,6 +224,9 @@ CRANInstalledRepository::do_package_names(const CategoryNamePart & c) const
Context context("When fetching package names in category '" + stringify(c)
+ "' in " + stringify(name()) + ":");
+ if (! _imp->entries_valid)
+ _imp->load_entries();
+
QualifiedPackageNameCollection::Pointer result(new QualifiedPackageNameCollection::Concrete);
if (! do_has_category_named(c))
return result;
@@ -246,6 +246,9 @@ CRANInstalledRepository::do_version_specs(const QualifiedPackageName & n) const
VersionSpecCollection::Pointer result(new VersionSpecCollection::Concrete);
+ if (! _imp->entries_valid)
+ _imp->load_entries();
+
std::pair<std::vector<CRANDescription>::const_iterator, std::vector<CRANDescription>::const_iterator>
r(std::equal_range(_imp->entries.begin(), _imp->entries.end(), n,
CRANDescription::ComparePackage()));