aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-19 00:11:58 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-04-19 00:11:58 +0000
commit00e8ae1acb82523c8d23ed5d1740fefeadf64d60 (patch)
treed817c79a8f28552543d3cd99a54bbeabbfd2f361
parentc95c80eaebc8383a8dd1a0e4d082dad22824c20a (diff)
downloadpaludis-00e8ae1acb82523c8d23ed5d1740fefeadf64d60.tar.gz
paludis-00e8ae1acb82523c8d23ed5d1740fefeadf64d60.tar.xz
Be less sensitive to missing ebuilds in VDB
-rw-r--r--paludis/repositories/gentoo/ebuild.cc22
-rw-r--r--paludis/repositories/gentoo/ebuild.hh7
2 files changed, 23 insertions, 6 deletions
diff --git a/paludis/repositories/gentoo/ebuild.cc b/paludis/repositories/gentoo/ebuild.cc
index 16ae2b2..2dfdead 100644
--- a/paludis/repositories/gentoo/ebuild.cc
+++ b/paludis/repositories/gentoo/ebuild.cc
@@ -72,11 +72,7 @@ bool
EbuildCommand::operator() ()
{
Command cmd(getenv_with_default("PALUDIS_EBUILD_DIR", LIBEXECDIR "/paludis") +
- "/ebuild.bash '" +
- stringify(params.ebuild_dir) + "/" +
- stringify(params.db_entry->name.package) + "-" +
- stringify(params.db_entry->version) +
- ".ebuild' " + commands());
+ "/ebuild.bash '" + ebuild_file() + "' " + commands());
if (use_sandbox())
cmd.with_sandbox();
@@ -122,6 +118,13 @@ EbuildCommand::operator() ()
return failure();
}
+std::string
+EbuildCommand::ebuild_file() const
+{
+ return stringify(params.ebuild_dir) + "/" +
+ stringify(params.db_entry->name.package) + "-" + stringify(params.db_entry->version) + ".ebuild";
+}
+
Command
EbuildCommand::add_portage_vars(const Command & cmd) const
{
@@ -178,7 +181,8 @@ EbuildMetadataCommand::do_run_command(const Command & cmd)
{
PStream prog(cmd);
KeyValueConfigFile f(prog, KeyValueConfigFileOptions() + kvcfo_disallow_continuations + kvcfo_disallow_comments
- + kvcfo_disallow_space_around_equals + kvcfo_disallow_space_inside_unquoted_values + kvcfo_disallow_unquoted_values);
+ + kvcfo_disallow_space_around_equals + kvcfo_disallow_unquoted_values + kvcfo_disallow_source
+ + kvcfo_disallow_variables);
_metadata.reset(new EbuildVersionMetadata);
bool ok(false);
@@ -431,6 +435,12 @@ EbuildUninstallCommand::commands() const
throw InternalError(PALUDIS_HERE, "Bad phase value");
}
+std::string
+EbuildUninstallCommand::ebuild_file() const
+{
+ return "-";
+}
+
bool
EbuildUninstallCommand::failure()
{
diff --git a/paludis/repositories/gentoo/ebuild.hh b/paludis/repositories/gentoo/ebuild.hh
index 23c5a42..235752f 100644
--- a/paludis/repositories/gentoo/ebuild.hh
+++ b/paludis/repositories/gentoo/ebuild.hh
@@ -116,6 +116,11 @@ namespace paludis
virtual std::string commands() const = 0;
/**
+ * Return our ebuild file.
+ */
+ virtual std::string ebuild_file() const;
+
+ /**
* Actions to be taken after a successful command.
*
* The return value of this function is used for the return value
@@ -311,6 +316,8 @@ namespace paludis
virtual Command extend_command(const Command &);
+ virtual std::string ebuild_file() const;
+
public:
/**
* Constructor.