aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-06-04 13:39:22 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-06-04 13:39:22 +0000
commitabed5bc06daf3c81b2b3d239a751e67528ae5ffb (patch)
treec6a2fb457659a9ca211c60a6c45f3666ee8e6454
parentd821dd592e55c6a828beef07dc998e9d450668c0 (diff)
downloadpaludis-abed5bc06daf3c81b2b3d239a751e67528ae5ffb.tar.gz
paludis-abed5bc06daf3c81b2b3d239a751e67528ae5ffb.tar.xz
r3192@snowflake: ciaranm | 2007-06-04 11:34:17 +0100
Move various things into subnamespaces
-rw-r--r--paludis/environments/no_config/no_config_environment.cc11
-rw-r--r--paludis/environments/no_config/no_config_environment.hh27
-rw-r--r--paludis/environments/no_config/no_config_environment.sr4
-rw-r--r--paludis/environments/no_config/no_config_environment_TEST.cc4
-rw-r--r--paludis/environments/paludis/bashable_conf.cc3
-rw-r--r--paludis/environments/paludis/bashable_conf.hh5
-rw-r--r--paludis/environments/paludis/keywords_conf.cc1
-rw-r--r--paludis/environments/paludis/keywords_conf.hh25
-rw-r--r--paludis/environments/paludis/licenses_conf.cc1
-rw-r--r--paludis/environments/paludis/licenses_conf.hh25
-rw-r--r--paludis/environments/paludis/mirrors_conf.cc1
-rw-r--r--paludis/environments/paludis/mirrors_conf.hh27
-rw-r--r--paludis/environments/paludis/package_mask_conf.cc1
-rw-r--r--paludis/environments/paludis/package_mask_conf.hh25
-rw-r--r--paludis/environments/paludis/paludis_config.cc1
-rw-r--r--paludis/environments/paludis/paludis_config.hh204
-rw-r--r--paludis/environments/paludis/paludis_environment.cc1
-rw-r--r--paludis/environments/paludis/paludis_environment.hh5
-rw-r--r--paludis/environments/paludis/use_conf.cc1
-rw-r--r--paludis/environments/paludis/use_conf.hh35
-rw-r--r--paludis/environments/portage/portage_environment.cc1
-rw-r--r--paludis/environments/portage/portage_environment.hh37
-rw-r--r--paludis/qa/qa_environment.cc8
-rw-r--r--python/environment.cc8
-rw-r--r--ruby/environment.cc5
-rw-r--r--src/clients/adjutrix/adjutrix.cc6
26 files changed, 252 insertions, 220 deletions
diff --git a/paludis/environments/no_config/no_config_environment.cc b/paludis/environments/no_config/no_config_environment.cc
index ccaff89..17bf1b2 100644
--- a/paludis/environments/no_config/no_config_environment.cc
+++ b/paludis/environments/no_config/no_config_environment.cc
@@ -30,6 +30,7 @@
#include <set>
using namespace paludis;
+using namespace paludis::no_config_environment;
#include <paludis/environments/no_config/no_config_environment-sr.cc>
@@ -38,7 +39,7 @@ namespace paludis
template<>
struct Implementation<NoConfigEnvironment>
{
- const NoConfigEnvironmentParams params;
+ const no_config_environment::Params params;
const FSEntry top_level_dir;
const FSEntry write_cache;
@@ -52,7 +53,7 @@ namespace paludis
tr1::shared_ptr<PackageDatabase> package_database;
- Implementation(NoConfigEnvironment * const env, const NoConfigEnvironmentParams & params);
+ Implementation(NoConfigEnvironment * const env, const no_config_environment::Params & params);
void initialise(NoConfigEnvironment * const env);
};
@@ -61,7 +62,7 @@ namespace paludis
namespace
{
- bool is_vdb_repository(const FSEntry & location, NoConfigEnvironmentRepositoryType type)
+ bool is_vdb_repository(const FSEntry & location, no_config_environment::RepositoryType type)
{
switch (type)
{
@@ -116,7 +117,7 @@ namespace
}
Implementation<NoConfigEnvironment>::Implementation(
- NoConfigEnvironment * const env, const NoConfigEnvironmentParams & p) :
+ NoConfigEnvironment * const env, const no_config_environment::Params & p) :
params(p),
top_level_dir(p.repository_dir),
write_cache(p.write_cache),
@@ -191,7 +192,7 @@ Implementation<NoConfigEnvironment>::initialise(NoConfigEnvironment * const env)
}
}
-NoConfigEnvironment::NoConfigEnvironment(const NoConfigEnvironmentParams & params) :
+NoConfigEnvironment::NoConfigEnvironment(const no_config_environment::Params & params) :
PrivateImplementationPattern<NoConfigEnvironment>(
new Implementation<NoConfigEnvironment>(this, params))
{
diff --git a/paludis/environments/no_config/no_config_environment.hh b/paludis/environments/no_config/no_config_environment.hh
index 74a4fa5..ff869ae 100644
--- a/paludis/environments/no_config/no_config_environment.hh
+++ b/paludis/environments/no_config/no_config_environment.hh
@@ -27,20 +27,23 @@
namespace paludis
{
- /**
- * The type of repository to use for a NoConfigEnvironment.
- *
- * \see NoConfigEnvironment
- * \ingroup grpnoconfigenvironment
- */
- enum NoConfigEnvironmentRepositoryType
+ namespace no_config_environment
{
- ncer_ebuild,
- ncer_vdb,
- ncer_auto
- };
+ /**
+ * The type of repository to use for a NoConfigEnvironment.
+ *
+ * \see NoConfigEnvironment
+ * \ingroup grpnoconfigenvironment
+ */
+ enum RepositoryType
+ {
+ ncer_ebuild,
+ ncer_vdb,
+ ncer_auto
+ };
#include <paludis/environments/no_config/no_config_environment-sr.hh>
+ }
/**
* An environment that uses a single repository, with no user configuration.
@@ -61,7 +64,7 @@ namespace paludis
///\name Basic operations
///\{
- NoConfigEnvironment(const NoConfigEnvironmentParams & params);
+ NoConfigEnvironment(const no_config_environment::Params & params);
virtual ~NoConfigEnvironment();
diff --git a/paludis/environments/no_config/no_config_environment.sr b/paludis/environments/no_config/no_config_environment.sr
index d305a87..badbadf 100644
--- a/paludis/environments/no_config/no_config_environment.sr
+++ b/paludis/environments/no_config/no_config_environment.sr
@@ -1,14 +1,14 @@
#!/bin/bash
# vim: set sw=4 sts=4 et :
-make_class_NoConfigEnvironmentParams()
+make_class_Params()
{
visible
key repository_dir "FSEntry"
key write_cache "FSEntry"
key accept_unstable bool
- key repository_type NoConfigEnvironmentRepositoryType
+ key repository_type no_config_environment::RepositoryType
key master_repository_dir "FSEntry"
allow_named_args
diff --git a/paludis/environments/no_config/no_config_environment_TEST.cc b/paludis/environments/no_config/no_config_environment_TEST.cc
index 29cbc9c..ec7b4af 100644
--- a/paludis/environments/no_config/no_config_environment_TEST.cc
+++ b/paludis/environments/no_config/no_config_environment_TEST.cc
@@ -32,11 +32,11 @@ namespace test_cases
void run()
{
- NoConfigEnvironment e(NoConfigEnvironmentParams::create()
+ NoConfigEnvironment e(no_config_environment::Params::create()
.repository_dir(FSEntry("no_config_environment_TEST_dir/repo"))
.write_cache(FSEntry("/var/empty"))
.accept_unstable(false)
- .repository_type(ncer_auto)
+ .repository_type(no_config_environment::ncer_auto)
.master_repository_dir(FSEntry("/var/empty")));
TEST_CHECK(e.package_database());
diff --git a/paludis/environments/paludis/bashable_conf.cc b/paludis/environments/paludis/bashable_conf.cc
index 3265f5e..e02143c 100644
--- a/paludis/environments/paludis/bashable_conf.cc
+++ b/paludis/environments/paludis/bashable_conf.cc
@@ -26,9 +26,10 @@
#include <paludis/util/log.hh>
using namespace paludis;
+using namespace paludis::paludis_environment;
tr1::shared_ptr<LineConfigFile>
-paludis::make_bashable_conf(const FSEntry & f)
+paludis::paludis_environment::make_bashable_conf(const FSEntry & f)
{
Context context("When making a config file out of '" + stringify(f) + "':");
diff --git a/paludis/environments/paludis/bashable_conf.hh b/paludis/environments/paludis/bashable_conf.hh
index defe703..891ea77 100644
--- a/paludis/environments/paludis/bashable_conf.hh
+++ b/paludis/environments/paludis/bashable_conf.hh
@@ -27,7 +27,10 @@ namespace paludis
class LineConfigFile;
class FSEntry;
- tr1::shared_ptr<LineConfigFile> make_bashable_conf(const FSEntry &);
+ namespace paludis_environment
+ {
+ tr1::shared_ptr<LineConfigFile> make_bashable_conf(const FSEntry &);
+ }
}
#endif
diff --git a/paludis/environments/paludis/keywords_conf.cc b/paludis/environments/paludis/keywords_conf.cc
index 725bd47..07df872 100644
--- a/paludis/environments/paludis/keywords_conf.cc
+++ b/paludis/environments/paludis/keywords_conf.cc
@@ -34,6 +34,7 @@
#include <map>
using namespace paludis;
+using namespace paludis::paludis_environment;
typedef std::list<KeywordName> KeywordsList;
typedef std::map<tr1::shared_ptr<const PackageDepSpec>, KeywordsList> PDSToKeywordsList;
diff --git a/paludis/environments/paludis/keywords_conf.hh b/paludis/environments/paludis/keywords_conf.hh
index b720bd0..43b4efb 100644
--- a/paludis/environments/paludis/keywords_conf.hh
+++ b/paludis/environments/paludis/keywords_conf.hh
@@ -30,18 +30,21 @@ namespace paludis
class PaludisEnvironment;
class PackageDatabaseEntry;
- class KeywordsConf :
- private PrivateImplementationPattern<KeywordsConf>,
- private InstantiationPolicy<KeywordsConf, instantiation_method::NonCopyableTag>
+ namespace paludis_environment
{
- public:
- KeywordsConf(const PaludisEnvironment * const);
- ~KeywordsConf();
-
- void add(const FSEntry &);
-
- bool query(tr1::shared_ptr<const KeywordNameCollection>, const PackageDatabaseEntry &) const;
- };
+ class KeywordsConf :
+ private PrivateImplementationPattern<KeywordsConf>,
+ private InstantiationPolicy<KeywordsConf, instantiation_method::NonCopyableTag>
+ {
+ public:
+ KeywordsConf(const PaludisEnvironment * const);
+ ~KeywordsConf();
+
+ void add(const FSEntry &);
+
+ bool query(tr1::shared_ptr<const KeywordNameCollection>, const PackageDatabaseEntry &) const;
+ };
+ }
}
#endif
diff --git a/paludis/environments/paludis/licenses_conf.cc b/paludis/environments/paludis/licenses_conf.cc
index e2892bb..cee66a5 100644
--- a/paludis/environments/paludis/licenses_conf.cc
+++ b/paludis/environments/paludis/licenses_conf.cc
@@ -34,6 +34,7 @@
#include <map>
using namespace paludis;
+using namespace paludis::paludis_environment;
typedef std::list<std::string> LicensesList;
typedef std::map<tr1::shared_ptr<const PackageDepSpec>, LicensesList> PDSToLicensesList;
diff --git a/paludis/environments/paludis/licenses_conf.hh b/paludis/environments/paludis/licenses_conf.hh
index dc6ab24..754277d 100644
--- a/paludis/environments/paludis/licenses_conf.hh
+++ b/paludis/environments/paludis/licenses_conf.hh
@@ -30,18 +30,21 @@ namespace paludis
class PaludisEnvironment;
class PackageDatabaseEntry;
- class LicensesConf :
- private PrivateImplementationPattern<LicensesConf>,
- private InstantiationPolicy<LicensesConf, instantiation_method::NonCopyableTag>
+ namespace paludis_environment
{
- public:
- LicensesConf(const PaludisEnvironment * const);
- ~LicensesConf();
-
- void add(const FSEntry &);
-
- bool query(const std::string &, const PackageDatabaseEntry &) const;
- };
+ class LicensesConf :
+ private PrivateImplementationPattern<LicensesConf>,
+ private InstantiationPolicy<LicensesConf, instantiation_method::NonCopyableTag>
+ {
+ public:
+ LicensesConf(const PaludisEnvironment * const);
+ ~LicensesConf();
+
+ void add(const FSEntry &);
+
+ bool query(const std::string &, const PackageDatabaseEntry &) const;
+ };
+ }
}
#endif
diff --git a/paludis/environments/paludis/mirrors_conf.cc b/paludis/environments/paludis/mirrors_conf.cc
index b219e0d..4060bad 100644
--- a/paludis/environments/paludis/mirrors_conf.cc
+++ b/paludis/environments/paludis/mirrors_conf.cc
@@ -32,6 +32,7 @@
#include <vector>
using namespace paludis;
+using namespace paludis::paludis_environment;
typedef MakeHashedMultiMap<std::string, std::string>::Type Mirrors;
diff --git a/paludis/environments/paludis/mirrors_conf.hh b/paludis/environments/paludis/mirrors_conf.hh
index 1847119..d028e61 100644
--- a/paludis/environments/paludis/mirrors_conf.hh
+++ b/paludis/environments/paludis/mirrors_conf.hh
@@ -31,19 +31,22 @@ namespace paludis
class PaludisEnvironment;
class PackageDatabaseEntry;
- class MirrorsConf :
- private PrivateImplementationPattern<MirrorsConf>,
- private InstantiationPolicy<MirrorsConf, instantiation_method::NonCopyableTag>
+ namespace paludis_environment
{
- public:
- MirrorsConf(const PaludisEnvironment * const);
- ~MirrorsConf();
-
- void add(const FSEntry &);
-
- tr1::shared_ptr<const MirrorsCollection> query(const std::string &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
- };
+ class MirrorsConf :
+ private PrivateImplementationPattern<MirrorsConf>,
+ private InstantiationPolicy<MirrorsConf, instantiation_method::NonCopyableTag>
+ {
+ public:
+ MirrorsConf(const PaludisEnvironment * const);
+ ~MirrorsConf();
+
+ void add(const FSEntry &);
+
+ tr1::shared_ptr<const MirrorsCollection> query(const std::string &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+ }
}
#endif
diff --git a/paludis/environments/paludis/package_mask_conf.cc b/paludis/environments/paludis/package_mask_conf.cc
index 8510750..8aea101 100644
--- a/paludis/environments/paludis/package_mask_conf.cc
+++ b/paludis/environments/paludis/package_mask_conf.cc
@@ -34,6 +34,7 @@
#include <paludis/util/tr1_functional.hh>
using namespace paludis;
+using namespace paludis::paludis_environment;
namespace paludis
{
diff --git a/paludis/environments/paludis/package_mask_conf.hh b/paludis/environments/paludis/package_mask_conf.hh
index 926a1e6..8a39792 100644
--- a/paludis/environments/paludis/package_mask_conf.hh
+++ b/paludis/environments/paludis/package_mask_conf.hh
@@ -30,18 +30,21 @@ namespace paludis
class PaludisEnvironment;
class PackageDatabaseEntry;
- class PackageMaskConf :
- private PrivateImplementationPattern<PackageMaskConf>,
- private InstantiationPolicy<PackageMaskConf, instantiation_method::NonCopyableTag>
+ namespace paludis_environment
{
- public:
- PackageMaskConf(const PaludisEnvironment * const);
- ~PackageMaskConf();
-
- void add(const FSEntry &);
-
- bool query(const PackageDatabaseEntry &) const;
- };
+ class PackageMaskConf :
+ private PrivateImplementationPattern<PackageMaskConf>,
+ private InstantiationPolicy<PackageMaskConf, instantiation_method::NonCopyableTag>
+ {
+ public:
+ PackageMaskConf(const PaludisEnvironment * const);
+ ~PackageMaskConf();
+
+ void add(const FSEntry &);
+
+ bool query(const PackageDatabaseEntry &) const;
+ };
+ }
}
#endif
diff --git a/paludis/environments/paludis/paludis_config.cc b/paludis/environments/paludis/paludis_config.cc
index dbd655d..c34fd87 100644
--- a/paludis/environments/paludis/paludis_config.cc
+++ b/paludis/environments/paludis/paludis_config.cc
@@ -60,6 +60,7 @@
*/
using namespace paludis;
+using namespace paludis::paludis_environment;
#include <paludis/environments/paludis/use_config_entry-sr.cc>
#include <paludis/environments/paludis/repository_config_entry-sr.cc>
diff --git a/paludis/environments/paludis/paludis_config.hh b/paludis/environments/paludis/paludis_config.hh
index 5a92251..eb534c7 100644
--- a/paludis/environments/paludis/paludis_config.hh
+++ b/paludis/environments/paludis/paludis_config.hh
@@ -38,135 +38,129 @@
namespace paludis
{
- struct EnvironmentMirrorIteratorTag;
struct PaludisEnvironment;
- struct KeywordsConf;
- struct UseConf;
- struct LicensesConf;
- struct PackageMaskConf;
- struct MirrorsConf;
-
- /**
- * Iterate over environment mirrors.
- *
- * \see Environment
- * \ingroup grpenvironment
- */
- typedef libwrapiter::ForwardIterator<EnvironmentMirrorIteratorTag,
- const std::pair<const std::string, std::string> > EnvironmentMirrorIterator;
-
- /**
- * A PaludisConfigError is thrown if a configuration error is encountered
- * by PaludisConfig.
- *
- * \ingroup grpexceptions
- * \ingroup grppaludisconfig
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE PaludisConfigError : public ConfigurationError
- {
- public:
- /**
- * Constructor.
- */
- PaludisConfigError(const std::string & msg) throw ();
- };
-
- /**
- * Thrown if the config directory cannot be found by PaludisConfig.
- *
- * \ingroup grpexceptions
- * \ingroup grppaludisconfig
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE PaludisConfigNoDirectoryError :
- public PaludisConfigError,
- public FallBackToAnotherMakerError
- {
- public:
- ///\name Basic operations
- ///\{
-
- PaludisConfigNoDirectoryError(const std::string & msg) throw ();
- ///\}
- };
+ namespace paludis_environment
+ {
+ struct KeywordsConf;
+ struct UseConf;
+ struct LicensesConf;
+ struct PackageMaskConf;
+ struct MirrorsConf;
+
+ /**
+ * A PaludisConfigError is thrown if a configuration error is encountered
+ * by PaludisConfig.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grppaludisconfig
+ * \nosubgrouping
+ */
+ class PALUDIS_VISIBLE PaludisConfigError : public ConfigurationError
+ {
+ public:
+ /**
+ * Constructor.
+ */
+ PaludisConfigError(const std::string & msg) throw ();
+ };
+
+ /**
+ * Thrown if the config directory cannot be found by PaludisConfig.
+ *
+ * \ingroup grpexceptions
+ * \ingroup grppaludisconfig
+ * \nosubgrouping
+ */
+ class PALUDIS_VISIBLE PaludisConfigNoDirectoryError :
+ public PaludisConfigError,
+ public FallBackToAnotherMakerError
+ {
+ public:
+ ///\name Basic operations
+ ///\{
+
+ PaludisConfigNoDirectoryError(const std::string & msg) throw ();
+
+ ///\}
+ };
#include <paludis/environments/paludis/use_config_entry-sr.hh>
#include <paludis/environments/paludis/repository_config_entry-sr.hh>
- /**
- * PaludisConfig is used by PaludisEnvironment to access the user's
- * configuration settings from on-disk configuration files.
- *
- * \ingroup grppaludisconfig
- * \nosubgrouping
- */
- class PaludisConfig :
- private PrivateImplementationPattern<PaludisConfig>
- {
- public:
- ///\name Basic operations
- ///\{
+ /**
+ * PaludisConfig is used by PaludisEnvironment to access the user's
+ * configuration settings from on-disk configuration files.
+ *
+ * \ingroup grppaludisconfig
+ * \nosubgrouping
+ */
+ class PaludisConfig :
+ private PrivateImplementationPattern<PaludisConfig>
+ {
+ public:
+ ///\name Basic operations
+ ///\{
- PaludisConfig(PaludisEnvironment * const, const std::string & suffix);
+ PaludisConfig(PaludisEnvironment * const, const std::string & suffix);
- ~PaludisConfig();
+ ~PaludisConfig();
- ///\}
+ ///\}
- ///\name Config files
- ///\{
+ ///\name Config files
+ ///\{
- tr1::shared_ptr<const KeywordsConf> keywords_conf() const;
- tr1::shared_ptr<const UseConf> use_conf() const;
- tr1::shared_ptr<const LicensesConf> licenses_conf() const;
- tr1::shared_ptr<const PackageMaskConf> package_mask_conf() const;
- tr1::shared_ptr<const PackageMaskConf> package_unmask_conf() const;
- tr1::shared_ptr<const MirrorsConf> mirrors_conf() const;
+ tr1::shared_ptr<const KeywordsConf> keywords_conf() const;
+ tr1::shared_ptr<const UseConf> use_conf() const;
+ tr1::shared_ptr<const LicensesConf> licenses_conf() const;
+ tr1::shared_ptr<const PackageMaskConf> package_mask_conf() const;
+ tr1::shared_ptr<const PackageMaskConf> package_unmask_conf() const;
+ tr1::shared_ptr<const MirrorsConf> mirrors_conf() const;
- ///\}
+ ///\}
- ///\name Iterate over our repositories
- ///\{
+ ///\name Iterate over our repositories
+ ///\{
- typedef libwrapiter::ForwardIterator<PaludisConfig, const RepositoryConfigEntry> RepositoryIterator;
+ typedef libwrapiter::ForwardIterator<PaludisConfig, const RepositoryConfigEntry> RepositoryIterator;
- RepositoryIterator begin_repositories() const;
+ RepositoryIterator begin_repositories() const;
- RepositoryIterator end_repositories() const;
+ RepositoryIterator end_repositories() const;
- ///\}
+ ///\}
- /**
- * Our bashrc files.
- */
- tr1::shared_ptr<const FSEntryCollection> bashrc_files() const;
+ /**
+ * Our bashrc files.
+ */
+ tr1::shared_ptr<const FSEntryCollection> bashrc_files() const;
- /**
- * The ROOT.
- */
- std::string root() const;
+ /**
+ * The ROOT.
+ */
+ std::string root() const;
- /**
- * Whether it's ok to unmask things that break Portage.
- */
- bool accept_breaks_portage() const;
+ /**
+ * Whether it's ok to unmask things that break Portage.
+ */
+ bool accept_breaks_portage() const;
- ///\name Userpriv
- ///\{
+ ///\name Userpriv
+ ///\{
- uid_t reduced_uid() const;
- gid_t reduced_gid() const;
- std::string reduced_username() const;
+ uid_t reduced_uid() const;
+ gid_t reduced_gid() const;
+ std::string reduced_username() const;
- ///\}
+ ///\}
- /**
- * The config directory.
- */
- std::string config_dir() const;
- };
+ /**
+ * The config directory.
+ */
+ std::string config_dir() const;
+ };
+ }
}
#endif
diff --git a/paludis/environments/paludis/paludis_environment.cc b/paludis/environments/paludis/paludis_environment.cc
index 33df225..f9674e2 100644
--- a/paludis/environments/paludis/paludis_environment.cc
+++ b/paludis/environments/paludis/paludis_environment.cc
@@ -47,6 +47,7 @@
#include <list>
using namespace paludis;
+using namespace paludis::paludis_environment;
namespace paludis
{
diff --git a/paludis/environments/paludis/paludis_environment.hh b/paludis/environments/paludis/paludis_environment.hh
index 95ef327..d043d02 100644
--- a/paludis/environments/paludis/paludis_environment.hh
+++ b/paludis/environments/paludis/paludis_environment.hh
@@ -31,7 +31,10 @@
namespace paludis
{
- class PaludisConfig;
+ namespace paludis_environment
+ {
+ class PaludisConfig;
+ }
/**
* The PaludisEnvironment is an Environment that corresponds to the normal
diff --git a/paludis/environments/paludis/use_conf.cc b/paludis/environments/paludis/use_conf.cc
index 439e7a2..b324df6 100644
--- a/paludis/environments/paludis/use_conf.cc
+++ b/paludis/environments/paludis/use_conf.cc
@@ -36,6 +36,7 @@
#include <vector>
using namespace paludis;
+using namespace paludis::paludis_environment;
typedef MakeHashedMap<UseFlagName, UseFlagState>::Type UseFlagWithStateMap;
typedef std::list<std::string> MinusStarPrefixList;
diff --git a/paludis/environments/paludis/use_conf.hh b/paludis/environments/paludis/use_conf.hh
index 0af8a6b..e220a79 100644
--- a/paludis/environments/paludis/use_conf.hh
+++ b/paludis/environments/paludis/use_conf.hh
@@ -30,23 +30,26 @@ namespace paludis
class PaludisEnvironment;
class PackageDatabaseEntry;
- class UseConf :
- private PrivateImplementationPattern<UseConf>,
- private InstantiationPolicy<UseConf, instantiation_method::NonCopyableTag>
+ namespace paludis_environment
{
- public:
- UseConf(const PaludisEnvironment * const);
- ~UseConf();
-
- void add(const FSEntry &);
-
- UseFlagState query(const UseFlagName &, const PackageDatabaseEntry &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
-
- tr1::shared_ptr<const UseFlagNameCollection> known_use_expand_names(
- const UseFlagName &, const PackageDatabaseEntry &) const
- PALUDIS_ATTRIBUTE((warn_unused_result));
- };
+ class UseConf :
+ private PrivateImplementationPattern<UseConf>,
+ private InstantiationPolicy<UseConf, instantiation_method::NonCopyableTag>
+ {
+ public:
+ UseConf(const PaludisEnvironment * const);
+ ~UseConf();
+
+ void add(const FSEntry &);
+
+ UseFlagState query(const UseFlagName &, const PackageDatabaseEntry &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ tr1::shared_ptr<const UseFlagNameCollection> known_use_expand_names(
+ const UseFlagName &, const PackageDatabaseEntry &) const
+ PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
+ }
}
#endif
diff --git a/paludis/environments/portage/portage_environment.cc b/paludis/environments/portage/portage_environment.cc
index f7bffb8..5cb959a 100644
--- a/paludis/environments/portage/portage_environment.cc
+++ b/paludis/environments/portage/portage_environment.cc
@@ -40,6 +40,7 @@
#include <vector>
using namespace paludis;
+using namespace paludis::portage_environment;
typedef std::list<std::pair<tr1::shared_ptr<const PackageDepSpec>, std::string> > PackageUse;
typedef std::list<std::pair<tr1::shared_ptr<const PackageDepSpec>, std::string> > PackageKeywords;
diff --git a/paludis/environments/portage/portage_environment.hh b/paludis/environments/portage/portage_environment.hh
index 40dd406..712831f 100644
--- a/paludis/environments/portage/portage_environment.hh
+++ b/paludis/environments/portage/portage_environment.hh
@@ -24,24 +24,27 @@
namespace paludis
{
- /**
- * Thrown if a configuration error occurs in a PortageEnvironment.
- *
- * \ingroup grpportageenvironment
- * \ingroup grpexceptions
- * \nosubgrouping
- */
- class PALUDIS_VISIBLE PortageEnvironmentConfigurationError :
- public ConfigurationError
+ namespace portage_environment
{
- public:
- ///\name Basic operations
- ///\{
-
- PortageEnvironmentConfigurationError(const std::string &) throw ();
-
- ///\}
- };
+ /**
+ * Thrown if a configuration error occurs in a PortageEnvironment.
+ *
+ * \ingroup grpportageenvironment
+ * \ingroup grpexceptions
+ * \nosubgrouping
+ */
+ class PALUDIS_VISIBLE PortageEnvironmentConfigurationError :
+ public ConfigurationError
+ {
+ public:
+ ///\name Basic operations
+ ///\{
+
+ PortageEnvironmentConfigurationError(const std::string &) throw ();
+
+ ///\}
+ };
+ }
/**
* Environment using Portage-like configuration files.
diff --git a/paludis/qa/qa_environment.cc b/paludis/qa/qa_environment.cc
index ba9ae10..a47f20e 100644
--- a/paludis/qa/qa_environment.cc
+++ b/paludis/qa/qa_environment.cc
@@ -39,11 +39,11 @@ namespace paludis
}
QAEnvironment::QAEnvironment(const FSEntry & base, const FSEntry & write_cache) :
- NoConfigEnvironment(NoConfigEnvironmentParams::create()
+ NoConfigEnvironment(no_config_environment::Params::create()
.repository_dir(base)
.write_cache(write_cache)
.accept_unstable(false)
- .repository_type(ncer_ebuild)
+ .repository_type(no_config_environment::ncer_ebuild)
.master_repository_dir(FSEntry("/var/empty"))),
_paludis_command("diefunc 'qa_environment.cc' 'QAEnvironment::paludis_command()' "
"'paludis_command called from within QAEnvironment'")
@@ -52,11 +52,11 @@ QAEnvironment::QAEnvironment(const FSEntry & base, const FSEntry & write_cache)
QAEnvironment::QAEnvironment(const FSEntry & base, const FSEntry & write_cache,
const FSEntry & master_repository_dir) :
- NoConfigEnvironment(NoConfigEnvironmentParams::create()
+ NoConfigEnvironment(no_config_environment::Params::create()
.repository_dir(base)
.write_cache(write_cache)
.accept_unstable(false)
- .repository_type(ncer_ebuild)
+ .repository_type(no_config_environment::ncer_ebuild)
.master_repository_dir(master_repository_dir)),
_paludis_command("diefunc 'qa_environment.cc' 'QAEnvironment::paludis_command()' "
"'paludis_command called from within QAEnvironment'")
diff --git a/python/environment.cc b/python/environment.cc
index 5101b61..edddce9 100644
--- a/python/environment.cc
+++ b/python/environment.cc
@@ -35,8 +35,8 @@ struct NoConfigEnvironmentWrapper :
{
NoConfigEnvironmentWrapper(const FSEntry & env_dir, const FSEntry & cache_dir,
const FSEntry & master_repo_dir) :
- NoConfigEnvironment(NoConfigEnvironmentParams(env_dir, cache_dir, false,
- ncer_auto, master_repo_dir)
+ NoConfigEnvironment(no_config_environment::Params(env_dir, cache_dir, false,
+ no_config_environment::ncer_auto, master_repo_dir)
)
{
}
@@ -50,9 +50,9 @@ void PALUDIS_VISIBLE expose_environment()
("PaludisEnvironmentSoDirNotADirectoryError", "BaseException");
ExceptionRegister::get_instance()->add_exception<PaludisEnvironmentSoDirCannotDlopenError>
("PaludisEnvironmentSoDirCannotDlopenError", "BaseException");
- ExceptionRegister::get_instance()->add_exception<PaludisConfigError>
+ ExceptionRegister::get_instance()->add_exception<paludis_environment::PaludisConfigError>
("PaludisConfigError", "ConfigurationError");
- ExceptionRegister::get_instance()->add_exception<PaludisConfigNoDirectoryError>
+ ExceptionRegister::get_instance()->add_exception<paludis_environment::PaludisConfigNoDirectoryError>
("PaludisConfigNoDirectoryError", "PaludisConfigError");
bp::class_<EnvironmentMaker, boost::noncopyable> em("EnvironmentMaker",
diff --git a/ruby/environment.cc b/ruby/environment.cc
index 2f6b4ed..408028e 100644
--- a/ruby/environment.cc
+++ b/ruby/environment.cc
@@ -323,11 +323,12 @@ namespace
else
path = StringValuePtr(argv[0]);
- tr1::shared_ptr<NoConfigEnvironment> * e = new tr1::shared_ptr<NoConfigEnvironment>(new NoConfigEnvironment(NoConfigEnvironmentParams::create()
+ tr1::shared_ptr<NoConfigEnvironment> * e = new tr1::shared_ptr<NoConfigEnvironment>(new
+ NoConfigEnvironment(no_config_environment::Params::create()
.repository_dir(FSEntry(path))
.write_cache(write_cache)
.accept_unstable(false)
- .repository_type(ncer_auto)
+ .repository_type(no_config_environment::ncer_auto)
.master_repository_dir(FSEntry(master_repository_dir))));
VALUE tdata(Data_Wrap_Struct(self, 0, &Common<tr1::shared_ptr<NoConfigEnvironment> >::free, e));
rb_obj_call_init(tdata, argc, argv);
diff --git a/src/clients/adjutrix/adjutrix.cc b/src/clients/adjutrix/adjutrix.cc
index 715b5bc..063aa4d 100644
--- a/src/clients/adjutrix/adjutrix.cc
+++ b/src/clients/adjutrix/adjutrix.cc
@@ -147,13 +147,13 @@ main(int argc, char *argv[])
if (! CommandLine::get_instance()->a_write_cache_dir.specified())
CommandLine::get_instance()->a_write_cache_dir.set_argument("/var/empty");
- NoConfigEnvironment env(NoConfigEnvironmentParams::create()
+ NoConfigEnvironment env(no_config_environment::Params::create()
.repository_dir(get_location_and_add_filters())
.write_cache(CommandLine::get_instance()->a_write_cache_dir.argument())
.accept_unstable(CommandLine::get_instance()->a_unstable.specified())
.repository_type(
- (CommandLine::get_instance()->a_reverse_deps.specified()) ? ncer_auto : ncer_ebuild
- )
+ (CommandLine::get_instance()->a_reverse_deps.specified()) ? no_config_environment::ncer_auto :
+ no_config_environment::ncer_ebuild)
.master_repository_dir(FSEntry("/var/empty")));
if (CommandLine::get_instance()->a_find_stable_candidates.specified())