aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/gems
diff options
context:
space:
mode:
Diffstat (limited to 'paludis/repositories/gems')
-rw-r--r--paludis/repositories/gems/gem_specification.cc12
-rw-r--r--paludis/repositories/gems/gem_specification.hh5
-rw-r--r--paludis/repositories/gems/gems_repository.cc18
-rw-r--r--paludis/repositories/gems/gems_repository.hh4
-rw-r--r--paludis/repositories/gems/gems_repository_TEST.cc6
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc20
-rw-r--r--paludis/repositories/gems/installed_gems_repository.hh4
-rw-r--r--paludis/repositories/gems/params.hh14
8 files changed, 41 insertions, 42 deletions
diff --git a/paludis/repositories/gems/gem_specification.cc b/paludis/repositories/gems/gem_specification.cc
index 366e54e4f..52ef46d74 100644
--- a/paludis/repositories/gems/gem_specification.cc
+++ b/paludis/repositories/gems/gem_specification.cc
@@ -55,10 +55,10 @@ namespace paludis
std::shared_ptr<LiteralMetadataValueKey<std::string> > summary_key;
std::shared_ptr<LiteralMetadataValueKey<std::string> > authors_key;
std::shared_ptr<LiteralMetadataValueKey<std::string> > rubyforge_project_key;
- std::shared_ptr<LiteralMetadataValueKey<FSEntry> > fs_location_key;
+ std::shared_ptr<LiteralMetadataValueKey<FSPath> > fs_location_key;
std::shared_ptr<LiteralMetadataValueKey<SlotName> > slot_key;
- std::shared_ptr<const FSEntry> load_from_file;
+ std::shared_ptr<const FSPath> load_from_file;
const Environment * const environment;
const std::shared_ptr<const Repository> repository;
@@ -266,14 +266,14 @@ GemSpecification::GemSpecification(const Environment * const e,
GemSpecification::GemSpecification(const Environment * const e, const std::shared_ptr<const Repository> & r,
- const PackageNamePart & q, const VersionSpec & v, const FSEntry & f) :
+ const PackageNamePart & q, const VersionSpec & v, const FSPath & f) :
Pimp<GemSpecification>(e, r),
_imp(Pimp<GemSpecification>::_imp)
{
_imp->name_part = stringify(q);
_imp->version = stringify(v);
- _imp->load_from_file = std::make_shared<FSEntry>(f);
- _imp->fs_location_key = std::make_shared<LiteralMetadataValueKey<FSEntry> >("GEM", "Gem Location", mkt_internal, f);
+ _imp->load_from_file = std::make_shared<FSPath>(f);
+ _imp->fs_location_key = std::make_shared<LiteralMetadataValueKey<FSPath> >("GEM", "Gem Location", mkt_internal, f);
add_metadata_key(_imp->fs_location_key);
_imp->slot_key = std::make_shared<LiteralMetadataValueKey<SlotName>>("SLOT", "Slot", mkt_internal, SlotName(stringify(v)));
add_metadata_key(_imp->slot_key);
@@ -409,7 +409,7 @@ GemSpecification::long_description_key() const
return _imp->description_key;
}
-const std::shared_ptr<const MetadataValueKey<FSEntry> >
+const std::shared_ptr<const MetadataValueKey<FSPath> >
GemSpecification::fs_location_key() const
{
return _imp->fs_location_key;
diff --git a/paludis/repositories/gems/gem_specification.hh b/paludis/repositories/gems/gem_specification.hh
index 26f44c035..a487ec5c8 100644
--- a/paludis/repositories/gems/gem_specification.hh
+++ b/paludis/repositories/gems/gem_specification.hh
@@ -27,7 +27,6 @@
#include <paludis/util/attributes.hh>
#include <paludis/util/pimp.hh>
#include <paludis/util/exception.hh>
-#include <paludis/util/fs_entry-fwd.hh>
#include <string>
namespace paludis
@@ -76,7 +75,7 @@ namespace paludis
GemSpecification(const Environment * const e, const std::shared_ptr<const Repository> &, const yaml::Node &);
GemSpecification(const Environment * const e, const std::shared_ptr<const Repository> &, const PackageNamePart &,
- const VersionSpec &, const FSEntry &);
+ const VersionSpec &, const FSPath &);
~GemSpecification();
@@ -106,7 +105,7 @@ namespace paludis
virtual const std::shared_ptr<const MetadataCollectionKey<PackageIDSequence> > contains_key() const;
virtual const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const PackageID> > > contained_in_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<FSEntry> > fs_location_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 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;
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index 88fd606dc..7940957bc 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -60,9 +60,9 @@ namespace paludis
mutable bool has_category_names;
mutable bool has_ids;
- std::shared_ptr<const MetadataValueKey<FSEntry> > location_key;
- std::shared_ptr<const MetadataValueKey<FSEntry> > install_dir_key;
- std::shared_ptr<const MetadataValueKey<FSEntry> > builddir_key;
+ std::shared_ptr<const MetadataValueKey<FSPath> > location_key;
+ std::shared_ptr<const MetadataValueKey<FSPath> > install_dir_key;
+ std::shared_ptr<const MetadataValueKey<FSPath> > builddir_key;
std::shared_ptr<const MetadataValueKey<std::string> > sync_key;
std::shared_ptr<const MetadataValueKey<std::string> > sync_options_key;
std::shared_ptr<const MetadataValueKey<std::string> > format_key;
@@ -72,11 +72,11 @@ namespace paludis
big_nasty_mutex(m),
has_category_names(false),
has_ids(false),
- location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
+ location_key(std::make_shared<LiteralMetadataValueKey<FSPath> >("location", "location",
mkt_significant, params.location())),
- install_dir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("install_dir", "install_dir",
+ install_dir_key(std::make_shared<LiteralMetadataValueKey<FSPath> >("install_dir", "install_dir",
mkt_normal, params.install_dir())),
- builddir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("builddir", "builddir",
+ builddir_key(std::make_shared<LiteralMetadataValueKey<FSPath> >("builddir", "builddir",
mkt_normal, params.builddir())),
sync_key(std::make_shared<LiteralMetadataValueKey<std::string> >("sync", "sync",
mkt_normal, params.sync())),
@@ -348,16 +348,16 @@ GemsRepository::format_key() const
return _imp->format_key;
}
-const std::shared_ptr<const MetadataValueKey<FSEntry> >
+const std::shared_ptr<const MetadataValueKey<FSPath> >
GemsRepository::location_key() const
{
return _imp->location_key;
}
-const std::shared_ptr<const MetadataValueKey<FSEntry> >
+const std::shared_ptr<const MetadataValueKey<FSPath> >
GemsRepository::installed_root_key() const
{
- return std::shared_ptr<const MetadataValueKey<FSEntry> >();
+ return std::shared_ptr<const MetadataValueKey<FSPath> >();
}
std::shared_ptr<Repository>
diff --git a/paludis/repositories/gems/gems_repository.hh b/paludis/repositories/gems/gems_repository.hh
index 41b254d4a..c387690c1 100644
--- a/paludis/repositories/gems/gems_repository.hh
+++ b/paludis/repositories/gems/gems_repository.hh
@@ -93,8 +93,8 @@ namespace paludis
/* Keys */
virtual const std::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<FSEntry> > location_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<FSEntry> > installed_root_key() const;
+ virtual const std::shared_ptr<const MetadataValueKey<FSPath> > location_key() const;
+ virtual const std::shared_ptr<const MetadataValueKey<FSPath> > installed_root_key() const;
virtual const std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key() const;
virtual const std::shared_ptr<const MetadataValueKey<std::string> > sync_host_key() const;
diff --git a/paludis/repositories/gems/gems_repository_TEST.cc b/paludis/repositories/gems/gems_repository_TEST.cc
index d228075ad..06b2c8416 100644
--- a/paludis/repositories/gems/gems_repository_TEST.cc
+++ b/paludis/repositories/gems/gems_repository_TEST.cc
@@ -39,10 +39,10 @@ namespace test_cases
TestEnvironment env;
env.package_database()->add_repository(1, std::make_shared<GemsRepository>(
make_named_values<gems::RepositoryParams>(
- n::builddir() = FSEntry("gems_repository_TEST_dir/build"),
+ n::builddir() = FSPath("gems_repository_TEST_dir/build"),
n::environment() = &env,
- n::install_dir() = FSEntry("gems_repository_TEST_dir/install"),
- n::location() = FSEntry("gems_repository_TEST_dir/repo"),
+ n::install_dir() = FSPath("gems_repository_TEST_dir/install"),
+ n::location() = FSPath("gems_repository_TEST_dir/repo"),
n::sync() = "",
n::sync_options() = ""
)));
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index e2e6331c7..350f87b54 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -27,7 +27,6 @@
#include <paludis/environment.hh>
#include <paludis/util/stringify.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/dir_iterator.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/is_file_with_extension.hh>
@@ -38,6 +37,7 @@
#include <paludis/util/hashes.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_null_shared_ptr.hh>
+#include <paludis/util/fs_iterator.hh>
#include <paludis/literal_metadata_key.hh>
#include <paludis/distribution.hh>
#include <paludis/action.hh>
@@ -69,9 +69,9 @@ namespace paludis
mutable bool has_category_names;
mutable bool has_ids;
- std::shared_ptr<const MetadataValueKey<FSEntry> > install_dir_key;
- std::shared_ptr<const MetadataValueKey<FSEntry> > builddir_key;
- std::shared_ptr<const MetadataValueKey<FSEntry> > root_key;
+ std::shared_ptr<const MetadataValueKey<FSPath> > install_dir_key;
+ std::shared_ptr<const MetadataValueKey<FSPath> > builddir_key;
+ std::shared_ptr<const MetadataValueKey<FSPath> > root_key;
std::shared_ptr<const MetadataValueKey<std::string> > format_key;
Imp(const gems::InstalledRepositoryParams p,
@@ -80,11 +80,11 @@ namespace paludis
params(p),
has_category_names(false),
has_ids(false),
- install_dir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("install_dir", "install_dir",
+ install_dir_key(std::make_shared<LiteralMetadataValueKey<FSPath> >("install_dir", "install_dir",
mkt_normal, params.install_dir())),
- builddir_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("builddir", "builddir",
+ builddir_key(std::make_shared<LiteralMetadataValueKey<FSPath> >("builddir", "builddir",
mkt_normal, params.builddir())),
- root_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >(
+ root_key(std::make_shared<LiteralMetadataValueKey<FSPath> >(
"root", "root", mkt_normal, params.root())),
format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, "gems"))
@@ -233,7 +233,7 @@ InstalledGemsRepository::need_ids() const
std::shared_ptr<QualifiedPackageNameSet> pkgs(std::make_shared<QualifiedPackageNameSet>());
_imp->package_names.insert(std::make_pair(gems, pkgs));
- for (DirIterator d(_imp->params.install_dir() / "specifications"), d_end ; d != d_end ; ++d)
+ for (FSIterator d(_imp->params.install_dir() / "specifications", { }), d_end ; d != d_end ; ++d)
{
if (! is_file_with_extension(*d, ".gemspec", { }))
continue;
@@ -371,13 +371,13 @@ InstalledGemsRepository::format_key() const
return _imp->format_key;
}
-const std::shared_ptr<const MetadataValueKey<FSEntry> >
+const std::shared_ptr<const MetadataValueKey<FSPath> >
InstalledGemsRepository::location_key() const
{
return _imp->install_dir_key;
}
-const std::shared_ptr<const MetadataValueKey<FSEntry> >
+const std::shared_ptr<const MetadataValueKey<FSPath> >
InstalledGemsRepository::installed_root_key() const
{
return _imp->root_key;
diff --git a/paludis/repositories/gems/installed_gems_repository.hh b/paludis/repositories/gems/installed_gems_repository.hh
index 838ae386b..48999885e 100644
--- a/paludis/repositories/gems/installed_gems_repository.hh
+++ b/paludis/repositories/gems/installed_gems_repository.hh
@@ -108,8 +108,8 @@ namespace paludis
/* Keys */
virtual const std::shared_ptr<const MetadataValueKey<std::string> > format_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<FSEntry> > location_key() const;
- virtual const std::shared_ptr<const MetadataValueKey<FSEntry> > installed_root_key() const;
+ virtual const std::shared_ptr<const MetadataValueKey<FSPath> > location_key() const;
+ virtual const std::shared_ptr<const MetadataValueKey<FSPath> > installed_root_key() const;
virtual const std::shared_ptr<const MetadataValueKey<std::string> > accept_keywords_key() const;
virtual const std::shared_ptr<const MetadataValueKey<std::string> > sync_host_key() const;
diff --git a/paludis/repositories/gems/params.hh b/paludis/repositories/gems/params.hh
index c5adda912..fb49f79b3 100644
--- a/paludis/repositories/gems/params.hh
+++ b/paludis/repositories/gems/params.hh
@@ -22,7 +22,7 @@
#include <paludis/repositories/gems/params-fwd.hh>
#include <paludis/util/attributes.hh>
-#include <paludis/util/fs_entry.hh>
+#include <paludis/util/fs_path.hh>
#include <paludis/util/named_value.hh>
#include <string>
@@ -45,20 +45,20 @@ namespace paludis
{
struct RepositoryParams
{
- NamedValue<n::builddir, FSEntry> builddir;
+ NamedValue<n::builddir, FSPath> builddir;
NamedValue<n::environment, Environment *> environment;
- NamedValue<n::install_dir, FSEntry> install_dir;
- NamedValue<n::location, FSEntry> location;
+ NamedValue<n::install_dir, FSPath> install_dir;
+ NamedValue<n::location, FSPath> location;
NamedValue<n::sync, std::string> sync;
NamedValue<n::sync_options, std::string> sync_options;
};
struct InstalledRepositoryParams
{
- NamedValue<n::builddir, FSEntry> builddir;
+ NamedValue<n::builddir, FSPath> builddir;
NamedValue<n::environment, Environment *> environment;
- NamedValue<n::install_dir, FSEntry> install_dir;
- NamedValue<n::root, FSEntry> root;
+ NamedValue<n::install_dir, FSPath> install_dir;
+ NamedValue<n::root, FSPath> root;
};
}
}