aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-31 06:24:43 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-07-31 06:24:43 +0000
commitd3c823516272f99d3588dedcc6d3c6f09fbb14b3 (patch)
tree68b2328423d0a1c5278ff4b42294023d31776dd6
parent2c59467bbabaf57a982bbd539f9e8676e9073860 (diff)
downloadpaludis-d3c823516272f99d3588dedcc6d3c6f09fbb14b3.tar.gz
paludis-d3c823516272f99d3588dedcc6d3c6f09fbb14b3.tar.xz
More ebin work
-rw-r--r--paludis/ebin.cc3
-rw-r--r--paludis/repositories/portage/portage_repository_ebin_entries.cc46
2 files changed, 45 insertions, 4 deletions
diff --git a/paludis/ebin.cc b/paludis/ebin.cc
index 6dbef12..fe15798 100644
--- a/paludis/ebin.cc
+++ b/paludis/ebin.cc
@@ -170,7 +170,7 @@ EbinInstallCommand::commands() const
if (install_params.get<ebcipk_merge_only>())
return "merge";
else
- return "init_bin unpack_bin setup preinst merge postinst tidyup";
+ return "init_bin unpack_bin setup strip preinst merge postinst tidyup";
}
bool
@@ -210,3 +210,4 @@ EbinInstallCommand::EbinInstallCommand(const EbinCommandParams & p,
{
}
+
diff --git a/paludis/repositories/portage/portage_repository_ebin_entries.cc b/paludis/repositories/portage/portage_repository_ebin_entries.cc
index 168ad4f..ff394e0 100644
--- a/paludis/repositories/portage/portage_repository_ebin_entries.cc
+++ b/paludis/repositories/portage/portage_repository_ebin_entries.cc
@@ -340,11 +340,51 @@ PortageRepositoryEbinEntries::install(const QualifiedPackageName & q, const Vers
}
std::string
-PortageRepositoryEbinEntries::get_environment_variable(const QualifiedPackageName &,
- const VersionSpec &, const std::string &,
+PortageRepositoryEbinEntries::get_environment_variable(const QualifiedPackageName & q,
+ const VersionSpec & v, const std::string & s,
PortageRepositoryProfile::ConstPointer) const
{
- return "todo";
+ VersionMetadata::ConstPointer metadata(_imp->portage_repository->version_metadata(q, v));
+
+ if (s == "DEPEND")
+ return metadata->get<vm_deps>().get<vmd_build_depend_string>();
+ if (s == "RDEPEND")
+ return metadata->get<vm_deps>().get<vmd_run_depend_string>();
+ if (s == "PDEPEND")
+ return metadata->get<vm_deps>().get<vmd_post_depend_string>();
+
+ if (s == "SLOT")
+ return stringify(metadata->get<vm_slot>());
+ if (s == "LICENSE")
+ return metadata->get<vm_license>();
+ if (s == "EAPI")
+ return metadata->get<vm_eapi>();
+ if (s == "HOMEPAGE")
+ return metadata->get<vm_homepage>();
+ if (s == "DESCRIPTION")
+ return metadata->get<vm_description>();
+
+ if (s == "PROVIDE")
+ return metadata->get_ebuild_interface()->get<evm_provide>();
+ if (s == "SRC_URI")
+ return metadata->get_ebuild_interface()->get<evm_src_uri>();
+ if (s == "RESTRICT")
+ return metadata->get_ebuild_interface()->get<evm_restrict>();
+ if (s == "KEYWORDS")
+ return metadata->get_ebuild_interface()->get<evm_keywords>();
+ if (s == "IUSE")
+ return metadata->get_ebuild_interface()->get<evm_iuse>();
+ if (s == "VIRTUAL")
+ return metadata->get_ebuild_interface()->get<evm_inherited>();
+
+ if (s == "BIN_URI")
+ return metadata->get_ebin_interface()->get<ebvm_bin_uri>();
+ if (s == "SRC_REPOSITORY")
+ return stringify(metadata->get_ebin_interface()->get<ebvm_src_repository>());
+
+ PackageDatabaseEntry for_package(q, v, _imp->portage_repository->name());
+ throw EnvironmentVariableActionError("Couldn't get environment variable '" +
+ stringify(s) + "' for package '" + stringify(for_package) + "'");
}
PortageRepositoryEbinEntries::Pointer