aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-08 20:40:58 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-08 20:40:58 +0000
commit305d994f62cd55fbeba135b409326714a4d28bff (patch)
treecfc27a8ede5a2589ec92c36a95ea24994f79a6cc
parent2244241855948aad91cdfeaefad92e304e9a9ad8 (diff)
downloadpaludis-305d994f62cd55fbeba135b409326714a4d28bff.tar.gz
paludis-305d994f62cd55fbeba135b409326714a4d28bff.tar.xz
Doxygen improvements
-rw-r--r--doc/doc_main.doxygen6
-rw-r--r--paludis/config_file.hh33
-rw-r--r--paludis/contents.hh12
-rw-r--r--paludis/default_config.cc14
-rw-r--r--paludis/dep_atom.hh6
-rw-r--r--paludis/digests/md5.hh11
-rw-r--r--paludis/digests/rmd160.hh11
-rw-r--r--paludis/digests/sha256.hh11
-rw-r--r--paludis/environment.cc7
-rw-r--r--paludis/environment.hh6
-rw-r--r--paludis/fake_repository.cc8
-rw-r--r--paludis/nothing_repository.cc20
-rw-r--r--paludis/portage_repository.cc476
-rw-r--r--paludis/portage_repository.hh5
-rw-r--r--paludis/repository.hh10
-rw-r--r--paludis/selinux/security_context.hh14
-rw-r--r--paludis/util/instantiation_policy.hh16
-rw-r--r--paludis/util/random.hh4
-rw-r--r--paludis/vdb_repository.cc241
-rw-r--r--paludis/vdb_repository.hh5
20 files changed, 517 insertions, 399 deletions
diff --git a/doc/doc_main.doxygen b/doc/doc_main.doxygen
index f2fbc6c..48c86bb 100644
--- a/doc/doc_main.doxygen
+++ b/doc/doc_main.doxygen
@@ -14,6 +14,12 @@
/** \defgroup grplibpaludisargs Paludis args library
*/
+/** \defgroup grplibpaludisdigests Paludis digests library
+ */
+
+/** \defgroup grplibpaludisselinux Paludis SELinux library
+ */
+
/** \defgroup grptestcases Test cases
*/
diff --git a/paludis/config_file.hh b/paludis/config_file.hh
index 72a946b..d34ff22 100644
--- a/paludis/config_file.hh
+++ b/paludis/config_file.hh
@@ -374,9 +374,13 @@ namespace paludis
~AdvisoryFile();
/**
- * Iterator over our lines.
+ * Iterator over our entries.
*/
typedef std::map<std::string, std::string>::const_iterator EntriesIterator;
+
+ /**
+ * Iterator over our lines.
+ */
typedef std::list<std::string>::const_iterator LineIterator;
/**
@@ -460,37 +464,64 @@ namespace paludis
*/
NewsFile(const FSEntry & filename);
+ /**
+ * Iterator over display-if-installed headers.
+ */
typedef std::list<std::string>::const_iterator DisplayIfInstalledIterator;
+ /**
+ * Start of our display-if-installed headers.
+ */
DisplayIfInstalledIterator begin_display_if_installed() const
{
return _display_if_installed.begin();
}
+ /**
+ * End of our display-if-installed headers.
+ */
DisplayIfInstalledIterator end_display_if_installed() const
{
return _display_if_installed.end();
}
+ /**
+ * Iterator over display-if-keyword headers.
+ */
typedef std::list<std::string>::const_iterator DisplayIfKeywordIterator;
+ /**
+ * Start of our display-if-keyword headers.
+ */
DisplayIfKeywordIterator begin_display_if_keyword() const
{
return _display_if_keyword.begin();
}
+ /**
+ * End of our display-if-keyword headers.
+ */
DisplayIfKeywordIterator end_display_if_keyword() const
{
return _display_if_keyword.end();
}
+ /**
+ * Iterator over display-if-profile headers.
+ */
typedef std::list<std::string>::const_iterator DisplayIfProfileIterator;
+ /**
+ * Start of our display-if-profile headers.
+ */
DisplayIfProfileIterator begin_display_if_profile() const
{
return _display_if_profile.begin();
}
+ /**
+ * End of our display-if-profile headers.
+ */
DisplayIfProfileIterator end_display_if_profile() const
{
return _display_if_profile.end();
diff --git a/paludis/contents.hh b/paludis/contents.hh
index 82dc470..bfdb9e0 100644
--- a/paludis/contents.hh
+++ b/paludis/contents.hh
@@ -62,14 +62,17 @@ namespace paludis
std::string _name;
protected:
+ /// Constructor.
ContentsEntry(const std::string & name) :
_name(name)
{
}
public:
+ /// Destructor.
virtual ~ContentsEntry();
+ /// Our name.
std::string name() const
{
return _name;
@@ -86,6 +89,7 @@ namespace paludis
public Visitable<ContentsFileEntry, ContentsVisitorTypes>
{
public:
+ /// Constructor.
ContentsFileEntry(const std::string & name);
};
@@ -99,6 +103,7 @@ namespace paludis
public Visitable<ContentsDirEntry, ContentsVisitorTypes>
{
public:
+ /// Constructor.
ContentsDirEntry(const std::string & name);
};
@@ -112,6 +117,7 @@ namespace paludis
public Visitable<ContentsMiscEntry, ContentsVisitorTypes>
{
public:
+ /// Constructor.
ContentsMiscEntry(const std::string & name);
};
@@ -128,8 +134,10 @@ namespace paludis
std::string _target;
public:
+ /// Constructor.
ContentsSymEntry(const std::string & name, const std::string & target);
+ /// Our target (as per readlink).
std::string target() const
{
return _target;
@@ -151,18 +159,22 @@ namespace paludis
public:
Contents();
+ /// Add a new entry.
void add(ContentsEntry::ConstPointer c)
{
_c.push_back(c);
}
+ /// Iterator over our entries.
typedef std::list<ContentsEntry::ConstPointer>::const_iterator Iterator;
+ /// Start of our entries.
Iterator begin() const
{
return _c.begin();
}
+ /// End of our entries.
Iterator end() const
{
return _c.end();
diff --git a/paludis/default_config.cc b/paludis/default_config.cc
index c2488a1..5581c6a 100644
--- a/paludis/default_config.cc
+++ b/paludis/default_config.cc
@@ -94,11 +94,14 @@ namespace paludis
Implementation();
};
-}
-Implementation<DefaultConfig>::Implementation() :
- paludis_command("paludis")
-{
+ Implementation<DefaultConfig>::Implementation() :
+ paludis_command("paludis")
+ {
+ }
+
+ std::string Implementation<DefaultConfig>::config_suffix;
+ bool Implementation<DefaultConfig>::config_suffix_can_be_set(true);
}
DefaultConfigError::DefaultConfigError(const std::string & msg) throw () :
@@ -429,9 +432,6 @@ DefaultConfig::~DefaultConfig()
{
}
-std::string Implementation<DefaultConfig>::config_suffix;
-bool Implementation<DefaultConfig>::config_suffix_can_be_set(true);
-
void
DefaultConfig::set_config_suffix(const std::string & s)
{
diff --git a/paludis/dep_atom.hh b/paludis/dep_atom.hh
index 3942e5b..1fa29c2 100644
--- a/paludis/dep_atom.hh
+++ b/paludis/dep_atom.hh
@@ -257,28 +257,34 @@ namespace paludis
std::map<UseFlagName, UseFlagState> _reqs;
public:
+ /// Iterator over our USE requirements.
typedef std::map<UseFlagName, UseFlagState>::const_iterator Iterator;
+ /// Start of our USE requirements.
Iterator begin() const
{
return _reqs.begin();
}
+ /// End of our USE requirements.
Iterator end() const
{
return _reqs.end();
}
+ /// Find the requirement for a particular USE flag.
Iterator find(const UseFlagName & u) const
{
return _reqs.find(u);
}
+ /// Insert a new requirement.
bool insert(const UseFlagName & u, UseFlagState s)
{
return _reqs.insert(std::make_pair(u, s)).second;
}
+ /// What state is desired for a particular use flag?
UseFlagState state(const UseFlagName &) const;
};
diff --git a/paludis/digests/md5.hh b/paludis/digests/md5.hh
index cc96cad..cde5c75 100644
--- a/paludis/digests/md5.hh
+++ b/paludis/digests/md5.hh
@@ -27,6 +27,11 @@
namespace paludis
{
+ /**
+ * MD5 digest class.
+ *
+ * \ingroup grplibpaludisdigests
+ */
class MD5
{
private:
@@ -41,8 +46,14 @@ namespace paludis
inline int _get(std::istream & stream);
public:
+ /**
+ * Constructor.
+ */
MD5(std::istream & stream);
+ /**
+ * Our checksum, as a string of hex characters.
+ */
std::string hexsum() const;
};
}
diff --git a/paludis/digests/rmd160.hh b/paludis/digests/rmd160.hh
index 7e074de..f2b9464 100644
--- a/paludis/digests/rmd160.hh
+++ b/paludis/digests/rmd160.hh
@@ -27,6 +27,11 @@
namespace paludis
{
+ /**
+ * RMD160 digest class.
+ *
+ * \ingroup grplibpaludisdigests
+ */
class RMD160
{
private:
@@ -43,8 +48,14 @@ namespace paludis
inline int _get(std::istream & stream);
public:
+ /**
+ * Constructor.
+ */
RMD160(std::istream & stream);
+ /**
+ * Our checksum, as a string of hex characters.
+ */
std::string hexsum() const;
};
diff --git a/paludis/digests/sha256.hh b/paludis/digests/sha256.hh
index c175148..af4b188 100644
--- a/paludis/digests/sha256.hh
+++ b/paludis/digests/sha256.hh
@@ -27,6 +27,11 @@
namespace paludis
{
+ /**
+ * SHA256 digest class.
+ *
+ * \ingroup grplibpaludisdigests
+ */
class SHA256
{
private:
@@ -41,8 +46,14 @@ namespace paludis
inline int _get(std::istream & stream);
public:
+ /**
+ * Constructor.
+ */
SHA256(std::istream & stream);
+ /**
+ * Our checksum, as a string of hex characters.
+ */
std::string hexsum() const;
};
}
diff --git a/paludis/environment.cc b/paludis/environment.cc
index 14f1f2d..1013144 100644
--- a/paludis/environment.cc
+++ b/paludis/environment.cc
@@ -303,12 +303,19 @@ namespace
/// Matches
std::list<const PackageDepAtom *> items;
+ /// Callback for adding world file entries, may be 0.
void (* add_callback)(const PackageDepAtom *);
+
+ /// Callback for skipping world file adds, may be 0.
void (* skip_callback)(const PackageDepAtom *, const std::string & why);
+ /// Are we inside a || ( ) group?
bool inside_any;
+
+ /// Are we inside a use? ( ) group?
bool inside_use;
+ /// Constructor.
WorldTargetFinder(void (* a)(const PackageDepAtom *),
void (* s)(const PackageDepAtom *, const std::string &)) :
add_callback(a),
diff --git a/paludis/environment.hh b/paludis/environment.hh
index d613fc3..a2ac1c3 100644
--- a/paludis/environment.hh
+++ b/paludis/environment.hh
@@ -47,22 +47,28 @@ namespace paludis
std::string _name;
public:
+ /// Constructor.
Hook(const std::string & name);
+ /// Perform the hook.
Hook operator() (const std::string & key, const std::string & value) const;
+ /// Iterate over extra environment data.
typedef std::map<std::string, std::string>::const_iterator Iterator;
+ /// Start of extra environment data.
Iterator begin() const
{
return _extra_env.begin();
}
+ /// End of extra environment data.
Iterator end() const
{
return _extra_env.end();
}
+ /// Our name.
std::string name() const
{
return _name;
diff --git a/paludis/fake_repository.cc b/paludis/fake_repository.cc
index 7263340..468fbe5 100644
--- a/paludis/fake_repository.cc
+++ b/paludis/fake_repository.cc
@@ -61,11 +61,11 @@ namespace paludis
/// Constructor.
Implementation();
};
-}
-Implementation<FakeRepository>::Implementation() :
- category_names(new CategoryNamePartCollection)
-{
+ Implementation<FakeRepository>::Implementation() :
+ category_names(new CategoryNamePartCollection)
+ {
+ }
}
FakeRepository::FakeRepository(const RepositoryName & name) :
diff --git a/paludis/nothing_repository.cc b/paludis/nothing_repository.cc
index e776999..996c7f4 100644
--- a/paludis/nothing_repository.cc
+++ b/paludis/nothing_repository.cc
@@ -68,18 +68,18 @@ namespace paludis
/// Destructor.
~Implementation();
};
-}
-Implementation<NothingRepository>::Implementation(const NothingRepositoryParams & p) :
- name(p.get<nrpk_name>()),
- location(p.get<nrpk_location>()),
- sync(p.get<nrpk_sync>()),
- sync_exclude(p.get<nrpk_sync_exclude>())
-{
-}
+ Implementation<NothingRepository>::Implementation(const NothingRepositoryParams & p) :
+ name(p.get<nrpk_name>()),
+ location(p.get<nrpk_location>()),
+ sync(p.get<nrpk_sync>()),
+ sync_exclude(p.get<nrpk_sync_exclude>())
+ {
+ }
-Implementation<NothingRepository>::~Implementation()
-{
+ Implementation<NothingRepository>::~Implementation()
+ {
+ }
}
NothingRepository::NothingRepository(const NothingRepositoryParams & p) try :
diff --git a/paludis/portage_repository.cc b/paludis/portage_repository.cc
index c1ac03c..4108a72 100644
--- a/paludis/portage_repository.cc
+++ b/paludis/portage_repository.cc
@@ -251,304 +251,304 @@ namespace paludis
/// Raw system lines.
mutable std::set<std::string> system_lines;
};
-}
-
-Implementation<PortageRepository>::Implementation(const PortageRepositoryParams & p) :
- db(p.get<prpk_package_database>()),
- env(p.get<prpk_environment>()),
- location(p.get<prpk_location>()),
- profiles(p.get<prpk_profiles>()),
- cache(p.get<prpk_cache>()),
- eclassdirs(p.get<prpk_eclassdirs>()),
- distdir(p.get<prpk_distdir>()),
- setsdir(p.get<prpk_setsdir>()),
- securitydir(p.get<prpk_securitydir>()),
- newsdir(p.get<prpk_newsdir>()),
- sync(p.get<prpk_sync>()),
- sync_exclude(p.get<prpk_sync_exclude>()),
- root(p.get<prpk_root>()),
- buildroot(p.get<prpk_buildroot>()),
- has_category_names(false),
- has_repo_mask(false),
- has_virtuals(false),
- has_arch_list(false),
- has_mirrors(false),
- system_packages(new AllDepAtom),
- system_tag(new GeneralSetDepTag("system")),
- has_profile(false)
-{
-}
-
-Implementation<PortageRepository>::~Implementation()
-{
-}
-
-void
-Implementation<PortageRepository>::add_profile(const FSEntry & f) const
-{
- Context context("When setting profile from directory '" + stringify(f) + "':");
- add_profile_r(f);
-
- for (UseFlagSet::const_iterator x(expand_list.begin()), x_end(expand_list.end()) ;
- x != x_end ; ++x)
+ Implementation<PortageRepository>::Implementation(const PortageRepositoryParams & p) :
+ db(p.get<prpk_package_database>()),
+ env(p.get<prpk_environment>()),
+ location(p.get<prpk_location>()),
+ profiles(p.get<prpk_profiles>()),
+ cache(p.get<prpk_cache>()),
+ eclassdirs(p.get<prpk_eclassdirs>()),
+ distdir(p.get<prpk_distdir>()),
+ setsdir(p.get<prpk_setsdir>()),
+ securitydir(p.get<prpk_securitydir>()),
+ newsdir(p.get<prpk_newsdir>()),
+ sync(p.get<prpk_sync>()),
+ sync_exclude(p.get<prpk_sync_exclude>()),
+ root(p.get<prpk_root>()),
+ buildroot(p.get<prpk_buildroot>()),
+ has_category_names(false),
+ has_repo_mask(false),
+ has_virtuals(false),
+ has_arch_list(false),
+ has_mirrors(false),
+ system_packages(new AllDepAtom),
+ system_tag(new GeneralSetDepTag("system")),
+ has_profile(false)
{
- std::list<std::string> uses;
- WhitespaceTokeniser::get_instance()->tokenise(profile_env[stringify(*x)], std::back_inserter(uses));
- for (std::list<std::string>::const_iterator u(uses.begin()), u_end(uses.end()) ;
- u != u_end ; ++u)
- {
- std::string lower_x;
- std::transform(x->data().begin(), x->data().end(), std::back_inserter(lower_x),
- &::tolower);
- use[UseFlagName(lower_x + "_" + *u)] = use_enabled;
- }
}
- for (std::set<std::string>::iterator it(system_lines.begin()), it_end(system_lines.end());
- it != it_end; ++it)
+ Implementation<PortageRepository>::~Implementation()
{
- Context context_atom("When parsing package '" + *it + "':");
- PackageDepAtom::Pointer atom(new PackageDepAtom(*it));
- atom->set_tag(system_tag);
- system_packages->add_child(atom);
}
- std::string arch(profile_env["ARCH"]);
- if (arch.empty())
- throw PortageRepositoryConfigurationError("ARCH variable is unset for repository at '"
- + stringify(location) + "'");
+ void
+ Implementation<PortageRepository>::add_profile(const FSEntry & f) const
+ {
+ Context context("When setting profile from directory '" + stringify(f) + "':");
- use[UseFlagName(arch)] = use_enabled;
-}
+ add_profile_r(f);
-void
-Implementation<PortageRepository>::add_profile_r(const FSEntry & f) const
-{
- Context context("When reading profile directory '" + stringify(f) + "':");
+ for (UseFlagSet::const_iterator x(expand_list.begin()), x_end(expand_list.end()) ;
+ x != x_end ; ++x)
+ {
+ std::list<std::string> uses;
+ WhitespaceTokeniser::get_instance()->tokenise(profile_env[stringify(*x)], std::back_inserter(uses));
+ for (std::list<std::string>::const_iterator u(uses.begin()), u_end(uses.end()) ;
+ u != u_end ; ++u)
+ {
+ std::string lower_x;
+ std::transform(x->data().begin(), x->data().end(), std::back_inserter(lower_x),
+ &::tolower);
+ use[UseFlagName(lower_x + "_" + *u)] = use_enabled;
+ }
+ }
- if (! f.is_directory())
- {
- Log::get_instance()->message(ll_warning, lc_context,
- "Profile component '" + stringify(f) + "' is not a directory");
- return;
+ for (std::set<std::string>::iterator it(system_lines.begin()), it_end(system_lines.end());
+ it != it_end; ++it)
+ {
+ Context context_atom("When parsing package '" + *it + "':");
+ PackageDepAtom::Pointer atom(new PackageDepAtom(*it));
+ atom->set_tag(system_tag);
+ system_packages->add_child(atom);
+ }
+
+ std::string arch(profile_env["ARCH"]);
+ if (arch.empty())
+ throw PortageRepositoryConfigurationError("ARCH variable is unset for repository at '"
+ + stringify(location) + "'");
+
+ use[UseFlagName(arch)] = use_enabled;
}
- if ((f / "parent").exists())
+ void
+ Implementation<PortageRepository>::add_profile_r(const FSEntry & f) const
{
- Context context_local("When reading parent file:");
-
- LineConfigFile parent(f / "parent");
- LineConfigFile::Iterator it = parent.begin(), it_end = parent.end();
+ Context context("When reading profile directory '" + stringify(f) + "':");
- if (it == it_end)
+ if (! f.is_directory())
{
Log::get_instance()->message(ll_warning, lc_context,
- "Profile parent file in '" + stringify(f) + "' cannot be read");
+ "Profile component '" + stringify(f) + "' is not a directory");
return;
}
- for ( ; it != it_end; ++it)
+ if ((f / "parent").exists())
{
- add_profile_r((f / (*it)).realpath());
- }
+ Context context_local("When reading parent file:");
- }
+ LineConfigFile parent(f / "parent");
+ LineConfigFile::Iterator it = parent.begin(), it_end = parent.end();
- if ((f / "make.defaults").exists())
- {
- Context context_local("When reading make.defaults file:");
+ if (it == it_end)
+ {
+ Log::get_instance()->message(ll_warning, lc_context,
+ "Profile parent file in '" + stringify(f) + "' cannot be read");
+ return;
+ }
- KeyValueConfigFile make_defaults_f(f / "make.defaults");
- std::deque<std::string> uses;
- WhitespaceTokeniser::get_instance()->tokenise(make_defaults_f.get("USE"), std::back_inserter(uses));
- for (std::deque<std::string>::const_iterator u(uses.begin()), u_end(uses.end()) ;
- u != u_end ; ++u)
- {
- if ('-' == u->at(0))
- use[UseFlagName(u->substr(1))] = use_disabled;
- else
- use[UseFlagName(*u)] = use_enabled;
- }
+ for ( ; it != it_end; ++it)
+ {
+ add_profile_r((f / (*it)).realpath());
+ }
- WhitespaceTokeniser::get_instance()->tokenise(
- make_defaults_f.get("USE_EXPAND"), create_inserter<UseFlagName>(
- std::inserter(expand_list, expand_list.begin())));
+ }
- WhitespaceTokeniser::get_instance()->tokenise(
- make_defaults_f.get("USE_EXPAND_HIDDEN"), create_inserter<UseFlagName>(
- std::inserter(expand_hidden_list, expand_hidden_list.begin())));
+ if ((f / "make.defaults").exists())
+ {
+ Context context_local("When reading make.defaults file:");
- for (KeyValueConfigFile::Iterator k(make_defaults_f.begin()),
- k_end(make_defaults_f.end()) ; k != k_end ; ++k)
- profile_env[k->first] = k->second;
- }
+ KeyValueConfigFile make_defaults_f(f / "make.defaults");
+ std::deque<std::string> uses;
+ WhitespaceTokeniser::get_instance()->tokenise(make_defaults_f.get("USE"), std::back_inserter(uses));
+ for (std::deque<std::string>::const_iterator u(uses.begin()), u_end(uses.end()) ;
+ u != u_end ; ++u)
+ {
+ if ('-' == u->at(0))
+ use[UseFlagName(u->substr(1))] = use_disabled;
+ else
+ use[UseFlagName(*u)] = use_enabled;
+ }
- if ((f / "use.mask").exists())
- {
- Context context_local("When reading use.mask file:");
+ WhitespaceTokeniser::get_instance()->tokenise(
+ make_defaults_f.get("USE_EXPAND"), create_inserter<UseFlagName>(
+ std::inserter(expand_list, expand_list.begin())));
- LineConfigFile use_mask_f(f / "use.mask");
- for (LineConfigFile::Iterator line(use_mask_f.begin()), line_end(use_mask_f.end()) ;
- line != line_end ; ++line)
- if ('-' == line->at(0))
- use_mask.erase(UseFlagName(line->substr(1)));
- else
- use_mask.insert(UseFlagName(*line));
- }
+ WhitespaceTokeniser::get_instance()->tokenise(
+ make_defaults_f.get("USE_EXPAND_HIDDEN"), create_inserter<UseFlagName>(
+ std::inserter(expand_hidden_list, expand_hidden_list.begin())));
- if ((f / "package.use.mask").exists())
- {
- Context context_local("When reading package use.mask file:");
+ for (KeyValueConfigFile::Iterator k(make_defaults_f.begin()),
+ k_end(make_defaults_f.end()) ; k != k_end ; ++k)
+ profile_env[k->first] = k->second;
+ }
- LineConfigFile package_use_mask_f(f / "package.use.mask");
- for (LineConfigFile::Iterator line(package_use_mask_f.begin()), line_end(package_use_mask_f.end());
- line != line_end; ++line)
+ if ((f / "use.mask").exists())
{
- std::deque<std::string> tokens;
- WhitespaceTokeniser::get_instance()->tokenise(*line, std::back_inserter(tokens));
- if (tokens.size() < 2)
- continue;
+ Context context_local("When reading use.mask file:");
- std::deque<std::string>::iterator t=tokens.begin(), t_end=tokens.end();
- PackageDepAtom::ConstPointer d(new PackageDepAtom(*t++));
- QualifiedPackageName p(d->package());
+ LineConfigFile use_mask_f(f / "use.mask");
+ for (LineConfigFile::Iterator line(use_mask_f.begin()), line_end(use_mask_f.end()) ;
+ line != line_end ; ++line)
+ if ('-' == line->at(0))
+ use_mask.erase(UseFlagName(line->substr(1)));
+ else
+ use_mask.insert(UseFlagName(*line));
+ }
- PackageUseMaskMap::iterator i = package_use_mask.find(p);
- if (package_use_mask.end() == i)
- i = package_use_mask.insert(make_pair(p, std::list<std::pair<PackageDepAtom::ConstPointer, UseFlagName> >())).first;
+ if ((f / "package.use.mask").exists())
+ {
+ Context context_local("When reading package use.mask file:");
- for ( ; t != t_end; ++t)
+ LineConfigFile package_use_mask_f(f / "package.use.mask");
+ for (LineConfigFile::Iterator line(package_use_mask_f.begin()), line_end(package_use_mask_f.end());
+ line != line_end; ++line)
{
- (*i).second.push_back(std::make_pair(d, UseFlagName(*t)));
+ std::deque<std::string> tokens;
+ WhitespaceTokeniser::get_instance()->tokenise(*line, std::back_inserter(tokens));
+ if (tokens.size() < 2)
+ continue;
+
+ std::deque<std::string>::iterator t=tokens.begin(), t_end=tokens.end();
+ PackageDepAtom::ConstPointer d(new PackageDepAtom(*t++));
+ QualifiedPackageName p(d->package());
+
+ PackageUseMaskMap::iterator i = package_use_mask.find(p);
+ if (package_use_mask.end() == i)
+ i = package_use_mask.insert(make_pair(p, std::list<std::pair<PackageDepAtom::ConstPointer, UseFlagName> >())).first;
+
+ for ( ; t != t_end; ++t)
+ {
+ (*i).second.push_back(std::make_pair(d, UseFlagName(*t)));
+ }
}
}
- }
-
- if ((f / "use.force").exists())
- {
- Context context_local("When reading use.force file:");
- LineConfigFile use_force_f(f / "use.force");
- for (LineConfigFile::Iterator line(use_force_f.begin()), line_end(use_force_f.end());
- line != line_end; ++line)
+ if ((f / "use.force").exists())
{
- if ('-' == line->at(0))
- use_force.erase(UseFlagName(line->substr(1)));
- else
- use_force.insert(UseFlagName(*line));
- }
- }
+ Context context_local("When reading use.force file:");
- if ((f / "package.use.force").exists())
- {
- Context context_local("When reading package use.force file:");
+ LineConfigFile use_force_f(f / "use.force");
+ for (LineConfigFile::Iterator line(use_force_f.begin()), line_end(use_force_f.end());
+ line != line_end; ++line)
+ {
+ if ('-' == line->at(0))
+ use_force.erase(UseFlagName(line->substr(1)));
+ else
+ use_force.insert(UseFlagName(*line));
+ }
+ }
- LineConfigFile package_use_force_f(f / "package.use.force");
- for (LineConfigFile::Iterator line(package_use_force_f.begin()), line_end(package_use_force_f.end());
- line != line_end; ++line)
+ if ((f / "package.use.force").exists())
{
- std::deque<std::string> tokens;
- WhitespaceTokeniser::get_instance()->tokenise(*line, std::back_inserter(tokens));
- if (tokens.size() < 2)
- continue;
+ Context context_local("When reading package use.force file:");
+
+ LineConfigFile package_use_force_f(f / "package.use.force");
+ for (LineConfigFile::Iterator line(package_use_force_f.begin()), line_end(package_use_force_f.end());
+ line != line_end; ++line)
+ {
+ std::deque<std::string> tokens;
+ WhitespaceTokeniser::get_instance()->tokenise(*line, std::back_inserter(tokens));
+ if (tokens.size() < 2)
+ continue;
- std::deque<std::string>::iterator t=tokens.begin(), t_end=tokens.end();
- PackageDepAtom::ConstPointer d(new PackageDepAtom(*t++));
- QualifiedPackageName p(d->package());
+ std::deque<std::string>::iterator t=tokens.begin(), t_end=tokens.end();
+ PackageDepAtom::ConstPointer d(new PackageDepAtom(*t++));
+ QualifiedPackageName p(d->package());
- PackageUseMaskMap::iterator i = package_use_force.find(p);
- if (package_use_force.end() == i)
- i = package_use_force.insert(make_pair(p, std::list<std::pair<PackageDepAtom::ConstPointer, UseFlagName> >())).first;
+ PackageUseMaskMap::iterator i = package_use_force.find(p);
+ if (package_use_force.end() == i)
+ i = package_use_force.insert(make_pair(p, std::list<std::pair<PackageDepAtom::ConstPointer, UseFlagName> >())).first;
- for ( ; t != t_end; ++t)
- {
- (*i).second.push_back(std::make_pair(d, UseFlagName(*t)));
+ for ( ; t != t_end; ++t)
+ {
+ (*i).second.push_back(std::make_pair(d, UseFlagName(*t)));
+ }
}
}
- }
-
- if ((f / "virtuals").exists())
- {
- Context context_local("When reading virtuals file:");
- LineConfigFile virtuals_f(f / "virtuals");
- for (LineConfigFile::Iterator line(virtuals_f.begin()), line_end(virtuals_f.end()) ;
- line != line_end ; ++line)
+ if ((f / "virtuals").exists())
{
- std::deque<std::string> tokens;
- WhitespaceTokeniser::get_instance()->tokenise(*line, std::back_inserter(tokens));
- if (tokens.size() < 2)
- continue;
- virtuals_map.erase(QualifiedPackageName(tokens[0]));
- virtuals_map.insert(std::make_pair(QualifiedPackageName(tokens[0]),
- PackageDepAtom::Pointer(new PackageDepAtom(tokens[1]))));
- }
- }
+ Context context_local("When reading virtuals file:");
- if ((f / "packages").exists())
- {
- Context context_local("When reading packages file:");
+ LineConfigFile virtuals_f(f / "virtuals");
+ for (LineConfigFile::Iterator line(virtuals_f.begin()), line_end(virtuals_f.end()) ;
+ line != line_end ; ++line)
+ {
+ std::deque<std::string> tokens;
+ WhitespaceTokeniser::get_instance()->tokenise(*line, std::back_inserter(tokens));
+ if (tokens.size() < 2)
+ continue;
+ virtuals_map.erase(QualifiedPackageName(tokens[0]));
+ virtuals_map.insert(std::make_pair(QualifiedPackageName(tokens[0]),
+ PackageDepAtom::Pointer(new PackageDepAtom(tokens[1]))));
+ }
+ }
- LineConfigFile virtuals_f(f / "packages");
- for (LineConfigFile::Iterator line(virtuals_f.begin()), line_end(virtuals_f.end()) ;
- line != line_end ; ++line)
+ if ((f / "packages").exists())
{
- if (line->empty())
- continue;
+ Context context_local("When reading packages file:");
- Context context_line("When reading line '" + *line + "':");
+ LineConfigFile virtuals_f(f / "packages");
+ for (LineConfigFile::Iterator line(virtuals_f.begin()), line_end(virtuals_f.end()) ;
+ line != line_end ; ++line)
+ {
+ if (line->empty())
+ continue;
- if ('*' == line->at(0))
- system_lines.insert(line->substr(1));
- else if ('-' == line->at(0) && '*' == line->at(1))
- if (0==system_lines.erase(line->substr(2)))
- {
- Log::get_instance()->message(ll_qa, lc_context,
- "Trying to remove packages line '" + line->substr(2) +
- "' that doesn't exist.");
- }
+ Context context_line("When reading line '" + *line + "':");
+
+ if ('*' == line->at(0))
+ system_lines.insert(line->substr(1));
+ else if ('-' == line->at(0) && '*' == line->at(1))
+ if (0==system_lines.erase(line->substr(2)))
+ {
+ Log::get_instance()->message(ll_qa, lc_context,
+ "Trying to remove packages line '" + line->substr(2) +
+ "' that doesn't exist.");
+ }
+ }
}
}
-}
-void
-Implementation<PortageRepository>::need_profiles() const
-{
- if (has_profile)
- return;
+ void
+ Implementation<PortageRepository>::need_profiles() const
+ {
+ if (has_profile)
+ return;
- Context context("When loading profiles:");
- for (FSEntryCollection::Iterator p(profiles->begin()), p_end(profiles->end()) ;
- p != p_end ; ++p)
- add_profile(*p);
+ Context context("When loading profiles:");
+ for (FSEntryCollection::Iterator p(profiles->begin()), p_end(profiles->end()) ;
+ p != p_end ; ++p)
+ add_profile(*p);
- has_profile = true;
-}
+ has_profile = true;
+ }
-void
-Implementation<PortageRepository>::invalidate() const
-{
- has_category_names = false;
- category_names.clear();
- package_names.clear();
- version_specs.clear();
- metadata.clear();
- repo_mask.clear();
- has_repo_mask = false;
- use_mask.clear();
- use.clear();
- has_virtuals = false;
- virtuals_map.clear();
- has_profile = false;
- arch_list.clear();
- expand_list.clear();
- expand_hidden_list.clear();
- has_arch_list = false;
- has_mirrors = false;
- mirrors.clear();
- profile_env.clear();
- system_packages = AllDepAtom::Pointer(0);
+ void
+ Implementation<PortageRepository>::invalidate() const
+ {
+ has_category_names = false;
+ category_names.clear();
+ package_names.clear();
+ version_specs.clear();
+ metadata.clear();
+ repo_mask.clear();
+ has_repo_mask = false;
+ use_mask.clear();
+ use.clear();
+ has_virtuals = false;
+ virtuals_map.clear();
+ has_profile = false;
+ arch_list.clear();
+ expand_list.clear();
+ expand_hidden_list.clear();
+ has_arch_list = false;
+ has_mirrors = false;
+ mirrors.clear();
+ profile_env.clear();
+ system_packages = AllDepAtom::Pointer(0);
+ }
}
PortageRepository::PortageRepository(const PortageRepositoryParams & p) :
diff --git a/paludis/portage_repository.hh b/paludis/portage_repository.hh
index c3d4941..85d0190 100644
--- a/paludis/portage_repository.hh
+++ b/paludis/portage_repository.hh
@@ -197,11 +197,6 @@ namespace paludis
*/
~PortageRepository();
- virtual bool installed() const
- {
- return false;
- }
-
virtual void invalidate() const;
virtual ProvideMapIterator begin_provide_map() const;
diff --git a/paludis/repository.hh b/paludis/repository.hh
index 34cc951..48ccfb5 100644
--- a/paludis/repository.hh
+++ b/paludis/repository.hh
@@ -141,25 +141,31 @@ namespace paludis
std::map<std::string, std::string> _kvs;
public:
+ /// Constructor.
RepositoryInfoSection(const std::string & heading);
+ /// Our heading.
std::string heading() const
{
return _heading;
}
+ /// Iterate over our key/values.
typedef std::map<std::string, std::string>::const_iterator KeyValueIterator;
+ /// Start of our key/values.
KeyValueIterator begin_kvs() const
{
return _kvs.begin();
}
+ /// End of our key/values.
KeyValueIterator end_kvs() const
{
return _kvs.end();
}
+ /// Add a key/value pair.
RepositoryInfoSection & add_kv(const std::string &, const std::string &);
};
@@ -175,18 +181,22 @@ namespace paludis
std::list<RepositoryInfoSection> _sections;
public:
+ /// Iterator over our sections.
typedef std::list<RepositoryInfoSection>::const_iterator SectionIterator;
+ /// Start of our sections.
SectionIterator begin_sections() const
{
return _sections.begin();
}
+ /// End of our sections.
SectionIterator end_sections() const
{
return _sections.end();
}
+ /// Add a section.
RepositoryInfo & add_section(const RepositoryInfoSection &);
};
diff --git a/paludis/selinux/security_context.hh b/paludis/selinux/security_context.hh
index 8f7b4ef..5255c60 100644
--- a/paludis/selinux/security_context.hh
+++ b/paludis/selinux/security_context.hh
@@ -30,7 +30,7 @@
/** \file
* Declarations for SecurityContext and associated classes.
*
- * \ingroup grpfilesystem
+ * \ingroup grplibpaludisselinux
*/
namespace paludis {
@@ -39,10 +39,14 @@ namespace paludis {
/**
* Error class for SELinux-related functions
+ *
+ * \ingroup grplibpaludisselinux
+ * \ingroup grpexceptions
*/
class SELinuxException : public Exception
{
public:
+ /// Constructor.
SELinuxException(const std::string & message)
: Exception(message)
{ }
@@ -50,6 +54,8 @@ namespace paludis {
/**
* Security context class. Wraps security_context_t.
+ *
+ * \ingroup grplibpaludisselinux
*/
class SecurityContext : private PrivateImplementationPattern<SecurityContext>,
private InstantiationPolicy<SecurityContext, instantiation_method::NonCopyableTag>,
@@ -88,6 +94,8 @@ namespace paludis {
/**
* A SecurityContext can be written to a stream.
+ *
+ * \ingroup grplibpaludisselinux
*/
std::ostream& operator<<(std::ostream&, const SecurityContext &);
@@ -99,6 +107,8 @@ namespace paludis {
*
* Note that this operation is not thread-safe. Any multi-threaded code calling it must use a
* critical section to ensure the desired behaviour.
+ *
+ * \ingroup grplibpaludisselinux
*/
class FSCreateCon
{
@@ -120,6 +130,8 @@ namespace paludis {
/**
* Wrapper class around matchpathcon().
+ *
+ * \ingroup grplibpaludisselinux
*/
class MatchPathCon : public InstantiationPolicy<MatchPathCon, instantiation_method::SingletonAsNeededTag>
{
diff --git a/paludis/util/instantiation_policy.hh b/paludis/util/instantiation_policy.hh
index b9a23dd..94b6e28 100644
--- a/paludis/util/instantiation_policy.hh
+++ b/paludis/util/instantiation_policy.hh
@@ -36,36 +36,36 @@ namespace paludis
namespace instantiation_method
{
/**
- * Cannot be copie
+ * Cannot be copied or assigned to.
*
- * \ingroup grpinstanced or assigned to.
+ * \ingroup grpinstance
*/
struct NonCopyableTag
{
};
/**
- * Cannot be instantia
+ * Cannot be instantiated
*
- * \ingroup grpinstanceted.
+ * \ingroup grpinstance
*/
struct NonInstantiableTag
{
};
/**
- * Single instance cre
+ * Single instance created at startup.
*
- * \ingroup grpinstanceated at startup.
+ * \ingroup grpinstance
*/
struct SingletonAtStartupTag
{
};
/**
- * Single instance cre
+ * Single instance created when needed.
*
- * \ingroup grpinstanceated when needed.
+ * \ingroup grpinstance
*/
struct SingletonAsNeededTag
{
diff --git a/paludis/util/random.hh b/paludis/util/random.hh
index 6b278c2..bc5e43c 100644
--- a/paludis/util/random.hh
+++ b/paludis/util/random.hh
@@ -45,9 +45,13 @@ namespace paludis
static const uint32_t _m = 1771875;
public:
+ /// Constructor, with a seed.
Random(uint32_t seed);
+
+ /// Constructor, with a magic random seed.
Random();
+ /// Fetch a random number in (0, max]
template <typename DiffType_>
DiffType_ operator() (DiffType_ max)
{
diff --git a/paludis/vdb_repository.cc b/paludis/vdb_repository.cc
index 833f220..0c153b3 100644
--- a/paludis/vdb_repository.cc
+++ b/paludis/vdb_repository.cc
@@ -188,6 +188,47 @@ namespace
}
}
+namespace
+{
+ /**
+ * Fetch the contents of a VDB file.
+ *
+ * \ingroup grpvdbrepository
+ */
+ std::string
+ file_contents(const FSEntry & location, const QualifiedPackageName & name,
+ const VersionSpec & v, const std::string & key)
+ {
+ Context context("When loading VDBRepository entry for '" + stringify(name)
+ + "-" + stringify(v) + "' key '" + key + "' from '" + stringify(location) + "':");
+
+ FSEntry f(location / stringify(name.get<qpn_category>()) /
+ (stringify(name.get<qpn_package>()) + "-" + stringify(v)));
+ if (! (f / key).is_regular_file())
+ return "";
+
+ std::ifstream ff(stringify(f / key).c_str());
+ if (! ff)
+ throw VDBRepositoryKeyReadError("Could not read '" + stringify(f / key) + "'");
+ return strip_leading(strip_trailing(std::string((std::istreambuf_iterator<char>(ff)),
+ std::istreambuf_iterator<char>()), " \t\n"), " \t\n");
+ }
+
+ /**
+ * Filter if a USE flag is a -flag.
+ *
+ * \ingroup grpvdbrepository
+ */
+ struct IsPositiveFlag
+ {
+ bool operator() (const std::string & f) const
+ {
+ return 0 != f.compare(0, 1, "-");
+ }
+ };
+}
+
+
namespace paludis
{
/**
@@ -244,145 +285,105 @@ namespace paludis
/// Invalidate.
void invalidate() const;
};
-}
-Implementation<VDBRepository>::Implementation(const VDBRepositoryParams & p) :
- db(p.get<vdbrpk_package_database>()),
- env(p.get<vdbrpk_environment>()),
- location(p.get<vdbrpk_location>()),
- root(p.get<vdbrpk_root>()),
- buildroot(p.get<vdbrpk_buildroot>()),
- world_file(p.get<vdbrpk_world>()),
- entries_valid(false),
- has_provide_map(false)
-{
-}
-
-Implementation<VDBRepository>::~Implementation()
-{
-}
+ Implementation<VDBRepository>::Implementation(const VDBRepositoryParams & p) :
+ db(p.get<vdbrpk_package_database>()),
+ env(p.get<vdbrpk_environment>()),
+ location(p.get<vdbrpk_location>()),
+ root(p.get<vdbrpk_root>()),
+ buildroot(p.get<vdbrpk_buildroot>()),
+ world_file(p.get<vdbrpk_world>()),
+ entries_valid(false),
+ has_provide_map(false)
+ {
+ }
-void
-Implementation<VDBRepository>::load_entries() const
-{
- Context context("When loading VDBRepository entries from '" +
- stringify(location) + "':");
+ Implementation<VDBRepository>::~Implementation()
+ {
+ }
- entries.clear();
- entries_valid = true;
- try
+ void
+ Implementation<VDBRepository>::load_entries() const
{
- for (DirIterator cat_i(location), cat_iend ; cat_i != cat_iend ; ++cat_i)
- {
- if (! cat_i->is_directory())
- continue;
+ Context context("When loading VDBRepository entries from '" +
+ stringify(location) + "':");
- for (DirIterator pkg_i(*cat_i), pkg_iend ; pkg_i != pkg_iend ; ++pkg_i)
+ entries.clear();
+ entries_valid = true;
+ try
+ {
+ for (DirIterator cat_i(location), cat_iend ; cat_i != cat_iend ; ++cat_i)
{
- PackageDepAtom atom("=" + cat_i->basename() + "/" + pkg_i->basename());
- entries.push_back(VDBEntry(atom.package(), *atom.version_spec_ptr()));
+ if (! cat_i->is_directory())
+ continue;
+
+ for (DirIterator pkg_i(*cat_i), pkg_iend ; pkg_i != pkg_iend ; ++pkg_i)
+ {
+ PackageDepAtom atom("=" + cat_i->basename() + "/" + pkg_i->basename());
+ entries.push_back(VDBEntry(atom.package(), *atom.version_spec_ptr()));
+ }
}
- }
- std::sort(entries.begin(), entries.end());
- }
- catch (...)
- {
- entries_valid = false;
- throw;
+ std::sort(entries.begin(), entries.end());
+ }
+ catch (...)
+ {
+ entries_valid = false;
+ throw;
+ }
}
-}
-
-void
-Implementation<VDBRepository>::invalidate() const
-{
- entries_valid = false;
- entries.clear();
-
- has_provide_map = false;
- provide_map.clear();
-}
-namespace
-{
- /**
- * Fetch the contents of a VDB file.
- *
- * \ingroup grpvdbrepository
- */
- std::string
- file_contents(const FSEntry & location, const QualifiedPackageName & name,
- const VersionSpec & v, const std::string & key)
+ void
+ Implementation<VDBRepository>::invalidate() const
{
- Context context("When loading VDBRepository entry for '" + stringify(name)
- + "-" + stringify(v) + "' key '" + key + "' from '" + stringify(location) + "':");
-
- FSEntry f(location / stringify(name.get<qpn_category>()) /
- (stringify(name.get<qpn_package>()) + "-" + stringify(v)));
- if (! (f / key).is_regular_file())
- return "";
+ entries_valid = false;
+ entries.clear();
- std::ifstream ff(stringify(f / key).c_str());
- if (! ff)
- throw VDBRepositoryKeyReadError("Could not read '" + stringify(f / key) + "'");
- return strip_leading(strip_trailing(std::string((std::istreambuf_iterator<char>(ff)),
- std::istreambuf_iterator<char>()), " \t\n"), " \t\n");
+ has_provide_map = false;
+ provide_map.clear();
}
- /**
- * Filter if a USE flag is a -flag.
- *
- * \ingroup grpvdbrepository
- */
- struct IsPositiveFlag
+ void
+ Implementation<VDBRepository>::load_entry(std::vector<VDBEntry>::iterator p) const
{
- bool operator() (const std::string & f) const
+ Context context("When loading VDBRepository entry for '" + stringify(p->name)
+ + "-" + stringify(p->version) + "' from '" + stringify(location) + "':");
+
+ p->metadata = VersionMetadata::Pointer(new VersionMetadata::Ebuild(PortageDepParser::parse_depend));
+ p->metadata->get<vm_deps>().set<vmd_build_depend_string>(
+ file_contents(location, p->name, p->version, "DEPEND"));
+ p->metadata->get<vm_deps>().set<vmd_run_depend_string>(
+ file_contents(location, p->name, p->version, "RDEPEND"));
+ p->metadata->set<vm_license>(file_contents(location, p->name, p->version, "LICENSE"));
+ p->metadata->get_ebuild_interface()->set<evm_keywords>("*");
+ p->metadata->get_ebuild_interface()->set<evm_inherited>(
+ file_contents(location, p->name, p->version, "INHERITED"));
+ p->metadata->get_ebuild_interface()->set<evm_iuse>(
+ file_contents(location, p->name, p->version, "IUSE"));
+ p->metadata->get<vm_deps>().set<vmd_post_depend_string>(
+ file_contents(location, p->name, p->version, "PDEPEND"));
+ p->metadata->get_ebuild_interface()->set<evm_provide>(
+ file_contents(location, p->name, p->version, "PROVIDE"));
+ p->metadata->set<vm_eapi>(file_contents(location, p->name, p->version, "EAPI"));
+ p->metadata->set<vm_homepage>(file_contents(location, p->name, p->version, "HOMEPAGE"));
+ p->metadata->set<vm_description>(file_contents(location, p->name, p->version, "DESCRIPTION"));
+
+ std::string slot(file_contents(location, p->name, p->version, "SLOT"));
+ if (slot.empty())
{
- return 0 != f.compare(0, 1, "-");
+ Log::get_instance()->message(ll_warning, lc_no_context, "VDBRepository entry '" +
+ stringify(p->name) + "-" + stringify(p->version) + "' in '" +
+ stringify(location) + "' has empty SLOT, setting to \"0\"");
+ slot = "0";
}
- };
-}
+ p->metadata->set<vm_slot>(SlotName(slot));
-void
-Implementation<VDBRepository>::load_entry(std::vector<VDBEntry>::iterator p) const
-{
- Context context("When loading VDBRepository entry for '" + stringify(p->name)
- + "-" + stringify(p->version) + "' from '" + stringify(location) + "':");
-
- p->metadata = VersionMetadata::Pointer(new VersionMetadata::Ebuild(PortageDepParser::parse_depend));
- p->metadata->get<vm_deps>().set<vmd_build_depend_string>(
- file_contents(location, p->name, p->version, "DEPEND"));
- p->metadata->get<vm_deps>().set<vmd_run_depend_string>(
- file_contents(location, p->name, p->version, "RDEPEND"));
- p->metadata->set<vm_license>(file_contents(location, p->name, p->version, "LICENSE"));
- p->metadata->get_ebuild_interface()->set<evm_keywords>("*");
- p->metadata->get_ebuild_interface()->set<evm_inherited>(
- file_contents(location, p->name, p->version, "INHERITED"));
- p->metadata->get_ebuild_interface()->set<evm_iuse>(
- file_contents(location, p->name, p->version, "IUSE"));
- p->metadata->get<vm_deps>().set<vmd_post_depend_string>(
- file_contents(location, p->name, p->version, "PDEPEND"));
- p->metadata->get_ebuild_interface()->set<evm_provide>(
- file_contents(location, p->name, p->version, "PROVIDE"));
- p->metadata->set<vm_eapi>(file_contents(location, p->name, p->version, "EAPI"));
- p->metadata->set<vm_homepage>(file_contents(location, p->name, p->version, "HOMEPAGE"));
- p->metadata->set<vm_description>(file_contents(location, p->name, p->version, "DESCRIPTION"));
-
- std::string slot(file_contents(location, p->name, p->version, "SLOT"));
- if (slot.empty())
- {
- Log::get_instance()->message(ll_warning, lc_no_context, "VDBRepository entry '" +
- stringify(p->name) + "-" + stringify(p->version) + "' in '" +
- stringify(location) + "' has empty SLOT, setting to \"0\"");
- slot = "0";
+ std::string raw_use(file_contents(location, p->name, p->version, "USE"));
+ p->use.clear();
+ WhitespaceTokeniser::get_instance()->tokenise(raw_use,
+ filter_inserter(create_inserter<UseFlagName>(
+ std::inserter(p->use, p->use.begin())), IsPositiveFlag()));
}
- p->metadata->set<vm_slot>(SlotName(slot));
-
- std::string raw_use(file_contents(location, p->name, p->version, "USE"));
- p->use.clear();
- WhitespaceTokeniser::get_instance()->tokenise(raw_use,
- filter_inserter(create_inserter<UseFlagName>(
- std::inserter(p->use, p->use.begin())), IsPositiveFlag()));
}
VDBRepository::VDBRepository(const VDBRepositoryParams & p) :
diff --git a/paludis/vdb_repository.hh b/paludis/vdb_repository.hh
index 4600bbb..4c0b407 100644
--- a/paludis/vdb_repository.hh
+++ b/paludis/vdb_repository.hh
@@ -158,11 +158,6 @@ namespace paludis
*/
~VDBRepository();
- virtual bool installed() const
- {
- return true;
- }
-
virtual void invalidate() const;
virtual ProvideMapIterator begin_provide_map() const;