aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-06 19:13:49 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-12-06 19:13:49 +0000
commitaf59deeafa26271274a80a4f7ea9bed48beb28e1 (patch)
tree7c4cbda238e5ea6136c042f582f57f6815d05d7c
parent26e9d4a80c83fa61580e54b9251713e733242365 (diff)
downloadpaludis-af59deeafa26271274a80a4f7ea9bed48beb28e1.tar.gz
paludis-af59deeafa26271274a80a4f7ea9bed48beb28e1.tar.xz
kill more sr
-rw-r--r--doc/api/cplusplus/examples/example_name.cc2
-rw-r--r--paludis/dep_list.cc2
-rw-r--r--paludis/environments/test/test_environment.cc4
-rw-r--r--paludis/files.m42
-rw-r--r--paludis/fuzzy_finder.cc8
-rw-r--r--paludis/generator.cc8
-rw-r--r--paludis/match_package.cc4
-rw-r--r--paludis/name.cc27
-rw-r--r--paludis/name.hh29
-rw-r--r--paludis/name.sr30
-rw-r--r--paludis/ndbam.cc24
-rw-r--r--paludis/ndbam_merger.cc4
-rw-r--r--paludis/ndbam_unmerger.cc4
-rw-r--r--paludis/package_database.cc6
-rw-r--r--paludis/repositories/cran/cran_installed_repository.cc10
-rw-r--r--paludis/repositories/cran/cran_package_id.cc2
-rw-r--r--paludis/repositories/cran/cran_repository.cc2
-rw-r--r--paludis/repositories/e/e_installed_repository.cc4
-rw-r--r--paludis/repositories/e/ebuild.cc20
-rw-r--r--paludis/repositories/e/ebuild_entries.cc24
-rw-r--r--paludis/repositories/e/ebuild_id.cc8
-rw-r--r--paludis/repositories/e/exheres_layout.cc16
-rw-r--r--paludis/repositories/e/exndbam_repository.cc4
-rw-r--r--paludis/repositories/e/fetch_visitor.cc12
-rw-r--r--paludis/repositories/e/traditional_layout.cc16
-rw-r--r--paludis/repositories/e/vdb_merger.cc4
-rw-r--r--paludis/repositories/e/vdb_repository.cc34
-rw-r--r--paludis/repositories/e/vdb_unmerger.cc4
-rw-r--r--paludis/repositories/fake/fake_repository_base.cc12
-rw-r--r--paludis/repositories/gems/gems_repository.cc6
-rw-r--r--paludis/repositories/gems/installed_gems_repository.cc6
-rw-r--r--paludis/repositories/unavailable/unavailable_repository_store.cc8
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc2
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc8
-rw-r--r--paludis/repositories/unwritten/unwritten_repository_store.cc8
-rw-r--r--paludis/repositories/virtuals/installed_virtuals_repository.cc4
-rw-r--r--paludis/repositories/virtuals/virtuals_repository.cc8
-rw-r--r--paludis/repository_name_cache.cc14
-rw-r--r--python/name.cc14
-rw-r--r--ruby/qualified_package_name.cc16
-rw-r--r--src/clients/adjutrix/find_dropped_keywords.cc10
-rw-r--r--src/clients/adjutrix/find_reverse_deps.cc2
-rw-r--r--src/clients/adjutrix/find_stable_candidates.cc10
-rw-r--r--src/clients/adjutrix/keywords_graph.cc2
-rw-r--r--src/clients/instruo/instruo.cc6
-rw-r--r--src/clients/paludis/list.cc2
46 files changed, 238 insertions, 214 deletions
diff --git a/doc/api/cplusplus/examples/example_name.cc b/doc/api/cplusplus/examples/example_name.cc
index a56a177..76a6320 100644
--- a/doc/api/cplusplus/examples/example_name.cc
+++ b/doc/api/cplusplus/examples/example_name.cc
@@ -75,7 +75,7 @@ int main(int argc, char * argv[])
QualifiedPackageName q1("cat/pkg"), q2(CategoryNamePart("cat") + PackageNamePart("pkg"));
cout << q1 << " " << (q1 == q2 ? "==" : "!=") << " " << q2 << endl;
- cout << q1 << " has category '" << q1.category << "' and package part '" << q1.package << "'" << endl;
+ cout << q1 << " has category '" << q1.category() << "' and package part '" << q1.package() << "'" << endl;
}
catch (const Exception & e)
{
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 744c757..4eab9a1 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -1387,7 +1387,7 @@ namespace
{
bool is_scm(const QualifiedPackageName & n)
{
- std::string pkg(stringify(n.package));
+ std::string pkg(stringify(n.package()));
switch (pkg.length())
{
case 0:
diff --git a/paludis/environments/test/test_environment.cc b/paludis/environments/test/test_environment.cc
index 7f999a1..7d2aac9 100644
--- a/paludis/environments/test/test_environment.cc
+++ b/paludis/environments/test/test_environment.cc
@@ -279,9 +279,9 @@ TestEnvironment::want_choice_enabled(
{
if (stringify(v) == "pkgname")
{
- if ("enabled" == stringify(id->name().package))
+ if ("enabled" == stringify(id->name().package()))
return Tribool(true);
- else if ("disabled" == stringify(id->name().package))
+ else if ("disabled" == stringify(id->name().package()))
return Tribool(false);
else
return Tribool(indeterminate);
diff --git a/paludis/files.m4 b/paludis/files.m4
index a1fa408..4d5c85d 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -51,7 +51,7 @@ add(`merger', `hh', `cc', `fwd', `se', `test', `tests
add(`merger_entry_type', `hh', `cc', `se')
add(`metadata_key', `hh', `cc', `se', `fwd')
add(`metadata_key_holder', `hh', `cc', `fwd')
-add(`name', `hh', `cc', `fwd', `test', `sr')
+add(`name', `hh', `cc', `fwd', `test')
add(`ndbam', `hh', `cc', `fwd')
add(`ndbam_merger', `hh', `cc')
add(`ndbam_unmerger', `hh', `cc')
diff --git a/paludis/fuzzy_finder.cc b/paludis/fuzzy_finder.cc
index bab4f8f..f7d7306 100644
--- a/paludis/fuzzy_finder.cc
+++ b/paludis/fuzzy_finder.cc
@@ -101,8 +101,8 @@ namespace
for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()),
p_end(pkgs->end()); p_end != p; ++p)
- if (tolower(p->package.data()[0]) == _first_char &&
- _distance_calculator.distance_with(tolower_0_cost(p->package.data())) <= _threshold)
+ if (tolower(p->package().data()[0]) == _first_char &&
+ _distance_calculator.distance_with(tolower_0_cost(p->package().data())) <= _threshold)
result->insert(*p);
return result;
@@ -140,8 +140,8 @@ FuzzyCandidatesFinder::FuzzyCandidatesFinder(const Environment & e, const std::s
if (pds.package_ptr())
{
- g = g & generator::Category(pds.package_ptr()->category);
- package = stringify(pds.package_ptr()->package);
+ g = g & generator::Category(pds.package_ptr()->category());
+ package = stringify(pds.package_ptr()->package());
}
if (pds.in_repository_ptr())
diff --git a/paludis/generator.cc b/paludis/generator.cc
index 5fd53f7..e146060 100644
--- a/paludis/generator.cc
+++ b/paludis/generator.cc
@@ -243,9 +243,9 @@ namespace
for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- if (env->package_database()->fetch_repository(*r)->has_category_named(name.category))
+ if (env->package_database()->fetch_repository(*r)->has_category_named(name.category()))
{
- result->insert(name.category);
+ result->insert(name.category());
break;
}
@@ -370,9 +370,9 @@ namespace
std::tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
for (RepositoryNameSet::ConstIterator r(repos->begin()), r_end(repos->end()) ;
r != r_end ; ++r)
- if (env->package_database()->fetch_repository(*r)->has_category_named(spec.package_ptr()->category))
+ if (env->package_database()->fetch_repository(*r)->has_category_named(spec.package_ptr()->category()))
{
- result->insert(spec.package_ptr()->category);
+ result->insert(spec.package_ptr()->category());
break;
}
diff --git a/paludis/match_package.cc b/paludis/match_package.cc
index 9b20903..255143a 100644
--- a/paludis/match_package.cc
+++ b/paludis/match_package.cc
@@ -83,10 +83,10 @@ paludis::match_package(
if (spec.package_ptr() && *spec.package_ptr() != entry.name())
return false;
- if (spec.package_name_part_ptr() && *spec.package_name_part_ptr() != entry.name().package)
+ if (spec.package_name_part_ptr() && *spec.package_name_part_ptr() != entry.name().package())
return false;
- if (spec.category_name_part_ptr() && *spec.category_name_part_ptr() != entry.name().category)
+ if (spec.category_name_part_ptr() && *spec.category_name_part_ptr() != entry.name().category())
return false;
if (spec.version_requirements_ptr())
diff --git a/paludis/name.cc b/paludis/name.cc
index a88b7a6..2ad4bc6 100644
--- a/paludis/name.cc
+++ b/paludis/name.cc
@@ -32,8 +32,6 @@
using namespace paludis;
-#include <paludis/name-sr.cc>
-
template struct Sequence<RepositoryName>;
template struct WrappedForwardIterator<Sequence<RepositoryName>::ConstIteratorTag, const RepositoryName>;
@@ -73,7 +71,7 @@ QualifiedPackageNameError::QualifiedPackageNameError(const std::string & s) thro
std::ostream &
paludis::operator<< (std::ostream & s, const QualifiedPackageName & q)
{
- s << q.category << "/" << q.package;
+ s << q.category() << "/" << q.package();
return s;
}
@@ -316,6 +314,29 @@ QualifiedPackageName::QualifiedPackageName(const std::string & s) :
{
}
+QualifiedPackageName::QualifiedPackageName(const CategoryNamePart & c, const PackageNamePart & p) :
+ category(c),
+ package(p)
+{
+}
+
+bool
+QualifiedPackageName::operator< (const QualifiedPackageName & other) const
+{
+ if (category() < other.category())
+ return true;
+ if (category() > other.category())
+ return false;
+
+ return package() < other.package();
+}
+
+bool
+QualifiedPackageName::operator== (const QualifiedPackageName & other) const
+{
+ return category() == other.category() && package() == other.package();
+}
+
void
SetNameValidator::validate(const std::string & s)
{
diff --git a/paludis/name.hh b/paludis/name.hh
index c9b925f..a02ddfd 100644
--- a/paludis/name.hh
+++ b/paludis/name.hh
@@ -23,8 +23,8 @@
#include <paludis/name-fwd.hh>
#include <paludis/util/exception.hh>
#include <paludis/util/instantiation_policy.hh>
-#include <paludis/util/sr.hh>
#include <paludis/util/validated.hh>
+#include <paludis/util/named_value.hh>
#include <string>
#include <iosfwd>
@@ -41,6 +41,12 @@
namespace paludis
{
+ namespace n
+ {
+ struct category;
+ struct package;
+ }
+
/**
* A PackageNamePartError is thrown if an invalid value is assigned to
* a PackageNamePart.
@@ -107,7 +113,26 @@ namespace paludis
static void validate(const std::string &);
};
-#include <paludis/name-sr.hh>
+ /**
+ * Represents a category plus package name.
+ *
+ * \ingroup g_names
+ * \nosubgrouping
+ */
+ struct PALUDIS_VISIBLE QualifiedPackageName :
+ relational_operators::HasRelationalOperators
+ {
+ NamedValue<n::category, CategoryNamePart> category;
+ NamedValue<n::package, PackageNamePart> package;
+
+ QualifiedPackageName(const CategoryNamePart &, const PackageNamePart &);
+ explicit QualifiedPackageName(const std::string &);
+
+ std::size_t hash() const PALUDIS_ATTRIBUTE((warn_unused_result));
+
+ bool operator< (const QualifiedPackageName &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+ bool operator== (const QualifiedPackageName &) const PALUDIS_ATTRIBUTE((warn_unused_result));
+ };
/**
* A QualifiedPackageNameError may be thrown if an invalid name is
diff --git a/paludis/name.sr b/paludis/name.sr
deleted file mode 100644
index c975309..0000000
--- a/paludis/name.sr
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env bash
-# vim: set sw=4 sts=4 et :
-
-make_class_QualifiedPackageName()
-{
- visible
-
- key category CategoryNamePart
- key package PackageNamePart
-
- comparison_operators all all
-
- extra_constructors <<END
- explicit QualifiedPackageName(const std::string &);
-END
-
- extra_methods <<END
- std::size_t hash() const PALUDIS_ATTRIBUTE((warn_unused_result));
-END
-
- doxygen_comment << "END"
- /**
- * Represents a category plus package name.
- *
- * \ingroup g_names
- * \nosubgrouping
- */
-END
-}
-
diff --git a/paludis/ndbam.cc b/paludis/ndbam.cc
index db0d7a5..999befd 100644
--- a/paludis/ndbam.cc
+++ b/paludis/ndbam.cc
@@ -240,13 +240,13 @@ NDBAM::has_category_named(const CategoryNamePart & c)
bool
NDBAM::has_package_named(const QualifiedPackageName & q)
{
- if (! has_category_named(q.category))
+ if (! has_category_named(q.category()))
return false;
Lock l(_imp->category_names_mutex);
- CategoryContentsMap::iterator cc_i(_imp->category_contents_map.find(q.category));
+ CategoryContentsMap::iterator cc_i(_imp->category_contents_map.find(q.category()));
if (_imp->category_contents_map.end() == cc_i || ! cc_i->second)
- throw InternalError(PALUDIS_HERE, "has_category_named(" + stringify(q.category) + ") but got category_contents_map end or zero pointer");
+ throw InternalError(PALUDIS_HERE, "has_category_named(" + stringify(q.category()) + ") but got category_contents_map end or zero pointer");
CategoryContents & cc(*cc_i->second);
l.acquire_then_release_old(cc.mutex);
@@ -257,7 +257,7 @@ NDBAM::has_package_named(const QualifiedPackageName & q)
if (! cc.package_names)
{
- if (FSEntry(_imp->location / "indices" / "categories" / stringify(q.category) / stringify(q.package)).is_directory_or_symlink_to_directory())
+ if (FSEntry(_imp->location / "indices" / "categories" / stringify(q.category()) / stringify(q.package())).is_directory_or_symlink_to_directory())
{
cc.package_contents_map.insert(std::make_pair(q, new PackageContents));
return true;
@@ -286,7 +286,7 @@ NDBAM::entries(const QualifiedPackageName & q)
return make_shared_ptr(new NDBAMEntrySequence);
Lock l(_imp->category_names_mutex);
- CategoryContentsMap::iterator cc_i(_imp->category_contents_map.find(q.category));
+ CategoryContentsMap::iterator cc_i(_imp->category_contents_map.find(q.category()));
if (_imp->category_contents_map.end() == cc_i || ! cc_i->second)
throw InternalError(PALUDIS_HERE, "has_package_named(" + stringify(q) + ") but got category_contents_map end or zero pointer");
CategoryContents & cc(*cc_i->second);
@@ -303,7 +303,7 @@ NDBAM::entries(const QualifiedPackageName & q)
pc.entries.reset(new NDBAMEntrySequence);
Context context("When loading versions in '" + stringify(q) + "' for NDBAM at '" + stringify(_imp->location) + "':");
pc.entries.reset(new NDBAMEntrySequence);
- for (DirIterator d(_imp->location / "indices" / "categories" / stringify(q.category) / stringify(q.package)), d_end ;
+ for (DirIterator d(_imp->location / "indices" / "categories" / stringify(q.category()) / stringify(q.package())), d_end ;
d != d_end ; ++d)
{
if (! d->is_directory_or_symlink_to_directory())
@@ -558,10 +558,10 @@ NDBAM::deindex(const QualifiedPackageName & q) const
{
Context context("When deindexing '" + stringify(q) + "' in NDBAM at '" + stringify(_imp->location) + "':");
- FSEntry cp_index_sym(_imp->location / "indices" / "categories" / stringify(q.category) / stringify(q.package));
+ FSEntry cp_index_sym(_imp->location / "indices" / "categories" / stringify(q.category()) / stringify(q.package()));
cp_index_sym.unlink();
- FSEntry pc_index_sym(_imp->location / "indices" / "packages" / stringify(q.package) / stringify(q.category));
+ FSEntry pc_index_sym(_imp->location / "indices" / "packages" / stringify(q.package()) / stringify(q.category()));
pc_index_sym.unlink();
}
@@ -571,15 +571,15 @@ NDBAM::index(const QualifiedPackageName & q, const std::string & d) const
Context context("When indexing '" + stringify(q) + "' to '" + stringify(d) +
"' in NDBAM at '" + stringify(_imp->location) + "':");
- FSEntry cp_index_sym(_imp->location / "indices" / "categories" / stringify(q.category));
+ FSEntry cp_index_sym(_imp->location / "indices" / "categories" / stringify(q.category()));
cp_index_sym.mkdir();
- cp_index_sym /= stringify(q.package);
+ cp_index_sym /= stringify(q.package());
if (! cp_index_sym.exists())
cp_index_sym.symlink("../../../data/" + d);
- FSEntry pc_index_sym(_imp->location / "indices" / "packages" / stringify(q.package));
+ FSEntry pc_index_sym(_imp->location / "indices" / "packages" / stringify(q.package()));
pc_index_sym.mkdir();
- pc_index_sym /= stringify(q.category);
+ pc_index_sym /= stringify(q.category());
if (! pc_index_sym.exists())
pc_index_sym.symlink("../../../data/" + d);
}
diff --git a/paludis/ndbam_merger.cc b/paludis/ndbam_merger.cc
index a689d45..9807f4e 100644
--- a/paludis/ndbam_merger.cc
+++ b/paludis/ndbam_merger.cc
@@ -89,8 +89,8 @@ NDBAMMerger::extend_hook(const Hook & h)
if (_imp->params.package_id())
{
- std::string cat(stringify(_imp->params.package_id()->name().category));
- std::string pn(stringify(_imp->params.package_id()->name().package));
+ std::string cat(stringify(_imp->params.package_id()->name().category()));
+ std::string pn(stringify(_imp->params.package_id()->name().package()));
std::string pvr(stringify(_imp->params.package_id()->version()));
std::string pv(stringify(_imp->params.package_id()->version().remove_revision()));
std::string slot(stringify(_imp->params.package_id()->slot()));
diff --git a/paludis/ndbam_unmerger.cc b/paludis/ndbam_unmerger.cc
index 3786b1e..70ac562 100644
--- a/paludis/ndbam_unmerger.cc
+++ b/paludis/ndbam_unmerger.cc
@@ -127,8 +127,8 @@ NDBAMUnmerger::extend_hook(const Hook & h) const
if (_imp->options.package_id())
{
- std::string cat(stringify(_imp->options.package_id()->name().category));
- std::string pn(stringify(_imp->options.package_id()->name().package));
+ std::string cat(stringify(_imp->options.package_id()->name().category()));
+ std::string pn(stringify(_imp->options.package_id()->name().package()));
std::string pvr(stringify(_imp->options.package_id()->version()));
std::string pv(stringify(_imp->options.package_id()->version().remove_revision()));
diff --git a/paludis/package_database.cc b/paludis/package_database.cc
index 5435c40..9743971 100644
--- a/paludis/package_database.cc
+++ b/paludis/package_database.cc
@@ -250,14 +250,14 @@ PackageDatabase::fetch_unique_qualified_package_name(const PackageNamePart & p,
for (IndirectIterator<PackageIDSequence::ConstIterator> it(pkgs->begin()),
it_end(pkgs->end()); it_end != it; ++it)
{
- Context local_context("When checking category '" + stringify(it->name().category) + "' in repository '" +
+ Context local_context("When checking category '" + stringify(it->name().category()) + "' in repository '" +
stringify(it->repository()->name()) + "':");
- if (! checked.insert(std::make_pair(it->name().category, it->repository()->name())).second)
+ if (! checked.insert(std::make_pair(it->name().category(), it->repository()->name())).second)
continue;
std::tr1::shared_ptr<const CategoryNamePartSet> unimportant_cats(it->repository()->unimportant_category_names());
- bool is_important(unimportant_cats->end() == unimportant_cats->find(it->name().category));
+ bool is_important(unimportant_cats->end() == unimportant_cats->find(it->name().category()));
if (is_important)
result->erase(it->name());
result->insert(it->name(), is_important);
diff --git a/paludis/repositories/cran/cran_installed_repository.cc b/paludis/repositories/cran/cran_installed_repository.cc
index 955b868..da98e99 100644
--- a/paludis/repositories/cran/cran_installed_repository.cc
+++ b/paludis/repositories/cran/cran_installed_repository.cc
@@ -204,7 +204,7 @@ CRANInstalledRepository::has_package_named(const QualifiedPackageName & q) const
{
Context context("When checking for package '" + stringify(q) + "' in " + stringify(name()) + ":");
- if (! has_category_named(q.category))
+ if (! has_category_named(q.category()))
return false;
need_ids();
@@ -270,7 +270,7 @@ CRANInstalledRepository::do_contents(const Package ID & id) const
if (! has_version(q, v))
return result;
- std::string pn = stringify(q.package);
+ std::string pn = stringify(q.package());
CRANDescription::normalise_name(pn);
FSEntry f(_imp->location / "paludis" / pn / "CONTENTS");
if (! f.is_regular_file())
@@ -353,7 +353,7 @@ CRANInstalledRepository::do_installed_time(const QualifiedPackageName & q,
{
if (0 == r->installed_time)
{
- std::string pn(stringify(q.package));
+ std::string pn(stringify(q.package()));
CRANDescription::normalise_name(pn);
FSEntry f(_imp->location / "paludis" / pn / "CONTENTS");
try
@@ -435,7 +435,7 @@ CRANInstalledRepository::do_uninstall(const QualifiedPackageName & q, const Vers
std::tr1::shared_ptr<const FSEntryCollection> bashrc_files(_imp->env->bashrc_files());
Command cmd(Command(LIBEXECDIR "/paludis/cran.bash unmerge")
- .with_setenv("PN", vm->cran_interface->package)
+ .with_setenv("PN", vm->cran_interface->package())
.with_setenv("PV", stringify(v))
.with_setenv("PALUDIS_CRAN_LIBRARY", stringify(_imp->location))
.with_setenv("PALUDIS_EBUILD_DIR", std::string(LIBEXECDIR "/paludis/"))
@@ -464,7 +464,7 @@ CRANInstalledRepository::package_set(const SetName & s) const
{
std::tr1::shared_ptr<TreeLeaf<SetSpecTree, PackageDepSpec> > spec(
new TreeLeaf<SetSpecTree, PackageDepSpec>(make_shared_ptr(
- new PackageDepSpec(cranrepository::parse_cran_package_dep_spec(stringify(p->first.package))))));
+ new PackageDepSpec(cranrepository::parse_cran_package_dep_spec(stringify(p->first.package()))))));
result->add(spec);
}
diff --git a/paludis/repositories/cran/cran_package_id.cc b/paludis/repositories/cran/cran_package_id.cc
index ce88c49..be6059e 100644
--- a/paludis/repositories/cran/cran_package_id.cc
+++ b/paludis/repositories/cran/cran_package_id.cc
@@ -228,7 +228,7 @@ CRANPackageID::CRANPackageID(const Environment * const env, const std::tr1::shar
for (std::list<std::string>::const_iterator t(tokens.begin()), t_end(tokens.end()) ;
t != t_end ; ++t)
{
- if (*t != stringify(name().package))
+ if (*t != stringify(name().package()))
_imp->contains_key->push_back(make_shared_ptr(new CRANPackageID(_imp->env, _imp->cran_repository, this, *t)));
else
{
diff --git a/paludis/repositories/cran/cran_repository.cc b/paludis/repositories/cran/cran_repository.cc
index 5f7765c..c9f1785 100644
--- a/paludis/repositories/cran/cran_repository.cc
+++ b/paludis/repositories/cran/cran_repository.cc
@@ -155,7 +155,7 @@ CRANRepository::has_package_named(const QualifiedPackageName & q) const
Context context("When checking for package '" + stringify(q) + "' in " + stringify(name()) + ":");
Lock l(*_imp->big_nasty_mutex);
- if (! has_category_named(q.category))
+ if (! has_category_named(q.category()))
return false;
need_ids();
diff --git a/paludis/repositories/e/e_installed_repository.cc b/paludis/repositories/e/e_installed_repository.cc
index 84c6b16..2f09f00 100644
--- a/paludis/repositories/e/e_installed_repository.cc
+++ b/paludis/repositories/e/e_installed_repository.cc
@@ -276,7 +276,7 @@ EInstalledRepository::perform_config(const std::tr1::shared_ptr<const ERepositor
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
value_for<n::distdir>(ver_dir),
value_for<n::ebuild_dir>(ver_dir),
- value_for<n::ebuild_file>(ver_dir / (stringify(id->name().package) + "-" + stringify(id->version()) + ".ebuild")),
+ value_for<n::ebuild_file>(ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild")),
value_for<n::eclassdirs>(eclassdirs),
value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
@@ -375,7 +375,7 @@ EInstalledRepository::perform_info(const std::tr1::shared_ptr<const ERepositoryI
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
value_for<n::distdir>(ver_dir),
value_for<n::ebuild_dir>(ver_dir),
- value_for<n::ebuild_file>(ver_dir / (stringify(id->name().package) + "-" + stringify(id->version()) + ".ebuild")),
+ value_for<n::ebuild_file>(ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild")),
value_for<n::eclassdirs>(eclassdirs),
value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
diff --git a/paludis/repositories/e/ebuild.cc b/paludis/repositories/e/ebuild.cc
index baaf1c7..ba52946 100644
--- a/paludis/repositories/e/ebuild.cc
+++ b/paludis/repositories/e/ebuild.cc
@@ -128,9 +128,9 @@ EbuildCommand::operator() ()
cmd = extend_command(cmd
.with_setenv("PV", stringify(params.package_id()->version().remove_revision()))
.with_setenv("PR", stringify(params.package_id()->version().revision_only()))
- .with_setenv("PN", stringify(params.package_id()->name().package))
+ .with_setenv("PN", stringify(params.package_id()->name().package()))
.with_setenv("PVR", stringify(params.package_id()->version()))
- .with_setenv("CATEGORY", stringify(params.package_id()->name().category))
+ .with_setenv("CATEGORY", stringify(params.package_id()->name().category()))
.with_setenv("REPOSITORY", stringify(params.package_id()->repository()->name()))
.with_setenv("EAPI", stringify(params.package_id()->eapi()->exported_name()))
.with_setenv("PKGMANAGER", PALUDIS_PACKAGE "-" + stringify(PALUDIS_VERSION_MAJOR) + "." +
@@ -223,11 +223,11 @@ EbuildCommand::operator() ()
stringify(params.distdir()));
if (! params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_p().empty())
cmd.with_setenv(params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_p(),
- stringify(params.package_id()->name().package) + "-" +
+ stringify(params.package_id()->name().package()) + "-" +
stringify(params.package_id()->version().remove_revision()));
if (! params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_pf().empty())
cmd.with_setenv(params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_pf(),
- stringify(params.package_id()->name().package) + "-" +
+ stringify(params.package_id()->name().package()) + "-" +
stringify(params.package_id()->version()));
if (! params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_filesdir().empty())
cmd.with_setenv(params.package_id()->eapi()->supported()->ebuild_environment_variables()->env_filesdir(),
@@ -266,8 +266,8 @@ EbuildCommand::add_portage_vars(const Command & cmd) const
.with_setenv("PORTAGE_ACTUAL_DISTDIR", stringify(params.distdir()))
.with_setenv("PORTAGE_BASHRC", "/dev/null")
.with_setenv("PORTAGE_BUILDDIR", stringify(params.builddir()) + "/" +
- stringify(params.package_id()->name().category) + "-" +
- stringify(params.package_id()->name().package) + "-" +
+ stringify(params.package_id()->name().category()) + "-" +
+ stringify(params.package_id()->name().package()) + "-" +
stringify(params.package_id()->version()))
.with_setenv("PORTAGE_CALLER", params.environment()->paludis_command())
.with_setenv("PORTAGE_GID", "0")
@@ -926,9 +926,9 @@ Command
EbuildPretendCommand::extend_command(const Command & cmd)
{
Command result(Command(cmd)
- .with_stdout_prefix(stringify(params.package_id()->name().package) + "-" +
+ .with_stdout_prefix(stringify(params.package_id()->name().package()) + "-" +
stringify(params.package_id()->version()) + "> ")
- .with_stderr_prefix(stringify(params.package_id()->name().package) + "-" +
+ .with_stderr_prefix(stringify(params.package_id()->name().package()) + "-" +
stringify(params.package_id()->version()) + "> ")
.with_prefix_discard_blank_output()
.with_prefix_blank_lines()
@@ -1048,8 +1048,8 @@ WriteBinaryEbuildCommand::operator() ()
throw InstallActionError("Don't know how to write binary ebuilds using EAPI 'pbin-1+" +
params.package_id()->eapi()->exported_name());
- std::string bindistfile(stringify(params.destination_repository()->name()) + "--" + stringify(params.package_id()->name().category)
- + "--" + stringify(params.package_id()->name().package) + "-" + stringify(params.package_id()->version())
+ std::string bindistfile(stringify(params.destination_repository()->name()) + "--" + stringify(params.package_id()->name().category())
+ + "--" + stringify(params.package_id()->name().package()) + "-" + stringify(params.package_id()->version())
+ "--" + cookie());
std::string ebuild_cmd(getenv_with_default("PALUDIS_EBUILD_DIR", LIBEXECDIR "/paludis") +
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 43d3794..0740e8b 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -638,10 +638,10 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
(*o.destination()).destination_interface()->merge(
make_named_values<MergeParams>(
- value_for<n::environment_file>(_imp->params.builddir() / (stringify(id->name().category) + "-" +
- stringify(id->name().package) + "-" + stringify(id->version())) / "temp" / "loadsaveenv"),
- value_for<n::image_dir>(_imp->params.builddir() / (stringify(id->name().category) + "-" +
- stringify(id->name().package) + "-" + stringify(id->version())) / "image"),
+ value_for<n::environment_file>(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
+ stringify(id->name().package()) + "-" + stringify(id->version())) / "temp" / "loadsaveenv"),
+ value_for<n::image_dir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
+ stringify(id->name().package()) + "-" + stringify(id->version())) / "image"),
value_for<n::options>(id->eapi()->supported()->merger_options()),
value_for<n::package_id>(id),
value_for<n::used_this_for_config_protect>(o.used_this_for_config_protect())
@@ -669,10 +669,10 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
ELikeSplitChoiceValue::canonical_name_with_prefix()));
EStripper stripper(make_named_values<EStripperOptions>(
- value_for<n::debug_dir>(_imp->params.builddir() / (stringify(id->name().category) + "-" +
- stringify(id->name().package) + "-" + stringify(id->version())) / "image" / "usr" / libdir / "debug"),
- value_for<n::image_dir>(_imp->params.builddir() / (stringify(id->name().category) + "-" +
- stringify(id->name().package) + "-" + stringify(id->version())) / "image"),
+ value_for<n::debug_dir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
+ stringify(id->name().package()) + "-" + stringify(id->version())) / "image" / "usr" / libdir / "debug"),
+ value_for<n::image_dir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" +
+ stringify(id->name().package()) + "-" + stringify(id->version())) / "image"),
value_for<n::package_id>(id),
value_for<n::split>(split_choice && split_choice->enabled()),
value_for<n::strip>(strip_choice && strip_choice->enabled())
@@ -730,7 +730,7 @@ EbuildEntries::install(const std::tr1::shared_ptr<const ERepositoryID> & id,
value_for<n::config_protect>(_imp->e_repository->profile_variable("CONFIG_PROTECT")),
value_for<n::config_protect_mask>(_imp->e_repository->profile_variable("CONFIG_PROTECT_MASK")),
value_for<n::expand_vars>(expand_vars),
- value_for<n::loadsaveenv_dir>(_imp->params.builddir() / (stringify(id->name().category) + "-" + stringify(id->name().package) + "-" + stringify(id->version())) / "temp"),
+ value_for<n::loadsaveenv_dir>(_imp->params.builddir() / (stringify(id->name().category()) + "-" + stringify(id->name().package()) + "-" + stringify(id->version())) / "temp"),
value_for<n::profiles>(_imp->params.profiles()),
value_for<n::root>(o.destination()->installed_root_key() ? stringify(o.destination()->installed_root_key()->value()) : "/"),
value_for<n::slot>(SlotName(id->slot())),
@@ -922,7 +922,7 @@ EbuildEntries::is_package_file(const QualifiedPackageName & n, const FSEntry & e
{
Context context("When working out whether '" + stringify(e) + "' is a package file for '" + stringify(n) + "':");
- if (0 != e.basename().compare(0, stringify(n.package).length() + 1, stringify(n.package) + "-"))
+ if (0 != e.basename().compare(0, stringify(n.package()).length() + 1, stringify(n.package()) + "-"))
return false;
std::string::size_type p(e.basename().rfind('.'));
@@ -940,7 +940,7 @@ EbuildEntries::extract_package_file_version(const QualifiedPackageName & n, cons
std::string::size_type p(e.basename().rfind('.'));
if (std::string::npos == p)
throw InternalError(PALUDIS_HERE, "got npos");
- return VersionSpec(strip_leading_string(e.basename().substr(0, p), stringify(n.package) + "-"));
+ return VersionSpec(strip_leading_string(e.basename().substr(0, p), stringify(n.package()) + "-"));
}
bool
@@ -1094,7 +1094,7 @@ EbuildEntries::get_package_file_manifest_key(const FSEntry & e, const QualifiedP
std::string
EbuildEntries::binary_ebuild_name(const QualifiedPackageName & q, const VersionSpec & v, const std::string & e) const
{
- return stringify(q.package) + "-" + stringify(v) + "." + e;
+ return stringify(q.package()) + "-" + stringify(v) + "." + e;
}
std::string
diff --git a/paludis/repositories/e/ebuild_id.cc b/paludis/repositories/e/ebuild_id.cc
index 895eadf..694479f 100644
--- a/paludis/repositories/e/ebuild_id.cc
+++ b/paludis/repositories/e/ebuild_id.cc
@@ -174,14 +174,14 @@ EbuildID::need_keys_added() const
Context context("When generating metadata for ID '" + canonical_form(idcf_full) + "':");
FSEntry cache_file(_imp->repository->params().cache());
- cache_file /= stringify(name().category);
- cache_file /= stringify(name().package) + "-" + stringify(version());
+ cache_file /= stringify(name().category());
+ cache_file /= stringify(name().package()) + "-" + stringify(version());
FSEntry write_cache_file(_imp->repository->params().write_cache());
if (_imp->repository->params().append_repository_name_to_write_cache())
write_cache_file /= stringify(repository()->name());
- write_cache_file /= stringify(name().category);
- write_cache_file /= stringify(name().package) + "-" + stringify(version());
+ write_cache_file /= stringify(name().category());
+ write_cache_file /= stringify(name().package()) + "-" + stringify(version());
bool ok(false);
if (_imp->repository->params().cache().basename() != "empty")
diff --git a/paludis/repositories/e/exheres_layout.cc b/paludis/repositories/e/exheres_layout.cc
index db7ef3d..3b48bdb 100644
--- a/paludis/repositories/e/exheres_layout.cc
+++ b/paludis/repositories/e/exheres_layout.cc
@@ -238,7 +238,7 @@ ExheresLayout::need_package_ids(const QualifiedPackageName & n) const
std::tr1::shared_ptr<PackageIDSequence> v(new PackageIDSequence);
- FSEntry path(_imp->tree_root / "packages" / stringify(n.category) / stringify(n.package));
+ FSEntry path(_imp->tree_root / "packages" / stringify(n.category()) / stringify(n.package()));
for (DirIterator e(path), e_end ; e != e_end ; ++e)
{
@@ -293,7 +293,7 @@ ExheresLayout::has_package_named(const QualifiedPackageName & q) const
need_category_names();
- CategoryMap::iterator cat_iter(_imp->category_names.find(q.category));
+ CategoryMap::iterator cat_iter(_imp->category_names.find(q.category()));
if (_imp->category_names.end() == cat_iter)
return false;
@@ -311,8 +311,8 @@ ExheresLayout::has_package_named(const QualifiedPackageName & q) const
FSEntry fs(_imp->tree_root);
fs /= "packages";
- fs /= stringify(q.category);
- fs /= stringify(q.package);
+ fs /= stringify(q.category());
+ fs /= stringify(q.package());
if (! fs.is_directory_or_symlink_to_directory())
return false;
_imp->package_names.insert(std::make_pair(q, false));
@@ -393,7 +393,7 @@ ExheresLayout::package_names(const CategoryNamePart & c) const
for (PackagesMap::const_iterator p(_imp->package_names.begin()), p_end(_imp->package_names.end()) ;
p != p_end ; ++p)
- if (p->first.category == c)
+ if (p->first.category() == c)
result->insert(p->first);
return result;
@@ -430,7 +430,7 @@ ExheresLayout::info_variables_files() const
FSEntry
ExheresLayout::package_directory(const QualifiedPackageName & qpn) const
{
- return _imp->tree_root / "packages" / stringify(qpn.category) / stringify(qpn.package);
+ return _imp->tree_root / "packages" / stringify(qpn.category()) / stringify(qpn.package());
}
FSEntry
@@ -486,7 +486,7 @@ ExheresLayout::exlibsdirs(const QualifiedPackageName & q) const
std::tr1::shared_ptr<const FSEntrySequence> global(exlibsdirs_global());
std::copy(global->begin(), global->end(), result->back_inserter());
- std::tr1::shared_ptr<const FSEntrySequence> category(exlibsdirs_category(q.category));
+ std::tr1::shared_ptr<const FSEntrySequence> category(exlibsdirs_category(q.category()));
std::copy(category->begin(), category->end(), result->back_inserter());
std::tr1::shared_ptr<const FSEntrySequence> package(exlibsdirs_package(q));
@@ -595,7 +595,7 @@ namespace
if (! f->is_regular_file())
continue;
if (is_file_with_prefix_extension((*f),
- ("digest-"+stringify(qpn.package)), "",
+ ("digest-"+stringify(qpn.package())), "",
IsFileWithOptions()))
continue;
m->insert((*f), "AUX");
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index bee366b..15d045e 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -318,7 +318,7 @@ ExndbamRepository::merge(const MergeParams & m)
uid_dir = if_same_name_id->fs_location_key()->value().dirname();
else
{
- std::string uid(stringify(m.package_id()->name().category) + "---" + stringify(m.package_id()->name().package));
+ std::string uid(stringify(m.package_id()->name().category()) + "---" + stringify(m.package_id()->name().package()));
uid_dir /= "data";
uid_dir.mkdir();
uid_dir /= uid;
@@ -471,7 +471,7 @@ ExndbamRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositor
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
value_for<n::distdir>(ver_dir),
value_for<n::ebuild_dir>(ver_dir),
- value_for<n::ebuild_file>(ver_dir / (stringify(id->name().package) + "-" + stringify(id->version()) + ".ebuild")),
+ value_for<n::ebuild_file>(ver_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild")),
value_for<n::eclassdirs>(eclassdirs),
value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
diff --git a/paludis/repositories/e/fetch_visitor.cc b/paludis/repositories/e/fetch_visitor.cc
index 4ea8a5e..9426a7b 100644
--- a/paludis/repositories/e/fetch_visitor.cc
+++ b/paludis/repositories/e/fetch_visitor.cc
@@ -205,19 +205,19 @@ FetchVisitor::visit_leaf(const FetchableURIDepSpec & u)
std::tr1::shared_ptr<const FSEntrySequence> hook_dirs(_imp->env->hook_dirs());
cmd
- .with_setenv("P", stringify(_imp->id->name().package) + "-" +
+ .with_setenv("P", stringify(_imp->id->name().package()) + "-" +
stringify(_imp->id->version().remove_revision()))
- .with_setenv("PNV", stringify(_imp->id->name().package) + "-" +
+ .with_setenv("PNV", stringify(_imp->id->name().package()) + "-" +
stringify(_imp->id->version().remove_revision()))
.with_setenv("PV", stringify(_imp->id->version().remove_revision()))
.with_setenv("PR", stringify(_imp->id->version().revision_only()))
- .with_setenv("PN", stringify(_imp->id->name().package))
+ .with_setenv("PN", stringify(_imp->id->name().package()))
.with_setenv("PVR", stringify(_imp->id->version()))
- .with_setenv("PF", stringify(_imp->id->name().package) + "-" +
+ .with_setenv("PF", stringify(_imp->id->name().package()) + "-" +
stringify(_imp->id->version()))
- .with_setenv("PNVR", stringify(_imp->id->name().package) + "-" +
+ .with_setenv("PNVR", stringify(_imp->id->name().package()) + "-" +
stringify(_imp->id->version()))
- .with_setenv("CATEGORY", stringify(_imp->id->name().category))
+ .with_setenv("CATEGORY", stringify(_imp->id->name().category()))
.with_setenv("REPOSITORY", stringify(_imp->id->repository()->name()))
.with_setenv("EAPI", stringify(_imp->eapi.name()))
.with_setenv("SLOT", "")
diff --git a/paludis/repositories/e/traditional_layout.cc b/paludis/repositories/e/traditional_layout.cc
index 553dd3d..43aeb35 100644
--- a/paludis/repositories/e/traditional_layout.cc
+++ b/paludis/repositories/e/traditional_layout.cc
@@ -249,7 +249,7 @@ TraditionalLayout::need_package_ids(const QualifiedPackageName & n) const
std::tr1::shared_ptr<PackageIDSequence> v(new PackageIDSequence);
- FSEntry path(_imp->tree_root / stringify(n.category) / stringify(n.package));
+ FSEntry path(_imp->tree_root / stringify(n.category()) / stringify(n.package()));
for (DirIterator e(path, DirIteratorOptions() + dio_inode_sort), e_end ; e != e_end ; ++e)
{
@@ -304,7 +304,7 @@ TraditionalLayout::has_package_named(const QualifiedPackageName & q) const
need_category_names();
- CategoryMap::iterator cat_iter(_imp->category_names.find(q.category));
+ CategoryMap::iterator cat_iter(_imp->category_names.find(q.category()));
if (_imp->category_names.end() == cat_iter)
return false;
@@ -321,8 +321,8 @@ TraditionalLayout::has_package_named(const QualifiedPackageName & q) const
return true;
FSEntry fs(_imp->tree_root);
- fs /= stringify(q.category);
- fs /= stringify(q.package);
+ fs /= stringify(q.category());
+ fs /= stringify(q.package());
if (! fs.is_directory_or_symlink_to_directory())
return false;
_imp->package_names.insert(std::make_pair(q, false));
@@ -403,7 +403,7 @@ TraditionalLayout::package_names(const CategoryNamePart & c) const
for (PackagesMap::const_iterator p(_imp->package_names.begin()), p_end(_imp->package_names.end()) ;
p != p_end ; ++p)
- if (p->first.category == c)
+ if (p->first.category() == c)
result->insert(p->first);
return result;
@@ -440,7 +440,7 @@ TraditionalLayout::info_variables_files() const
FSEntry
TraditionalLayout::package_directory(const QualifiedPackageName & qpn) const
{
- return _imp->tree_root / stringify(qpn.category) / stringify(qpn.package);
+ return _imp->tree_root / stringify(qpn.category()) / stringify(qpn.package());
}
FSEntry
@@ -496,7 +496,7 @@ TraditionalLayout::exlibsdirs(const QualifiedPackageName & q) const
std::tr1::shared_ptr<const FSEntrySequence> global(exlibsdirs_global());
std::copy(global->begin(), global->end(), result->back_inserter());
- std::tr1::shared_ptr<const FSEntrySequence> category(exlibsdirs_category(q.category));
+ std::tr1::shared_ptr<const FSEntrySequence> category(exlibsdirs_category(q.category()));
std::copy(category->begin(), category->end(), result->back_inserter());
std::tr1::shared_ptr<const FSEntrySequence> package(exlibsdirs_package(q));
@@ -605,7 +605,7 @@ namespace
if (! f->is_regular_file())
continue;
if (is_file_with_prefix_extension((*f),
- ("digest-"+stringify(qpn.package)), "",
+ ("digest-"+stringify(qpn.package())), "",
IsFileWithOptions()))
continue;
m->insert((*f), "AUX");
diff --git a/paludis/repositories/e/vdb_merger.cc b/paludis/repositories/e/vdb_merger.cc
index 0287c94..bf0c17f 100644
--- a/paludis/repositories/e/vdb_merger.cc
+++ b/paludis/repositories/e/vdb_merger.cc
@@ -101,8 +101,8 @@ VDBMerger::extend_hook(const Hook & h)
if (_imp->params.package_id())
{
- std::string cat(stringify(_imp->params.package_id()->name().category));
- std::string pn(stringify(_imp->params.package_id()->name().package));
+ std::string cat(stringify(_imp->params.package_id()->name().category()));
+ std::string pn(stringify(_imp->params.package_id()->name().package()));
std::string pvr(stringify(_imp->params.package_id()->version()));
std::string pv(stringify(_imp->params.package_id()->version().remove_revision()));
std::string slot(stringify(_imp->params.package_id()->slot()));
diff --git a/paludis/repositories/e/vdb_repository.cc b/paludis/repositories/e/vdb_repository.cc
index 24b397e..d85bd5f 100644
--- a/paludis/repositories/e/vdb_repository.cc
+++ b/paludis/repositories/e/vdb_repository.cc
@@ -213,11 +213,11 @@ VDBRepository::has_package_named(const QualifiedPackageName & q) const
need_category_names();
- CategoryMap::iterator cat_iter(_imp->categories.find(q.category));
+ CategoryMap::iterator cat_iter(_imp->categories.find(q.category()));
if (_imp->categories.end() == cat_iter)
return false;
- need_package_ids(q.category);
+ need_package_ids(q.category());
return cat_iter->second->end() != cat_iter->second->find(q);
}
@@ -268,10 +268,10 @@ VDBRepository::package_ids(const QualifiedPackageName & n) const
need_category_names();
- if (! has_category_named(n.category))
+ if (! has_category_named(n.category()))
return make_shared_ptr(new PackageIDSequence);
- need_package_ids(n.category);
+ need_package_ids(n.category());
if (! has_package_named(n))
return make_shared_ptr(new PackageIDSequence);
@@ -386,11 +386,11 @@ VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID>
std::string reinstalling_str(reinstalling ? "-reinstalling-" : "");
std::tr1::shared_ptr<FSEntrySequence> eclassdirs(new FSEntrySequence);
- eclassdirs->push_back(FSEntry(_imp->params.location() / stringify(id->name().category) /
- (reinstalling_str + stringify(id->name().package) + "-" + stringify(id->version()))));
+ eclassdirs->push_back(FSEntry(_imp->params.location() / stringify(id->name().category()) /
+ (reinstalling_str + stringify(id->name().package()) + "-" + stringify(id->version()))));
- FSEntry pkg_dir(_imp->params.location() / stringify(id->name().category) / (reinstalling_str +
- stringify(id->name().package) + "-" + stringify(id->version())));
+ FSEntry pkg_dir(_imp->params.location() / stringify(id->name().category()) / (reinstalling_str +
+ stringify(id->name().package()) + "-" + stringify(id->version())));
std::tr1::shared_ptr<FSEntry> load_env(new FSEntry(pkg_dir / "environment.bz2"));
@@ -441,7 +441,7 @@ VDBRepository::perform_uninstall(const std::tr1::shared_ptr<const ERepositoryID>
value_for<n::commands>(join(phase->begin_commands(), phase->end_commands(), " ")),
value_for<n::distdir>(pkg_dir),
value_for<n::ebuild_dir>(pkg_dir),
- value_for<n::ebuild_file>(pkg_dir / (stringify(id->name().package) + "-" + stringify(id->version()) + ".ebuild")),
+ value_for<n::ebuild_file>(pkg_dir / (stringify(id->name().package()) + "-" + stringify(id->version()) + ".ebuild")),
value_for<n::eclassdirs>(eclassdirs),
value_for<n::environment>(_imp->params.environment()),
value_for<n::exlibsdirs>(make_shared_ptr(new FSEntrySequence)),
@@ -650,7 +650,7 @@ VDBRepository::provides_from_package_id(const PackageID & id) const
{
QualifiedPackageName pp((*p)->text());
- if (pp.category != CategoryNamePart("virtual"))
+ if (pp.category() != CategoryNamePart("virtual"))
Log::get_instance()->message("e.vdb.provide.non_virtual", ll_warning, lc_no_context)
<< "PROVIDE of non-virtual '" << pp << "' from '" << id << "' will not work as expected";
@@ -794,10 +794,10 @@ VDBRepository::merge(const MergeParams & m)
FSEntry tmp_vdb_dir(_imp->params.location());
if (! tmp_vdb_dir.exists())
tmp_vdb_dir.mkdir();
- tmp_vdb_dir /= stringify(m.package_id()->name().category);
+ tmp_vdb_dir /= stringify(m.package_id()->name().category());
if (! tmp_vdb_dir.exists())
tmp_vdb_dir.mkdir();
- tmp_vdb_dir /= ("-checking-" + stringify(m.package_id()->name().package) + "-" + stringify(m.package_id()->version()));
+ tmp_vdb_dir /= ("-checking-" + stringify(m.package_id()->name().package()) + "-" + stringify(m.package_id()->version()));
tmp_vdb_dir.mkdir();
WriteVDBEntryCommand write_vdb_entry_command(
@@ -821,8 +821,8 @@ VDBRepository::merge(const MergeParams & m)
}
FSEntry vdb_dir(_imp->params.location());
- vdb_dir /= stringify(m.package_id()->name().category);
- vdb_dir /= (stringify(m.package_id()->name().package) + "-" + stringify(m.package_id()->version()));
+ vdb_dir /= stringify(m.package_id()->name().category());
+ vdb_dir /= (stringify(m.package_id()->name().package()) + "-" + stringify(m.package_id()->version()));
VDBMerger merger(
make_named_values<VDBMergerParams>(
@@ -849,8 +849,8 @@ VDBRepository::merge(const MergeParams & m)
if (is_replace)
{
FSEntry old_vdb_dir(_imp->params.location());
- old_vdb_dir /= stringify(is_replace->name().category);
- old_vdb_dir /= (stringify(is_replace->name().package) + "-" + stringify(is_replace->version()));
+ old_vdb_dir /= stringify(is_replace->name().category());
+ old_vdb_dir /= (stringify(is_replace->name().package()) + "-" + stringify(is_replace->version()));
if ((old_vdb_dir.dirname() / ("-reinstalling-" + old_vdb_dir.basename())).exists())
throw InstallActionError("Directory '" + stringify(old_vdb_dir.dirname() /
@@ -988,7 +988,7 @@ VDBRepository::package_id_if_exists(const QualifiedPackageName & q, const Versio
if (! has_package_named(q))
return std::tr1::shared_ptr<const ERepositoryID>();
- need_package_ids(q.category);
+ need_package_ids(q.category());
using namespace std::tr1::placeholders;
diff --git a/paludis/repositories/e/vdb_unmerger.cc b/paludis/repositories/e/vdb_unmerger.cc
index 21d3fe5..cfb7dcd 100644
--- a/paludis/repositories/e/vdb_unmerger.cc
+++ b/paludis/repositories/e/vdb_unmerger.cc
@@ -142,8 +142,8 @@ VDBUnmerger::extend_hook(const Hook & h) const
if (_imp->options.package_id())
{
- std::string cat(stringify(_imp->options.package_id()->name().category));
- std::string pn(stringify(_imp->options.package_id()->name().package));
+ std::string cat(stringify(_imp->options.package_id()->name().category()));
+ std::string pn(stringify(_imp->options.package_id()->name().package()));
std::string pvr(stringify(_imp->options.package_id()->version()));
std::string pv(stringify(_imp->options.package_id()->version().remove_revision()));
diff --git a/paludis/repositories/fake/fake_repository_base.cc b/paludis/repositories/fake/fake_repository_base.cc
index 126ed7f..c438e3a 100644
--- a/paludis/repositories/fake/fake_repository_base.cc
+++ b/paludis/repositories/fake/fake_repository_base.cc
@@ -82,9 +82,9 @@ FakeRepositoryBase::has_category_named(const CategoryNamePart & c) const
bool
FakeRepositoryBase::has_package_named(const QualifiedPackageName & q) const
{
- return has_category_named(q.category) &&
- (_imp->package_names.find(q.category)->second->end() !=
- _imp->package_names.find(q.category)->second->find(q.package));
+ return has_category_named(q.category()) &&
+ (_imp->package_names.find(q.category())->second->end() !=
+ _imp->package_names.find(q.category())->second->find(q.package()));
}
std::tr1::shared_ptr<const CategoryNamePartSet>
@@ -110,7 +110,7 @@ FakeRepositoryBase::package_names(const CategoryNamePart & c) const
std::tr1::shared_ptr<const PackageIDSequence>
FakeRepositoryBase::package_ids(const QualifiedPackageName & n) const
{
- if (! has_category_named(n.category))
+ if (! has_category_named(n.category()))
return std::tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
if (! has_package_named(n))
return std::tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
@@ -127,8 +127,8 @@ FakeRepositoryBase::add_category(const CategoryNamePart & c)
void
FakeRepositoryBase::add_package(const QualifiedPackageName & q)
{
- add_category(q.category);
- _imp->package_names.find(q.category)->second->insert(q.package);
+ add_category(q.category());
+ _imp->package_names.find(q.category())->second->insert(q.package());
_imp->ids.insert(std::make_pair(q, new PackageIDSequence));
}
diff --git a/paludis/repositories/gems/gems_repository.cc b/paludis/repositories/gems/gems_repository.cc
index cfa8dca..843cce2 100644
--- a/paludis/repositories/gems/gems_repository.cc
+++ b/paludis/repositories/gems/gems_repository.cc
@@ -163,11 +163,11 @@ GemsRepository::has_package_named(const QualifiedPackageName & q) const
{
Lock l(*_imp->big_nasty_mutex);
- if (! has_category_named(q.category))
+ if (! has_category_named(q.category()))
return false;
need_ids();
- return _imp->package_names.find(q.category)->second->end() != _imp->package_names.find(q.category)->second->find(q);
+ return _imp->package_names.find(q.category())->second->end() != _imp->package_names.find(q.category())->second->find(q);
}
std::tr1::shared_ptr<const CategoryNamePartSet>
@@ -276,7 +276,7 @@ GemsRepository::do_install(const std::tr1::shared_ptr<const PackageID> & id, con
return;
Command cmd(getenv_with_default("PALUDIS_GEMS_DIR", LIBEXECDIR "/paludis") +
- "/gems/gems.bash install '" + stringify(id->name().package) + "' '" + stringify(id->version()) + "'");
+ "/gems/gems.bash install '" + stringify(id->name().package()) + "' '" + stringify(id->version()) + "'");
cmd.with_stderr_prefix(stringify(*id) + "> ");
cmd.with_setenv("GEMCACHE", stringify(_imp->params.location / "yaml"));
diff --git a/paludis/repositories/gems/installed_gems_repository.cc b/paludis/repositories/gems/installed_gems_repository.cc
index fdd577b..6d2b171 100644
--- a/paludis/repositories/gems/installed_gems_repository.cc
+++ b/paludis/repositories/gems/installed_gems_repository.cc
@@ -152,11 +152,11 @@ InstalledGemsRepository::has_package_named(const QualifiedPackageName & q) const
{
Lock l(*_imp->big_nasty_mutex);
- if (! has_category_named(q.category))
+ if (! has_category_named(q.category()))
return false;
need_ids();
- return _imp->package_names.find(q.category)->second->end() != _imp->package_names.find(q.category)->second->find(q);
+ return _imp->package_names.find(q.category())->second->end() != _imp->package_names.find(q.category())->second->find(q);
}
std::tr1::shared_ptr<const CategoryNamePartSet>
@@ -292,7 +292,7 @@ InstalledGemsRepository::do_uninstall(const std::tr1::shared_ptr<const PackageID
const UninstallOptions &) const
{
Command cmd(getenv_with_default("PALUDIS_GEMS_DIR", LIBEXECDIR "/paludis") +
- "/gems/gems.bash uninstall '" + stringify(id->name().package) + "' '" + stringify(id->version()) + "'");
+ "/gems/gems.bash uninstall '" + stringify(id->name().package()) + "' '" + stringify(id->version()) + "'");
cmd.with_stderr_prefix(stringify(*id) + "> ");
cmd.with_setenv("GEM_HOME", stringify(_imp->params.install_dir));
diff --git a/paludis/repositories/unavailable/unavailable_repository_store.cc b/paludis/repositories/unavailable/unavailable_repository_store.cc
index c5ee262..35cc41d 100644
--- a/paludis/repositories/unavailable/unavailable_repository_store.cc
+++ b/paludis/repositories/unavailable/unavailable_repository_store.cc
@@ -141,12 +141,12 @@ UnavailableRepositoryStore::_populate_one(const Environment * const env, const F
for (UnavailableRepositoryFile::ConstIterator i(file.begin()), i_end(file.end()) ;
i != i_end ; ++i)
{
- if (old_name.category != (*i).name().category)
+ if (old_name.category() != (*i).name().category())
{
- _imp->categories->insert((*i).name().category);
- PackageNames::iterator p(_imp->package_names.find((*i).name().category));
+ _imp->categories->insert((*i).name().category());
+ PackageNames::iterator p(_imp->package_names.find((*i).name().category()));
if (_imp->package_names.end() == p)
- p = _imp->package_names.insert(std::make_pair((*i).name().category,
+ p = _imp->package_names.insert(std::make_pair((*i).name().category(),
make_shared_ptr(new QualifiedPackageNameSet))).first;
pkgs = p->second;
}
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index c0b32da..94ae92b 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -301,7 +301,7 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
uid_dir = if_same_name_id->fs_location_key()->value().dirname();
else
{
- std::string uid(stringify(m.package_id()->name().category) + "---" + stringify(m.package_id()->name().package));
+ std::string uid(stringify(m.package_id()->name().category()) + "---" + stringify(m.package_id()->name().package()));
uid_dir /= "data";
uid_dir.mkdir();
uid_dir /= uid;
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index 92c4086..fbeefd0 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -85,7 +85,7 @@ namespace paludis
{
ids->push_back(id);
package_names->insert(id->name());
- category_names->insert(id->name().category);
+ category_names->insert(id->name().category());
}
};
}
@@ -140,7 +140,7 @@ UnpackagedRepository::package_ids(const QualifiedPackageName & n) const
std::tr1::shared_ptr<const QualifiedPackageNameSet>
UnpackagedRepository::package_names(const CategoryNamePart & c) const
{
- return c == _imp->id->name().category ? _imp->package_names : make_shared_ptr(new QualifiedPackageNameSet);
+ return c == _imp->id->name().category() ? _imp->package_names : make_shared_ptr(new QualifiedPackageNameSet);
}
std::tr1::shared_ptr<const CategoryNamePartSet>
@@ -152,7 +152,7 @@ UnpackagedRepository::category_names() const
std::tr1::shared_ptr<const CategoryNamePartSet>
UnpackagedRepository::category_names_containing_package(const PackageNamePart & p) const
{
- return p == _imp->id->name().package ? _imp->category_names : make_shared_ptr(new CategoryNamePartSet);
+ return p == _imp->id->name().package() ? _imp->category_names : make_shared_ptr(new CategoryNamePartSet);
}
bool
@@ -164,7 +164,7 @@ UnpackagedRepository::has_package_named(const QualifiedPackageName & q) const
bool
UnpackagedRepository::has_category_named(const CategoryNamePart & c) const
{
- return c == _imp->id->name().category;
+ return c == _imp->id->name().category();
}
bool
diff --git a/paludis/repositories/unwritten/unwritten_repository_store.cc b/paludis/repositories/unwritten/unwritten_repository_store.cc
index 4d98e72..cf5fc36 100644
--- a/paludis/repositories/unwritten/unwritten_repository_store.cc
+++ b/paludis/repositories/unwritten/unwritten_repository_store.cc
@@ -112,12 +112,12 @@ UnwrittenRepositoryStore::_populate_one(const Environment * const, const FSEntry
for (UnwrittenRepositoryFile::ConstIterator i(file.begin()), i_end(file.end()) ;
i != i_end ; ++i)
{
- if (old_name.category != (*i).name().category)
+ if (old_name.category() != (*i).name().category())
{
- _imp->categories->insert((*i).name().category);
- PackageNames::iterator p(_imp->package_names.find((*i).name().category));
+ _imp->categories->insert((*i).name().category());
+ PackageNames::iterator p(_imp->package_names.find((*i).name().category()));
if (_imp->package_names.end() == p)
- p = _imp->package_names.insert(std::make_pair((*i).name().category,
+ p = _imp->package_names.insert(std::make_pair((*i).name().category(),
make_shared_ptr(new QualifiedPackageNameSet))).first;
pkgs = p->second;
}
diff --git a/paludis/repositories/virtuals/installed_virtuals_repository.cc b/paludis/repositories/virtuals/installed_virtuals_repository.cc
index 304e2d6..f20ff5c 100644
--- a/paludis/repositories/virtuals/installed_virtuals_repository.cc
+++ b/paludis/repositories/virtuals/installed_virtuals_repository.cc
@@ -173,7 +173,7 @@ InstalledVirtualsRepository::need_ids() const
std::tr1::shared_ptr<const PackageIDSequence>
InstalledVirtualsRepository::package_ids(const QualifiedPackageName & q) const
{
- if (q.category.data() != "virtual")
+ if (q.category().data() != "virtual")
return std::tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
need_ids();
@@ -211,7 +211,7 @@ InstalledVirtualsRepository::category_names() const
bool
InstalledVirtualsRepository::has_package_named(const QualifiedPackageName & q) const
{
- if (q.category.data() != "virtual")
+ if (q.category().data() != "virtual")
return false;
need_ids();
diff --git a/paludis/repositories/virtuals/virtuals_repository.cc b/paludis/repositories/virtuals/virtuals_repository.cc
index 8a6eeb0..797dc71 100644
--- a/paludis/repositories/virtuals/virtuals_repository.cc
+++ b/paludis/repositories/virtuals/virtuals_repository.cc
@@ -242,7 +242,7 @@ VirtualsRepository::need_ids() const
i = my_ids.insert(std::make_pair(v->first, make_shared_ptr(new PackageIDSequence))).first;
std::tr1::shared_ptr<const PackageID> id(make_virtual_package_id(QualifiedPackageName(v->first), *m));
- if (stringify(id->name().category) != "virtual")
+ if (stringify(id->name().category()) != "virtual")
throw InternalError(PALUDIS_HERE, "Got bad id '" + stringify(*id) + "'");
i->second->push_back(id);
}
@@ -255,7 +255,7 @@ VirtualsRepository::need_ids() const
std::tr1::shared_ptr<const PackageIDSequence>
VirtualsRepository::package_ids(const QualifiedPackageName & q) const
{
- if (q.category.data() != "virtual")
+ if (q.category().data() != "virtual")
return std::tr1::shared_ptr<PackageIDSequence>(new PackageIDSequence);
need_ids();
@@ -293,7 +293,7 @@ VirtualsRepository::category_names() const
bool
VirtualsRepository::has_package_named(const QualifiedPackageName & q) const
{
- if (q.category.data() != "virtual")
+ if (q.category().data() != "virtual")
return false;
need_names();
@@ -336,7 +336,7 @@ const std::tr1::shared_ptr<const PackageID>
VirtualsRepository::make_virtual_package_id(
const QualifiedPackageName & virtual_name, const std::tr1::shared_ptr<const PackageID> & provider) const
{
- if (virtual_name.category.data() != "virtual")
+ if (virtual_name.category().data() != "virtual")
throw InternalError(PALUDIS_HERE, "tried to make a virtual package id using '" + stringify(virtual_name) + "', '"
+ stringify(*provider) + "'");
diff --git a/paludis/repository_name_cache.cc b/paludis/repository_name_cache.cc
index 6691292..58a3b32 100644
--- a/paludis/repository_name_cache.cc
+++ b/paludis/repository_name_cache.cc
@@ -236,7 +236,7 @@ RepositoryNameCache::regenerate_cache() const
std::tr1::shared_ptr<const QualifiedPackageNameSet> pkgs(_imp->repo->package_names(*c));
for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()), p_end(pkgs->end()) ;
p != p_end ; ++p)
- m[stringify(p->package)].append(stringify(*c) + "\n");
+ m[stringify(p->package())].append(stringify(*c) + "\n");
}
for (std::tr1::unordered_map<std::string, std::string, Hash<std::string> >::const_iterator e(m.begin()), e_end(m.end()) ;
@@ -274,12 +274,12 @@ RepositoryNameCache::add(const QualifiedPackageName & q)
Context context("When adding '" + stringify(q) + "' to name cache at '" + stringify(_imp->location) + "':");
std::tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
- NameCacheMap::iterator r(_imp->find(q.package));
+ NameCacheMap::iterator r(_imp->find(q.package()));
if (_imp->name_cache_map.end() == r)
return;
- r->second.insert(q.category);
- _imp->update(q.package, r);
+ r->second.insert(q.category());
+ _imp->update(q.package(), r);
}
void
@@ -293,12 +293,12 @@ RepositoryNameCache::remove(const QualifiedPackageName & q)
Context context("When removing '" + stringify(q) + "' from name cache at '" + stringify(_imp->location) + "':");
std::tr1::shared_ptr<CategoryNamePartSet> result(new CategoryNamePartSet);
- NameCacheMap::iterator r(_imp->find(q.package));
+ NameCacheMap::iterator r(_imp->find(q.package()));
if (_imp->name_cache_map.end() == r)
return;
- r->second.erase(q.category);
- _imp->update(q.package, r);
+ r->second.erase(q.category());
+ _imp->update(q.package(), r);
}
bool
diff --git a/python/name.cc b/python/name.cc
index 577b021..1f94fbb 100644
--- a/python/name.cc
+++ b/python/name.cc
@@ -191,9 +191,17 @@ void expose_name()
)
.def(bp::init<const CategoryNamePart &, const PackageNamePart &>())
- .def_readwrite("category", &QualifiedPackageName::category)
-
- .def_readwrite("package", &QualifiedPackageName::package)
+ .add_property("category",
+ &named_values_getter<QualifiedPackageName, n::category, CategoryNamePart, &QualifiedPackageName::category>,
+ &named_values_setter<QualifiedPackageName, n::category, CategoryNamePart, &QualifiedPackageName::category>,
+ "[rw] CategoryNamePart"
+ )
+
+ .add_property("package",
+ &named_values_getter<QualifiedPackageName, n::package, PackageNamePart, &QualifiedPackageName::package>,
+ &named_values_setter<QualifiedPackageName, n::package, PackageNamePart, &QualifiedPackageName::package>,
+ "[rw] PackageNamePart"
+ )
.def("__cmp__", &py_cmp<QualifiedPackageName>)
diff --git a/ruby/qualified_package_name.cc b/ruby/qualified_package_name.cc
index 92cf4f8..74f919d 100644
--- a/ruby/qualified_package_name.cc
+++ b/ruby/qualified_package_name.cc
@@ -1,7 +1,7 @@
/* vim: set sw=4 sts=4 et foldmethod=syntax : */
/*
- * Copyright (c) 2006, 2007 Ciaran McCreesh
+ * Copyright (c) 2006, 2007, 2008 Ciaran McCreesh
* Copyright (c) 2008 Richard Brown
*
* This file is part of the Paludis package manager. Paludis is free software;
@@ -103,7 +103,7 @@ namespace
*
* Set the package name.
*/
- template <typename T_, T_ QualifiedPackageName::* m_>
+ template <typename T_, typename M_, NamedValue<M_, T_> QualifiedPackageName::* m_>
struct QPNMember
{
static VALUE
@@ -111,7 +111,7 @@ namespace
{
QualifiedPackageName * p;
Data_Get_Struct(self, QualifiedPackageName, p);
- return rb_str_new2(stringify(p->*m_).c_str());
+ return rb_str_new2(stringify((p->*m_)()).c_str());
}
static VALUE
@@ -121,7 +121,7 @@ namespace
{
QualifiedPackageName * p;
Data_Get_Struct(self, QualifiedPackageName, p);
- p->*m_ = T_ ((StringValuePtr(str)));
+ (p->*m_)() = T_ ((StringValuePtr(str)));
return self;
}
catch (const std::exception & e)
@@ -168,13 +168,13 @@ namespace
rb_define_method(c_qualified_package_name, "hash", RUBY_FUNC_CAST(&Common<QualifiedPackageName>::hash), 0);
rb_define_method(c_qualified_package_name, "eql?", RUBY_FUNC_CAST(&Common<QualifiedPackageName>::equal), 1);
rb_define_method(c_qualified_package_name, "category",
- RUBY_FUNC_CAST((&QPNMember<CategoryNamePart, &QualifiedPackageName::category>::fetch)), 0);
+ RUBY_FUNC_CAST((&QPNMember<CategoryNamePart, n::category, &QualifiedPackageName::category>::fetch)), 0);
rb_define_method(c_qualified_package_name, "category=",
- RUBY_FUNC_CAST((&QPNMember<CategoryNamePart, &QualifiedPackageName::category>::set)), 1);
+ RUBY_FUNC_CAST((&QPNMember<CategoryNamePart, n::category, &QualifiedPackageName::category>::set)), 1);
rb_define_method(c_qualified_package_name, "package",
- RUBY_FUNC_CAST((&QPNMember<PackageNamePart, &QualifiedPackageName::package>::fetch)), 0);
+ RUBY_FUNC_CAST((&QPNMember<PackageNamePart, n::package, &QualifiedPackageName::package>::fetch)), 0);
rb_define_method(c_qualified_package_name, "package=",
- RUBY_FUNC_CAST((&QPNMember<PackageNamePart, &QualifiedPackageName::package>::set)), 1);
+ RUBY_FUNC_CAST((&QPNMember<PackageNamePart, n::package, &QualifiedPackageName::package>::set)), 1);
}
}
diff --git a/src/clients/adjutrix/find_dropped_keywords.cc b/src/clients/adjutrix/find_dropped_keywords.cc
index 7286b87..e8287ee 100644
--- a/src/clients/adjutrix/find_dropped_keywords.cc
+++ b/src/clients/adjutrix/find_dropped_keywords.cc
@@ -88,13 +88,13 @@ namespace
const VersionSpec & best_keyworded, const VersionSpec & best_anywhere)
{
static CategoryNamePart previous_category("not-on-a-boat");
- if (package.category != previous_category)
+ if (package.category() != previous_category)
{
- cout << std::setw(col_width_package) << (stringify(package.category) + "/") << endl;
- previous_category = package.category;
+ cout << std::setw(col_width_package) << (stringify(package.category()) + "/") << endl;
+ previous_category = package.category();
}
- std::string p(stringify(package.package));
+ std::string p(stringify(package.package()));
if (SlotName("0") != slot)
p += ":" + stringify(slot);
cout << " " << std::setw(col_width_package - 2) << p;
@@ -202,7 +202,7 @@ void do_find_dropped_keywords(const NoConfigEnvironment & env)
if (CommandLine::get_instance()->a_package.end_args() == std::find(
CommandLine::get_instance()->a_package.begin_args(),
CommandLine::get_instance()->a_package.end_args(),
- stringify(p->package)))
+ stringify(p->package())))
continue;
check_one_package(env, keyword, *r, *p);
diff --git a/src/clients/adjutrix/find_reverse_deps.cc b/src/clients/adjutrix/find_reverse_deps.cc
index 5bd81c5..1523b7e 100644
--- a/src/clients/adjutrix/find_reverse_deps.cc
+++ b/src/clients/adjutrix/find_reverse_deps.cc
@@ -352,7 +352,7 @@ int do_find_reverse_deps(NoConfigEnvironment & env)
if (CommandLine::get_instance()->a_package.end_args() == std::find(
CommandLine::get_instance()->a_package.begin_args(),
CommandLine::get_instance()->a_package.end_args(),
- stringify(p->package)))
+ stringify(p->package())))
continue;
ret |= check_one_package(env, *entries, *p);
diff --git a/src/clients/adjutrix/find_stable_candidates.cc b/src/clients/adjutrix/find_stable_candidates.cc
index f1f68e5..06a9f68 100644
--- a/src/clients/adjutrix/find_stable_candidates.cc
+++ b/src/clients/adjutrix/find_stable_candidates.cc
@@ -88,13 +88,13 @@ namespace
const VersionSpec & our_version, const VersionSpec & best_version)
{
static CategoryNamePart previous_category("not-on-a-boat");
- if (package.category != previous_category)
+ if (package.category() != previous_category)
{
- cout << std::setw(col_width_package) << (stringify(package.category) + "/") << endl;
- previous_category = package.category;
+ cout << std::setw(col_width_package) << (stringify(package.category()) + "/") << endl;
+ previous_category = package.category();
}
- std::string p(stringify(package.package));
+ std::string p(stringify(package.package()));
if (SlotName("0") != slot)
p += ":" + stringify(slot);
cout << " " << std::setw(col_width_package - 2) << p;
@@ -205,7 +205,7 @@ void do_find_stable_candidates(const NoConfigEnvironment & env)
if (CommandLine::get_instance()->a_package.end_args() == std::find(
CommandLine::get_instance()->a_package.begin_args(),
CommandLine::get_instance()->a_package.end_args(),
- stringify(p->package)))
+ stringify(p->package())))
continue;
check_one_package(env, keyword, *r, *p);
diff --git a/src/clients/adjutrix/keywords_graph.cc b/src/clients/adjutrix/keywords_graph.cc
index 3879ed3..f28ddfa 100644
--- a/src/clients/adjutrix/keywords_graph.cc
+++ b/src/clients/adjutrix/keywords_graph.cc
@@ -233,7 +233,7 @@ void do_keywords_graph(const NoConfigEnvironment & env)
if (CommandLine::get_instance()->a_package.end_args() == std::find(
CommandLine::get_instance()->a_package.begin_args(),
CommandLine::get_instance()->a_package.end_args(),
- stringify(p->package)))
+ stringify(p->package())))
continue;
write_keywords_graph(env, *r, *p);
diff --git a/src/clients/instruo/instruo.cc b/src/clients/instruo/instruo.cc
index 4bb6615..8ec79eb 100644
--- a/src/clients/instruo/instruo.cc
+++ b/src/clients/instruo/instruo.cc
@@ -250,10 +250,10 @@ main(int argc, char *argv[])
{
Context i_context("When fetching ID '" + stringify(**i) + "':");
- if ((*i)->name().category != old_cat)
+ if ((*i)->name().category() != old_cat)
{
- cout << "Processing " << colour(cl_package_name, stringify((*i)->name().category)) << "..." << endl;
- old_cat = (*i)->name().category;
+ cout << "Processing " << colour(cl_package_name, stringify((*i)->name().category())) << "..." << endl;
+ old_cat = (*i)->name().category();
}
++total;
diff --git a/src/clients/paludis/list.cc b/src/clients/paludis/list.cc
index d57edd5..b9eec82 100644
--- a/src/clients/paludis/list.cc
+++ b/src/clients/paludis/list.cc
@@ -174,7 +174,7 @@ do_list_packages(const std::tr1::shared_ptr<Environment> & env)
if (CommandLine::get_instance()->a_package.end_args() == std::find(
CommandLine::get_instance()->a_package.begin_args(),
CommandLine::get_instance()->a_package.end_args(),
- stringify(p->first.package)))
+ stringify(p->first.package())))
continue;
ret_code = 0;