aboutsummaryrefslogtreecommitdiff
path: root/paludis/repositories/unavailable
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-24 13:28:45 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-08-24 15:47:41 +0100
commit49750cc61904ba17060521bd345c6ae526fb1bf8 (patch)
tree8aa8c06a7d6ec58c62dd0741011e8357a19c8b8d /paludis/repositories/unavailable
parent75f48bbb1ae368febe984c10c2db2d0b5cbd7cec (diff)
downloadpaludis-49750cc61904ba17060521bd345c6ae526fb1bf8.tar.gz
paludis-49750cc61904ba17060521bd345c6ae526fb1bf8.tar.xz
FSEntry -> FSPath, FSStat
Fixes: ticket:967
Diffstat (limited to 'paludis/repositories/unavailable')
-rw-r--r--paludis/repositories/unavailable/unavailable_package_id.cc4
-rw-r--r--paludis/repositories/unavailable/unavailable_package_id.hh2
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.cc12
-rw-r--r--paludis/repositories/unavailable/unavailable_repository.hh6
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_TEST.cc4
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc1
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_file.cc4
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_file.hh6
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_id.cc12
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_id.hh2
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_store.cc11
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_store.hh8
12 files changed, 35 insertions, 37 deletions
diff --git a/paludis/repositories/unavailable/unavailable_package_id.cc b/paludis/repositories/unavailable/unavailable_package_id.cc
index 5b9f9e30b..0c4e7c774 100644
--- a/paludis/repositories/unavailable/unavailable_package_id.cc
+++ b/paludis/repositories/unavailable/unavailable_package_id.cc
@@ -215,10 +215,10 @@ UnavailablePackageID::contained_in_key() const
return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const PackageID> > >();
}
-const std::shared_ptr<const MetadataValueKey<FSEntry> >
+const std::shared_ptr<const MetadataValueKey<FSPath> >
UnavailablePackageID::fs_location_key() const
{
- return std::shared_ptr<const MetadataValueKey<FSEntry> >();
+ return std::shared_ptr<const MetadataValueKey<FSPath> >();
}
const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
diff --git a/paludis/repositories/unavailable/unavailable_package_id.hh b/paludis/repositories/unavailable/unavailable_package_id.hh
index f19af1e20..fcad0d6a2 100644
--- a/paludis/repositories/unavailable/unavailable_package_id.hh
+++ b/paludis/repositories/unavailable/unavailable_package_id.hh
@@ -103,7 +103,7 @@ namespace paludis
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<FSEntry> > fs_location_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;
const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > choices_key() const;
diff --git a/paludis/repositories/unavailable/unavailable_repository.cc b/paludis/repositories/unavailable/unavailable_repository.cc
index 38bf698a1..a1ee9490e 100644
--- a/paludis/repositories/unavailable/unavailable_repository.cc
+++ b/paludis/repositories/unavailable/unavailable_repository.cc
@@ -53,7 +53,7 @@ namespace paludis
const UnavailableRepositoryParams params;
const std::shared_ptr<LiteralMetadataValueKey<std::string> > format_key;
- const std::shared_ptr<LiteralMetadataValueKey<FSEntry> > location_key;
+ const std::shared_ptr<LiteralMetadataValueKey<FSPath> > location_key;
const std::shared_ptr<LiteralMetadataValueKey<std::string> > sync_key;
const std::shared_ptr<LiteralMetadataValueKey<std::string> > sync_options_key;
const std::shared_ptr<LiteralMetadataValueKey<std::string> > sync_host_key;
@@ -65,7 +65,7 @@ namespace paludis
params(p),
format_key(std::make_shared<LiteralMetadataValueKey<std::string> >("format", "format",
mkt_significant, "unavailable")),
- location_key(std::make_shared<LiteralMetadataValueKey<FSEntry> >("location", "location",
+ location_key(std::make_shared<LiteralMetadataValueKey<FSPath> >("location", "location",
mkt_significant, params.location())),
sync_key(std::make_shared<LiteralMetadataValueKey<std::string> >(
"sync", "sync", mkt_normal, params.sync())),
@@ -140,16 +140,16 @@ UnavailableRepository::format_key() const
return _imp->format_key;
}
-const std::shared_ptr<const MetadataValueKey<FSEntry> >
+const std::shared_ptr<const MetadataValueKey<FSPath> >
UnavailableRepository::location_key() const
{
return _imp->location_key;
}
-const std::shared_ptr<const MetadataValueKey<FSEntry> >
+const std::shared_ptr<const MetadataValueKey<FSPath> >
UnavailableRepository::installed_root_key() const
{
- return std::shared_ptr<const MetadataValueKey<FSEntry> >();
+ return std::shared_ptr<const MetadataValueKey<FSPath> >();
}
void
@@ -281,7 +281,7 @@ UnavailableRepository::sync(const std::shared_ptr<OutputManager> & output_manage
n::remote() = *s
));
SyncOptions opts(make_named_values<SyncOptions>(
- n::filter_file() = FSEntry("/dev/null"),
+ n::filter_file() = FSPath("/dev/null"),
n::options() = _imp->params.sync_options(),
n::output_manager() = output_manager
));
diff --git a/paludis/repositories/unavailable/unavailable_repository.hh b/paludis/repositories/unavailable/unavailable_repository.hh
index d4bdb8b49..ad8ce3371 100644
--- a/paludis/repositories/unavailable/unavailable_repository.hh
+++ b/paludis/repositories/unavailable/unavailable_repository.hh
@@ -48,7 +48,7 @@ namespace paludis
struct UnavailableRepositoryParams
{
NamedValue<n::environment, Environment *> environment;
- NamedValue<n::location, FSEntry> location;
+ NamedValue<n::location, FSPath> location;
NamedValue<n::name, RepositoryName> name;
NamedValue<n::sync, std::string> sync;
NamedValue<n::sync_options, std::string> sync_options;
@@ -76,8 +76,8 @@ namespace paludis
virtual const bool is_unimportant() const;
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/unavailable/unavailable_repository_TEST.cc b/paludis/repositories/unavailable/unavailable_repository_TEST.cc
index 4dc134758..968ff6a03 100644
--- a/paludis/repositories/unavailable/unavailable_repository_TEST.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_TEST.cc
@@ -51,7 +51,7 @@ namespace test_cases
std::shared_ptr<UnavailableRepository> repo(std::make_shared<UnavailableRepository>(
make_named_values<UnavailableRepositoryParams>(
n::environment() = &env,
- n::location() = FSEntry::cwd() / "unavailable_repository_TEST_dir" / "repo1",
+ n::location() = FSPath::cwd() / "unavailable_repository_TEST_dir" / "repo1",
n::name() = RepositoryName("unavailable"),
n::sync() = "",
n::sync_options() = ""
@@ -71,7 +71,7 @@ namespace test_cases
std::shared_ptr<UnavailableRepository> repo(std::make_shared<UnavailableRepository>(
make_named_values<UnavailableRepositoryParams>(
n::environment() = &env,
- n::location() = FSEntry::cwd() / "unavailable_repository_TEST_dir" / "repo2",
+ n::location() = FSPath::cwd() / "unavailable_repository_TEST_dir" / "repo2",
n::name() = RepositoryName("unavailable"),
n::sync() = "",
n::sync_options() = ""
diff --git a/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc b/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc
index 345731882..297696439 100644
--- a/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_dependencies_key.cc
@@ -19,7 +19,6 @@
#include <paludis/repositories/unavailable/unavailable_repository_dependencies_key.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/fs_entry.hh>
#include <paludis/util/set.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/return_literal_function.hh>
diff --git a/paludis/repositories/unavailable/unavailable_repository_file.cc b/paludis/repositories/unavailable/unavailable_repository_file.cc
index 359c9437d..4c0f723b4 100644
--- a/paludis/repositories/unavailable/unavailable_repository_file.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_file.cc
@@ -59,7 +59,7 @@ namespace paludis
};
}
-UnavailableRepositoryFile::UnavailableRepositoryFile(const FSEntry & f) :
+UnavailableRepositoryFile::UnavailableRepositoryFile(const FSPath & f) :
Pimp<UnavailableRepositoryFile>()
{
_load(f);
@@ -82,7 +82,7 @@ UnavailableRepositoryFile::end() const
}
void
-UnavailableRepositoryFile::_load(const FSEntry & f)
+UnavailableRepositoryFile::_load(const FSPath & f)
{
SafeIFStream file(f);
diff --git a/paludis/repositories/unavailable/unavailable_repository_file.hh b/paludis/repositories/unavailable/unavailable_repository_file.hh
index 0729e5fa1..1920af781 100644
--- a/paludis/repositories/unavailable/unavailable_repository_file.hh
+++ b/paludis/repositories/unavailable/unavailable_repository_file.hh
@@ -23,7 +23,7 @@
#include <paludis/repositories/unavailable/unavailable_repository_file-fwd.hh>
#include <paludis/util/pimp.hh>
#include <paludis/util/wrapped_forward_iterator.hh>
-#include <paludis/util/fs_entry.hh>
+#include <paludis/util/fs_path-fwd.hh>
namespace paludis
{
@@ -33,10 +33,10 @@ namespace paludis
private Pimp<UnavailableRepositoryFile>
{
private:
- void _load(const FSEntry &);
+ void _load(const FSPath &);
public:
- UnavailableRepositoryFile(const FSEntry &);
+ UnavailableRepositoryFile(const FSPath &);
~UnavailableRepositoryFile();
struct ConstIteratorTag;
diff --git a/paludis/repositories/unavailable/unavailable_repository_id.cc b/paludis/repositories/unavailable/unavailable_repository_id.cc
index 0dc64f627..f03463bc0 100644
--- a/paludis/repositories/unavailable/unavailable_repository_id.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_id.cc
@@ -197,7 +197,7 @@ namespace
return o;
}
- bool ignore_nothing(const FSEntry &)
+ bool ignore_nothing(const FSPath &)
{
return false;
}
@@ -227,9 +227,9 @@ UnavailableRepositoryID::perform_action(Action & action) const
(*install_action->options.destination()).destination_interface()->merge(
make_named_values<MergeParams>(
n::build_start_time() = build_start_time,
- n::environment_file() = FSEntry("/dev/null"),
- n::image_dir() = FSEntry("/dev/null"),
- n::merged_entries() = std::make_shared<FSEntrySet>(),
+ n::environment_file() = FSPath("/dev/null"),
+ n::image_dir() = FSPath("/dev/null"),
+ n::merged_entries() = std::make_shared<FSPathSet>(),
n::options() = MergerOptions(),
n::output_manager() = output_manager,
n::package_id() = shared_from_this(),
@@ -300,10 +300,10 @@ UnavailableRepositoryID::contained_in_key() const
return std::shared_ptr<const MetadataValueKey<std::shared_ptr<const PackageID> > >();
}
-const std::shared_ptr<const MetadataValueKey<FSEntry> >
+const std::shared_ptr<const MetadataValueKey<FSPath> >
UnavailableRepositoryID::fs_location_key() const
{
- return std::shared_ptr<const MetadataValueKey<FSEntry> >();
+ return std::shared_ptr<const MetadataValueKey<FSPath> >();
}
const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > >
diff --git a/paludis/repositories/unavailable/unavailable_repository_id.hh b/paludis/repositories/unavailable/unavailable_repository_id.hh
index bb935190b..6cfe456f7 100644
--- a/paludis/repositories/unavailable/unavailable_repository_id.hh
+++ b/paludis/repositories/unavailable/unavailable_repository_id.hh
@@ -103,7 +103,7 @@ namespace paludis
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<FSEntry> > fs_location_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;
const std::shared_ptr<const MetadataCollectionKey<Set<std::string> > > from_repositories_key() const;
const std::shared_ptr<const MetadataValueKey<std::shared_ptr<const Choices> > > choices_key() const;
diff --git a/paludis/repositories/unavailable/unavailable_repository_store.cc b/paludis/repositories/unavailable/unavailable_repository_store.cc
index dd4b7615c..f7207893a 100644
--- a/paludis/repositories/unavailable/unavailable_repository_store.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_store.cc
@@ -24,9 +24,7 @@
#include <paludis/repositories/unavailable/unavailable_repository_dependencies_key.hh>
#include <paludis/repositories/unavailable/unavailable_mask.hh>
#include <paludis/util/pimp-impl.hh>
-#include <paludis/util/fs_entry.hh>
#include <paludis/util/stringify.hh>
-#include <paludis/util/dir_iterator.hh>
#include <paludis/util/set.hh>
#include <paludis/util/sequence.hh>
#include <paludis/util/hashes.hh>
@@ -34,6 +32,7 @@
#include <paludis/util/log.hh>
#include <paludis/util/make_named_values.hh>
#include <paludis/util/make_null_shared_ptr.hh>
+#include <paludis/util/fs_iterator.hh>
#include <paludis/name.hh>
#include <paludis/version_spec.hh>
#include <paludis/literal_metadata_key.hh>
@@ -78,7 +77,7 @@ namespace paludis
UnavailableRepositoryStore::UnavailableRepositoryStore(
const Environment * const env,
const UnavailableRepository * const repo,
- const FSEntry & f) :
+ const FSPath & f) :
Pimp<UnavailableRepositoryStore>(repo)
{
_populate(env, f);
@@ -89,17 +88,17 @@ UnavailableRepositoryStore::~UnavailableRepositoryStore()
}
void
-UnavailableRepositoryStore::_populate(const Environment * const env, const FSEntry & f)
+UnavailableRepositoryStore::_populate(const Environment * const env, const FSPath & f)
{
Context context("When populating UnavailableRepository from directory '" + stringify(f) + "':");
using namespace std::placeholders;
- std::for_each(DirIterator(f), DirIterator(), std::bind(
+ std::for_each(FSIterator(f, { fsio_inode_sort }), FSIterator(), std::bind(
&UnavailableRepositoryStore::_populate_one, this, env, _1));
}
void
-UnavailableRepositoryStore::_populate_one(const Environment * const env, const FSEntry & f)
+UnavailableRepositoryStore::_populate_one(const Environment * const env, const FSPath & f)
{
if (! is_file_with_extension(f, ".repository", { }))
return;
diff --git a/paludis/repositories/unavailable/unavailable_repository_store.hh b/paludis/repositories/unavailable/unavailable_repository_store.hh
index 917b3d42f..8dd5ff016 100644
--- a/paludis/repositories/unavailable/unavailable_repository_store.hh
+++ b/paludis/repositories/unavailable/unavailable_repository_store.hh
@@ -22,7 +22,7 @@
#include <paludis/repositories/unavailable/unavailable_repository-fwd.hh>
#include <paludis/util/pimp.hh>
-#include <paludis/util/fs_entry-fwd.hh>
+#include <paludis/util/fs_path-fwd.hh>
#include <paludis/name-fwd.hh>
#include <paludis/package_id-fwd.hh>
#include <paludis/environment-fwd.hh>
@@ -36,14 +36,14 @@ namespace paludis
private Pimp<UnavailableRepositoryStore>
{
private:
- void _populate(const Environment * const env, const FSEntry & f);
- void _populate_one(const Environment * const env, const FSEntry & f);
+ void _populate(const Environment * const env, const FSPath & f);
+ void _populate_one(const Environment * const env, const FSPath & f);
public:
UnavailableRepositoryStore(
const Environment * const,
const UnavailableRepository * const,
- const FSEntry &);
+ const FSPath &);
~UnavailableRepositoryStore();
bool has_category_named(const CategoryNamePart &) const