aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-04-16 17:30:50 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2008-04-16 17:30:50 +0000
commit71f51bec18597201fd242a8d6d1901376f13091c (patch)
tree3d01d2a56414794aa839c870be1acee12addc705
parentb927d07db9dcd86f7aadca7990ac410493167956 (diff)
downloadpaludis-71f51bec18597201fd242a8d6d1901376f13091c.tar.gz
paludis-71f51bec18597201fd242a8d6d1901376f13091c.tar.xz
Fix 3.4 compile
-rw-r--r--paludis/files.m42
-rw-r--r--paludis/ndbam.cc4
-rw-r--r--paludis/ndbam_merger.cc48
-rw-r--r--paludis/ndbam_merger.hh14
-rw-r--r--paludis/ndbam_merger.sr20
-rw-r--r--paludis/repositories/e/exndbam_repository.cc20
-rw-r--r--paludis/repositories/unpackaged/Makefile.am12
-rw-r--r--paludis/repositories/unpackaged/installed_repository.cc20
-rw-r--r--paludis/repositories/unpackaged/installed_repository_TEST.cc60
-rw-r--r--paludis/repositories/unpackaged/registration.cc20
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.cc20
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.hh14
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository.sr20
-rw-r--r--paludis/repositories/unpackaged/unpackaged_repository_TEST.cc120
-rw-r--r--paludis/util/keys.hh5
15 files changed, 186 insertions, 213 deletions
diff --git a/paludis/files.m4 b/paludis/files.m4
index 2ff1307..2168429 100644
--- a/paludis/files.m4
+++ b/paludis/files.m4
@@ -42,7 +42,7 @@ add(`metadata_key', `hh', `cc', `se', `fwd')
add(`metadata_key_holder', `hh', `cc', `fwd')
add(`name', `hh', `cc', `fwd', `test', `sr', `se')
add(`ndbam', `hh', `cc', `fwd', `sr')
-add(`ndbam_merger', `hh', `cc', `sr')
+add(`ndbam_merger', `hh', `cc')
add(`ndbam_unmerger', `hh', `cc', `sr')
add(`override_functions', `hh', `cc')
add(`package_database', `hh', `cc', `fwd', `test', `se')
diff --git a/paludis/ndbam.cc b/paludis/ndbam.cc
index bdd8a1e..ccde96d 100644
--- a/paludis/ndbam.cc
+++ b/paludis/ndbam.cc
@@ -220,7 +220,7 @@ NDBAM::has_category_named(const CategoryNamePart & c)
{
Lock l(_imp->category_names_mutex);
CategoryContentsMap::const_iterator it(_imp->category_contents_map.find(c));
- if (_imp->category_contents_map.end() != it)
+ if (it != _imp->category_contents_map.end())
return it->second;
if (! _imp->category_names)
@@ -251,7 +251,7 @@ NDBAM::has_package_named(const QualifiedPackageName & q)
l.acquire_then_release_old(cc.mutex);
PackageContentsMap::const_iterator it(cc.package_contents_map.find(q));
- if (cc.package_contents_map.end() != it)
+ if (it != cc.package_contents_map.end())
return it->second;
if (! cc.package_names)
diff --git a/paludis/ndbam_merger.cc b/paludis/ndbam_merger.cc
index e21c558..898e1fd 100644
--- a/paludis/ndbam_merger.cc
+++ b/paludis/ndbam_merger.cc
@@ -40,8 +40,6 @@
using namespace paludis;
-#include <paludis/ndbam_merger-sr.cc>
-
namespace paludis
{
template<>
@@ -56,22 +54,22 @@ namespace paludis
Implementation(const NDBAMMergerParams & p) :
params(p),
- realroot(params.root.realpath())
+ realroot(params[k::root()].realpath())
{
- tokenise_whitespace(p.config_protect, std::back_inserter(config_protect));
- tokenise_whitespace(p.config_protect_mask, std::back_inserter(config_protect_mask));
+ tokenise_whitespace(p[k::config_protect()], std::back_inserter(config_protect));
+ tokenise_whitespace(p[k::config_protect_mask()], std::back_inserter(config_protect_mask));
}
};
}
NDBAMMerger::NDBAMMerger(const NDBAMMergerParams & p) :
Merger(MergerParams::named_create()
- (k::environment(), p.environment)
- (k::image(), p.image)
- (k::root(), p.root)
+ (k::environment(), p[k::environment()])
+ (k::image(), p[k::image()])
+ (k::root(), p[k::root()])
(k::no_chown(), ! getenv_with_default("PALUDIS_NO_CHOWN", "").empty())
- (k::install_under(), p.install_under)
- (k::options(), p.options)),
+ (k::install_under(), p[k::install_under()])
+ (k::options(), p[k::options()])),
PrivateImplementationPattern<NDBAMMerger>(new Implementation<NDBAMMerger>(p))
{
}
@@ -83,33 +81,33 @@ NDBAMMerger::~NDBAMMerger()
Hook
NDBAMMerger::extend_hook(const Hook & h)
{
- tr1::shared_ptr<const FSEntrySequence> bashrc_files(_imp->params.environment->bashrc_files());
+ tr1::shared_ptr<const FSEntrySequence> bashrc_files(_imp->params[k::environment()]->bashrc_files());
- if (_imp->params.package_id)
+ if (_imp->params[k::package_id()])
{
- 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()));
+ std::string cat(stringify(_imp->params[k::package_id()]->name().category));
+ std::string pn(stringify(_imp->params[k::package_id()]->name().package));
+ std::string pvr(stringify(_imp->params[k::package_id()]->version()));
+ std::string pv(stringify(_imp->params[k::package_id()]->version().remove_revision()));
+ std::string slot(stringify(_imp->params[k::package_id()]->slot()));
return Merger::extend_hook(h)
("P", pn + "-" + pv)
("PN", pn)
("CATEGORY", cat)
- ("PR", _imp->params.package_id->version().revision_only())
+ ("PR", _imp->params[k::package_id()]->version().revision_only())
("PV", pv)
("PVR", pvr)
("PF", pn + "-" + pvr)
("SLOT", slot)
- ("CONFIG_PROTECT", _imp->params.config_protect)
- ("CONFIG_PROTECT_MASK", _imp->params.config_protect_mask)
+ ("CONFIG_PROTECT", _imp->params[k::config_protect()])
+ ("CONFIG_PROTECT_MASK", _imp->params[k::config_protect_mask()])
("PALUDIS_BASHRC_FILES", join(bashrc_files->begin(), bashrc_files->end(), " "));
}
else
return Merger::extend_hook(h)
- ("CONFIG_PROTECT", _imp->params.config_protect)
- ("CONFIG_PROTECT_MASK", _imp->params.config_protect_mask)
+ ("CONFIG_PROTECT", _imp->params[k::config_protect()])
+ ("CONFIG_PROTECT_MASK", _imp->params[k::config_protect_mask()])
("PALUDIS_BASHRC_FILES", join(bashrc_files->begin(), bashrc_files->end(), " "));
}
@@ -326,15 +324,15 @@ NDBAMMerger::make_arrows(const MergeStatusFlags & flags) const
void
NDBAMMerger::merge()
{
- display_override(">>> Merging to " + stringify(_imp->params.root));
- _imp->contents_file.reset(new std::ofstream(stringify(_imp->params.contents_file).c_str()));
+ display_override(">>> Merging to " + stringify(_imp->params[k::root()]));
+ _imp->contents_file.reset(new std::ofstream(stringify(_imp->params[k::contents_file()]).c_str()));
Merger::merge();
}
bool
NDBAMMerger::check()
{
- std::cout << ">>> Checking whether we can merge to " << _imp->params.root << " ";
+ std::cout << ">>> Checking whether we can merge to " << _imp->params[k::root()] << " ";
bool result(Merger::check());
std::cout << std::endl;
return result;
diff --git a/paludis/ndbam_merger.hh b/paludis/ndbam_merger.hh
index ea64c67..5f8e3d0 100644
--- a/paludis/ndbam_merger.hh
+++ b/paludis/ndbam_merger.hh
@@ -22,10 +22,22 @@
#include <paludis/merger.hh>
#include <paludis/package_id-fwd.hh>
+#include <paludis/util/kc-fwd.hh>
+#include <paludis/util/keys.hh>
namespace paludis
{
-#include <paludis/ndbam_merger-sr.hh>
+ typedef kc::KeyedClass<
+ kc::Field<k::environment, Environment *>,
+ kc::Field<k::image, FSEntry>,
+ kc::Field<k::root, FSEntry>,
+ kc::Field<k::install_under, FSEntry>,
+ kc::Field<k::contents_file, FSEntry>,
+ kc::Field<k::config_protect, std::string>,
+ kc::Field<k::config_protect_mask, std::string>,
+ kc::Field<k::package_id, tr1::shared_ptr<const PackageID> >,
+ kc::Field<k::options, MergerOptions>
+ > NDBAMMergerParams;
/**
* Merger subclass for NDBAM.
diff --git a/paludis/ndbam_merger.sr b/paludis/ndbam_merger.sr
deleted file mode 100644
index 36f6ef9..0000000
--- a/paludis/ndbam_merger.sr
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-# vim: set sw=4 sts=4 et :
-
-make_class_NDBAMMergerParams()
-{
- visible
-
- key environment "Environment *"
- key image "FSEntry"
- key root "FSEntry"
- key install_under "FSEntry"
- key contents_file "FSEntry"
- key config_protect std::string
- key config_protect_mask std::string
- key package_id "tr1::shared_ptr<const PackageID>"
- key options "MergerOptions"
-
- allow_named_args
-}
-
diff --git a/paludis/repositories/e/exndbam_repository.cc b/paludis/repositories/e/exndbam_repository.cc
index 6107a22..fa29681 100644
--- a/paludis/repositories/e/exndbam_repository.cc
+++ b/paludis/repositories/e/exndbam_repository.cc
@@ -328,16 +328,16 @@ ExndbamRepository::merge(const MergeParams & m)
}
NDBAMMerger merger(
- NDBAMMergerParams::create()
- .environment(_imp->params.environment)
- .image(m[k::image_dir()])
- .root(installed_root_key()->value())
- .install_under(FSEntry("/"))
- .contents_file(target_ver_dir / "contents")
- .config_protect(config_protect)
- .config_protect_mask(config_protect_mask)
- .package_id(m[k::package_id()])
- .options(m[k::options()]));
+ NDBAMMergerParams::named_create()
+ (k::environment(), _imp->params.environment)
+ (k::image(), m[k::image_dir()])
+ (k::root(), installed_root_key()->value())
+ (k::install_under(), FSEntry("/"))
+ (k::contents_file(), target_ver_dir / "contents")
+ (k::config_protect(), config_protect)
+ (k::config_protect_mask(), config_protect_mask)
+ (k::package_id(), m[k::package_id()])
+ (k::options(), m[k::options()]));
if (! merger.check())
{
diff --git a/paludis/repositories/unpackaged/Makefile.am b/paludis/repositories/unpackaged/Makefile.am
index a3656f9..52e072f 100644
--- a/paludis/repositories/unpackaged/Makefile.am
+++ b/paludis/repositories/unpackaged/Makefile.am
@@ -1,7 +1,6 @@
SUBDIRS = .
CLEANFILES = *~ gmon.out *.gcov *.gcno *.gcda
DISTCLEANFILES = \
- unpackaged_repository-sr.hh unpackaged_repository-sr.cc \
installed_repository-sr.hh installed_repository-sr.cc
MAINTAINERCLEANFILES = Makefile.in
@@ -25,7 +24,6 @@ paludis_repositories_unpackaged_include_HEADERS = \
exceptions.hh \
unpackaged_id.hh \
unpackaged_repository.hh \
- unpackaged_repository-sr.hh \
unpackaged_key.hh \
unpackaged_stripper.hh \
installed_repository.hh \
@@ -87,9 +85,6 @@ EXTRA_DIST = \
unpackaged_repository_TEST.cc \
unpackaged_repository_TEST_setup.sh \
unpackaged_repository_TEST_cleanup.sh \
- unpackaged_repository.sr \
- unpackaged_repository-sr.hh \
- unpackaged_repository-sr.cc \
installed_repository_TEST.cc \
installed_repository_TEST_setup.sh \
installed_repository_TEST_cleanup.sh \
@@ -100,7 +95,6 @@ EXTRA_DIST = \
dep_parser_TEST.cc
BUILT_SOURCES = \
- unpackaged_repository-sr.hh unpackaged_repository-sr.cc \
installed_repository-sr.hh installed_repository-sr.cc
check_SCRIPTS = \
@@ -133,12 +127,6 @@ check_PROGRAMS = $(TESTS)
built-sources : $(BUILT_SOURCES)
for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
-unpackaged_repository-sr.hh : unpackaged_repository.sr $(top_srcdir)/misc/make_sr.bash
- if ! $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/unpackaged_repository.sr > $@ ; then rm -f $@ ; exit 1 ; fi
-
-unpackaged_repository-sr.cc : unpackaged_repository.sr $(top_srcdir)/misc/make_sr.bash
- if ! $(top_srcdir)/misc/make_sr.bash --source $(srcdir)/unpackaged_repository.sr > $@ ; then rm -f $@ ; exit 1 ; fi
-
installed_repository-sr.hh : installed_repository.sr $(top_srcdir)/misc/make_sr.bash
if ! $(top_srcdir)/misc/make_sr.bash --header $(srcdir)/installed_repository.sr > $@ ; then rm -f $@ ; exit 1 ; fi
diff --git a/paludis/repositories/unpackaged/installed_repository.cc b/paludis/repositories/unpackaged/installed_repository.cc
index bf5647c..77a2a67 100644
--- a/paludis/repositories/unpackaged/installed_repository.cc
+++ b/paludis/repositories/unpackaged/installed_repository.cc
@@ -312,16 +312,16 @@ InstalledUnpackagedRepository::merge(const MergeParams & m)
}
NDBAMMerger merger(
- NDBAMMergerParams::create()
- .environment(_imp->params.environment)
- .image(m[k::image_dir()])
- .install_under(install_under)
- .root(installed_root_key()->value())
- .contents_file(target_ver_dir / "contents")
- .config_protect(getenv_with_default("CONFIG_PROTECT", ""))
- .config_protect_mask(getenv_with_default("CONFIG_PROTECT_MASK", ""))
- .package_id(m[k::package_id()])
- .options(MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs));
+ NDBAMMergerParams::named_create()
+ (k::environment(), _imp->params.environment)
+ (k::image(), m[k::image_dir()])
+ (k::install_under(), install_under)
+ (k::root(), installed_root_key()->value())
+ (k::contents_file(), target_ver_dir / "contents")
+ (k::config_protect(), getenv_with_default("CONFIG_PROTECT", ""))
+ (k::config_protect_mask(), getenv_with_default("CONFIG_PROTECT_MASK", ""))
+ (k::package_id(), m[k::package_id()])
+ (k::options(), MergerOptions() + mo_rewrite_symlinks + mo_allow_empty_dirs));
if (! merger.check())
{
diff --git a/paludis/repositories/unpackaged/installed_repository_TEST.cc b/paludis/repositories/unpackaged/installed_repository_TEST.cc
index 0245c95..7f2d16d 100644
--- a/paludis/repositories/unpackaged/installed_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/installed_repository_TEST.cc
@@ -370,16 +370,16 @@ namespace test_cases
tr1::shared_ptr<Repository> source_repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(&env)
- .name(QualifiedPackageName("cat/pkg4a"))
- .version(VersionSpec("1.0"))
- .slot(SlotName("foo"))
- .location(FSEntry("installed_repository_TEST_dir/src4a"))
- .install_under(FSEntry("/"))
- .build_dependencies("")
- .run_dependencies("")
- .description("")
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), &env)
+ (k::name(), QualifiedPackageName("cat/pkg4a"))
+ (k::version(), VersionSpec("1.0"))
+ (k::slot(), SlotName("foo"))
+ (k::location(), FSEntry("installed_repository_TEST_dir/src4a"))
+ (k::install_under(), FSEntry("/"))
+ (k::build_dependencies(), "")
+ (k::run_dependencies(), "")
+ (k::description(), "")
));
env.package_database()->add_repository(1, source_repo);
@@ -426,16 +426,16 @@ namespace test_cases
tr1::shared_ptr<Repository> source_repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(&env)
- .name(QualifiedPackageName("cat/pkg4b"))
- .version(VersionSpec("1.0"))
- .slot(SlotName("foo"))
- .location(FSEntry("installed_repository_TEST_dir/src4b1"))
- .install_under(FSEntry("/"))
- .build_dependencies("")
- .run_dependencies("")
- .description("")
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), &env)
+ (k::name(), QualifiedPackageName("cat/pkg4b"))
+ (k::version(), VersionSpec("1.0"))
+ (k::slot(), SlotName("foo"))
+ (k::location(), FSEntry("installed_repository_TEST_dir/src4b1"))
+ (k::install_under(), FSEntry("/"))
+ (k::build_dependencies(), "")
+ (k::run_dependencies(), "")
+ (k::description(), "")
));
env.package_database()->add_repository(1, source_repo);
@@ -484,16 +484,16 @@ namespace test_cases
tr1::shared_ptr<Repository> source_repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(&env)
- .name(QualifiedPackageName("cat/pkg4b"))
- .version(VersionSpec("1.0"))
- .slot(SlotName("foo"))
- .location(FSEntry("installed_repository_TEST_dir/src4b2"))
- .install_under(FSEntry("/"))
- .build_dependencies("")
- .run_dependencies("")
- .description("")
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), &env)
+ (k::name(), QualifiedPackageName("cat/pkg4b"))
+ (k::version(), VersionSpec("1.0"))
+ (k::slot(), SlotName("foo"))
+ (k::location(), FSEntry("installed_repository_TEST_dir/src4b2"))
+ (k::install_under(), FSEntry("/"))
+ (k::build_dependencies(), "")
+ (k::run_dependencies(), "")
+ (k::description(), "")
));
env.package_database()->add_repository(1, source_repo);
diff --git a/paludis/repositories/unpackaged/registration.cc b/paludis/repositories/unpackaged/registration.cc
index d85c5dd..8cb6f76 100644
--- a/paludis/repositories/unpackaged/registration.cc
+++ b/paludis/repositories/unpackaged/registration.cc
@@ -69,16 +69,16 @@ namespace
description = m->find("description")->second;
return make_shared_ptr(new UnpackagedRepository(RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(env)
- .location(location)
- .install_under(install_under)
- .name(QualifiedPackageName(name))
- .version(VersionSpec(version))
- .slot(SlotName(slot))
- .build_dependencies(build_dependencies)
- .run_dependencies(run_dependencies)
- .description(description)));
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), env)
+ (k::location(), location)
+ (k::install_under(), install_under)
+ (k::name(), QualifiedPackageName(name))
+ (k::version(), VersionSpec(version))
+ (k::slot(), SlotName(slot))
+ (k::build_dependencies(), build_dependencies)
+ (k::run_dependencies(), run_dependencies)
+ (k::description(), description)));
}
tr1::shared_ptr<Repository>
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.cc b/paludis/repositories/unpackaged/unpackaged_repository.cc
index 7061af0..bf900c3 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository.cc
@@ -32,8 +32,6 @@
using namespace paludis;
using namespace paludis::unpackaged_repositories;
-#include <paludis/repositories/unpackaged/unpackaged_repository-sr.cc>
-
namespace paludis
{
template <>
@@ -57,27 +55,27 @@ namespace paludis
Implementation(const RepositoryName & n,
const UnpackagedRepositoryParams & p) :
params(p),
- id(new UnpackagedID(params.environment, params.name, params.version, params.slot, n, params.location,
- params.build_dependencies, params.run_dependencies, params.description)),
+ id(new UnpackagedID(params[k::environment()], params[k::name()], params[k::version()], params[k::slot()], n, params[k::location()],
+ params[k::build_dependencies()], params[k::run_dependencies()], params[k::description()])),
ids(new PackageIDSequence),
package_names(new QualifiedPackageNameSet),
category_names(new CategoryNamePartSet),
location_key(new LiteralMetadataValueKey<FSEntry> ("location", "location",
- mkt_significant, params.location)),
+ mkt_significant, params[k::location()])),
install_under_key(new LiteralMetadataValueKey<FSEntry> ("install_under", "install_under",
- mkt_significant, params.install_under)),
+ mkt_significant, params[k::install_under()])),
name_key(new LiteralMetadataValueKey<std::string> ("name", "name",
- mkt_normal, stringify(params.name))),
+ mkt_normal, stringify(params[k::name()]))),
slot_key(new LiteralMetadataValueKey<std::string> ("slot", "slot",
- mkt_normal, stringify(params.slot))),
+ mkt_normal, stringify(params[k::slot()]))),
format_key(new LiteralMetadataValueKey<std::string> (
"format", "format", mkt_significant, "unpackaged")),
build_dependencies_key(new LiteralMetadataValueKey<std::string> (
- "build_dependencies", "build_dependencies", mkt_normal, params.build_dependencies)),
+ "build_dependencies", "build_dependencies", mkt_normal, params[k::build_dependencies()])),
run_dependencies_key(new LiteralMetadataValueKey<std::string> (
- "run_dependencies", "run_dependencies", mkt_normal, params.run_dependencies)),
+ "run_dependencies", "run_dependencies", mkt_normal, params[k::run_dependencies()])),
description_key(new LiteralMetadataValueKey<std::string> (
- "description", "description", mkt_normal, params.description))
+ "description", "description", mkt_normal, params[k::description()]))
{
ids->push_back(id);
package_names->insert(id->name());
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.hh b/paludis/repositories/unpackaged/unpackaged_repository.hh
index 5761abc..a8b5da2 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository.hh
+++ b/paludis/repositories/unpackaged/unpackaged_repository.hh
@@ -23,12 +23,24 @@
#include <paludis/repository.hh>
#include <paludis/util/map.hh>
#include <paludis/util/private_implementation_pattern.hh>
+#include <paludis/util/kc-fwd.hh>
+#include <paludis/util/keys.hh>
namespace paludis
{
namespace unpackaged_repositories
{
-#include <paludis/repositories/unpackaged/unpackaged_repository-sr.hh>
+ typedef kc::KeyedClass<
+ kc::Field<k::environment, Environment *>,
+ kc::Field<k::location, FSEntry>,
+ kc::Field<k::install_under, FSEntry>,
+ kc::Field<k::name, QualifiedPackageName>,
+ kc::Field<k::version, VersionSpec>,
+ kc::Field<k::slot, SlotName>,
+ kc::Field<k::build_dependencies, std::string>,
+ kc::Field<k::run_dependencies, std::string>,
+ kc::Field<k::description, std::string>
+ > UnpackagedRepositoryParams;
}
class PALUDIS_VISIBLE UnpackagedRepository :
diff --git a/paludis/repositories/unpackaged/unpackaged_repository.sr b/paludis/repositories/unpackaged/unpackaged_repository.sr
deleted file mode 100644
index 65043d5..0000000
--- a/paludis/repositories/unpackaged/unpackaged_repository.sr
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/bash
-# vim: set sw=4 sts=4 et :
-
-make_class_UnpackagedRepositoryParams()
-{
- visible
-
- key environment "Environment *"
- key location FSEntry
- key install_under FSEntry
- key name QualifiedPackageName
- key version VersionSpec
- key slot SlotName
- key build_dependencies std::string
- key run_dependencies std::string
- key description std::string
-
- allow_named_args
-}
-
diff --git a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
index 09f64e8..296aff1 100644
--- a/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
+++ b/paludis/repositories/unpackaged/unpackaged_repository_TEST.cc
@@ -48,16 +48,16 @@ namespace test_cases
TestEnvironment env;
tr1::shared_ptr<Repository> repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(&env)
- .name(QualifiedPackageName("cat/pkg"))
- .version(VersionSpec("1.0"))
- .slot(SlotName("foo"))
- .location(FSEntry("unpackaged_repository_TEST_dir/pkg"))
- .install_under(FSEntry("/"))
- .build_dependencies("")
- .run_dependencies("")
- .description("")
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), &env)
+ (k::name(), QualifiedPackageName("cat/pkg"))
+ (k::version(), VersionSpec("1.0"))
+ (k::slot(), SlotName("foo"))
+ (k::location(), FSEntry("unpackaged_repository_TEST_dir/pkg"))
+ (k::install_under(), FSEntry("/"))
+ (k::build_dependencies(), "")
+ (k::run_dependencies(), "")
+ (k::description(), "")
));
env.package_database()->add_repository(1, repo);
@@ -77,16 +77,16 @@ namespace test_cases
TestEnvironment env;
tr1::shared_ptr<Repository> repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(&env)
- .name(QualifiedPackageName("cat/pkg"))
- .version(VersionSpec("1.0"))
- .slot(SlotName("foo"))
- .location(FSEntry("unpackaged_repository_TEST_dir/pkg"))
- .install_under(FSEntry("/"))
- .build_dependencies("")
- .run_dependencies("")
- .description("")
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), &env)
+ (k::name(), QualifiedPackageName("cat/pkg"))
+ (k::version(), VersionSpec("1.0"))
+ (k::slot(), SlotName("foo"))
+ (k::location(), FSEntry("unpackaged_repository_TEST_dir/pkg"))
+ (k::install_under(), FSEntry("/"))
+ (k::build_dependencies(), "")
+ (k::run_dependencies(), "")
+ (k::description(), "")
));
env.package_database()->add_repository(1, repo);
@@ -111,16 +111,16 @@ namespace test_cases
TestEnvironment env;
tr1::shared_ptr<Repository> repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(&env)
- .name(QualifiedPackageName("cat/pkg"))
- .version(VersionSpec("1.0"))
- .slot(SlotName("foo"))
- .location(FSEntry("unpackaged_repository_TEST_dir/pkg"))
- .install_under(FSEntry("/"))
- .build_dependencies("")
- .run_dependencies("")
- .description("")
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), &env)
+ (k::name(), QualifiedPackageName("cat/pkg"))
+ (k::version(), VersionSpec("1.0"))
+ (k::slot(), SlotName("foo"))
+ (k::location(), FSEntry("unpackaged_repository_TEST_dir/pkg"))
+ (k::install_under(), FSEntry("/"))
+ (k::build_dependencies(), "")
+ (k::run_dependencies(), "")
+ (k::description(), "")
));
env.package_database()->add_repository(1, repo);
@@ -140,16 +140,16 @@ namespace test_cases
TestEnvironment env;
tr1::shared_ptr<Repository> repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(&env)
- .name(QualifiedPackageName("cat/pkg"))
- .version(VersionSpec("1.0"))
- .slot(SlotName("foo"))
- .location(FSEntry("unpackaged_repository_TEST_dir/pkg"))
- .install_under(FSEntry("/"))
- .build_dependencies("")
- .run_dependencies("")
- .description("")
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), &env)
+ (k::name(), QualifiedPackageName("cat/pkg"))
+ (k::version(), VersionSpec("1.0"))
+ (k::slot(), SlotName("foo"))
+ (k::location(), FSEntry("unpackaged_repository_TEST_dir/pkg"))
+ (k::install_under(), FSEntry("/"))
+ (k::build_dependencies(), "")
+ (k::run_dependencies(), "")
+ (k::description(), "")
));
env.package_database()->add_repository(1, repo);
@@ -182,16 +182,16 @@ namespace test_cases
tr1::shared_ptr<Repository> repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(&env)
- .name(QualifiedPackageName("cat/pkg"))
- .version(VersionSpec("1.0"))
- .slot(SlotName("foo"))
- .location(FSEntry("unpackaged_repository_TEST_dir/pkg"))
- .install_under(FSEntry("/"))
- .build_dependencies("")
- .run_dependencies("")
- .description("")
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), &env)
+ (k::name(), QualifiedPackageName("cat/pkg"))
+ (k::version(), VersionSpec("1.0"))
+ (k::slot(), SlotName("foo"))
+ (k::location(), FSEntry("unpackaged_repository_TEST_dir/pkg"))
+ (k::install_under(), FSEntry("/"))
+ (k::build_dependencies(), "")
+ (k::run_dependencies(), "")
+ (k::description(), "")
));
env.package_database()->add_repository(1, repo);
@@ -236,16 +236,16 @@ namespace test_cases
tr1::shared_ptr<Repository> repo(new UnpackagedRepository(
RepositoryName("unpackaged"),
- unpackaged_repositories::UnpackagedRepositoryParams::create()
- .environment(&env)
- .name(QualifiedPackageName("cat/pkg"))
- .version(VersionSpec("1.0"))
- .slot(SlotName("foo"))
- .location(FSEntry("unpackaged_repository_TEST_dir/under_pkg"))
- .install_under(FSEntry("/magic/pixie"))
- .build_dependencies("")
- .run_dependencies("")
- .description("")
+ unpackaged_repositories::UnpackagedRepositoryParams::named_create()
+ (k::environment(), &env)
+ (k::name(), QualifiedPackageName("cat/pkg"))
+ (k::version(), VersionSpec("1.0"))
+ (k::slot(), SlotName("foo"))
+ (k::location(), FSEntry("unpackaged_repository_TEST_dir/under_pkg"))
+ (k::install_under(), FSEntry("/magic/pixie"))
+ (k::build_dependencies(), "")
+ (k::run_dependencies(), "")
+ (k::description(), "")
));
env.package_database()->add_repository(1, repo);
diff --git a/paludis/util/keys.hh b/paludis/util/keys.hh
index e9e886d..6df11d4 100644
--- a/paludis/util/keys.hh
+++ b/paludis/util/keys.hh
@@ -154,6 +154,11 @@ namespace paludis
typedef kc::Key<125> debug_dir;
typedef kc::Key<126> use_ebuild_file;
typedef kc::Key<127> install_under;
+ typedef kc::Key<128> location;
+ typedef kc::Key<129> version;
+ typedef kc::Key<130> build_dependencies;
+ typedef kc::Key<131> run_dependencies;
+ typedef kc::Key<132> description;
}
}