aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <Marc-Antoine@Perennou.com> 2010-03-10 20:13:00 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-03-10 19:16:31 +0000
commit7728a8d81dfb5927f4ac423e3697038fa3266234 (patch)
tree0d40c274183448c697aa548644ccacc85732dadf
parentdf1af9084bbd406526548f4cab015fc32c448f05 (diff)
downloadpaludis-7728a8d81dfb5927f4ac423e3697038fa3266234.tar.gz
paludis-7728a8d81dfb5927f4ac423e3697038fa3266234.tar.xz
Fix appareo check for integrity
-rw-r--r--doc/api/cplusplus/examples/example_action.cc3
-rw-r--r--paludis/action.hh9
-rw-r--r--paludis/install_task.cc6
-rw-r--r--paludis/repositories/e/check_fetched_files_visitor.cc14
-rw-r--r--paludis/repositories/e/check_fetched_files_visitor.hh3
-rw-r--r--paludis/repositories/e/e_repository.cc3
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc6
-rw-r--r--python/action.cc3
-rw-r--r--ruby/action.cc3
-rw-r--r--src/clients/accerso/accerso.cc3
-rw-r--r--src/clients/appareo/appareo.cc3
-rw-r--r--src/clients/cave/cmd_perform.cc6
12 files changed, 44 insertions, 18 deletions
diff --git a/doc/api/cplusplus/examples/example_action.cc b/doc/api/cplusplus/examples/example_action.cc
index aff7939..573d066 100644
--- a/doc/api/cplusplus/examples/example_action.cc
+++ b/doc/api/cplusplus/examples/example_action.cc
@@ -82,7 +82,8 @@ int main(int argc, char * argv[])
value_for<n::fetch_parts>(FetchParts() + fp_regulars + fp_extras),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::safe_resume>(true)
+ value_for<n::safe_resume>(true),
+ value_for<n::ignore_not_in_manifest>(false)
));
try
{
diff --git a/paludis/action.hh b/paludis/action.hh
index f0c2ead..2c1f956 100644
--- a/paludis/action.hh
+++ b/paludis/action.hh
@@ -67,6 +67,7 @@ namespace paludis
struct safe_resume;
struct target_file;
struct want_phase;
+ struct ignore_not_in_manifest;
}
/**
@@ -117,6 +118,14 @@ namespace paludis
NamedValue<n::safe_resume, bool> safe_resume;
+
+ /**
+ * Ignore if a package is or isn't referenced in the Manifest.
+ * It's useful with appareo not to get errors before generating it.
+ *
+ * \since 0.46
+ */
+ NamedValue<n::ignore_not_in_manifest, bool> ignore_not_in_manifest;
};
/**
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index 8862669..3ec8b63 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -767,7 +767,8 @@ InstallTask::_pretend()
value_for<n::fetch_parts>(FetchParts() + fp_regulars + fp_extras),
value_for<n::ignore_unfetched>(true),
value_for<n::make_output_manager>(std::tr1::ref(output_manager_holder)),
- value_for<n::safe_resume>(_imp->safe_resume)
+ value_for<n::safe_resume>(_imp->safe_resume),
+ value_for<n::ignore_not_in_manifest>(false)
));
FetchAction fetch_action(options);
try
@@ -1934,7 +1935,8 @@ InstallTask::make_fetch_action_options(const DepListEntry &, OutputManagerFromEn
value_for<n::fetch_parts>(FetchParts() + fp_regulars + fp_extras),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(std::tr1::ref(o)),
- value_for<n::safe_resume>(_imp->safe_resume)
+ value_for<n::safe_resume>(_imp->safe_resume),
+ value_for<n::ignore_not_in_manifest>(false)
);
}
diff --git a/paludis/repositories/e/check_fetched_files_visitor.cc b/paludis/repositories/e/check_fetched_files_visitor.cc
index c133752..754d2af 100644
--- a/paludis/repositories/e/check_fetched_files_visitor.cc
+++ b/paludis/repositories/e/check_fetched_files_visitor.cc
@@ -65,6 +65,7 @@ namespace paludis
const bool check_unneeded;
const bool exclude_unmirrorable;
const bool ignore_unfetched;
+ const bool ignore_not_in_manifest;
std::set<std::string> done;
const std::tr1::shared_ptr<Sequence<FetchActionFailure> > failures;
@@ -85,7 +86,8 @@ namespace paludis
const UseManifest um,
const std::tr1::shared_ptr<OutputManager> & md,
const bool x,
- const bool u) :
+ const bool u,
+ const bool nm) :
env(e),
id(i),
distdir(d),
@@ -97,7 +99,8 @@ namespace paludis
in_nofetch(n),
m2r(new Manifest2Reader(m2)),
use_manifest(um),
- output_manager(md)
+ output_manager(md),
+ ignore_not_in_manifest(nm)
{
}
};
@@ -113,8 +116,9 @@ CheckFetchedFilesVisitor::CheckFetchedFilesVisitor(
const UseManifest um,
const std::tr1::shared_ptr<OutputManager> & md,
const bool x,
- const bool u) :
- PrivateImplementationPattern<CheckFetchedFilesVisitor>(new Implementation<CheckFetchedFilesVisitor>(e, i, d, c, n, m2, um, md, x, u))
+ const bool u,
+ const bool nm) :
+ PrivateImplementationPattern<CheckFetchedFilesVisitor>(new Implementation<CheckFetchedFilesVisitor>(e, i, d, c, n, m2, um, md, x, u, nm))
{
}
@@ -341,7 +345,7 @@ CheckFetchedFilesVisitor::check_distfile_manifest(const FSEntry & distfile)
}
}
- if (! found)
+ if ((! found) && (! _imp->ignore_not_in_manifest))
{
_imp->output_manager->stdout_stream() << "not in Manifest";
_imp->failures->push_back(make_named_values<FetchActionFailure>(
diff --git a/paludis/repositories/e/check_fetched_files_visitor.hh b/paludis/repositories/e/check_fetched_files_visitor.hh
index 138ead8..85c597e 100644
--- a/paludis/repositories/e/check_fetched_files_visitor.hh
+++ b/paludis/repositories/e/check_fetched_files_visitor.hh
@@ -53,7 +53,8 @@ namespace paludis
const UseManifest um,
const std::tr1::shared_ptr<OutputManager> & output_manager,
const bool exclude_unmirrorable,
- const bool ignore_unfetched);
+ const bool ignore_unfetched,
+ const bool ignore_not_in_manifest);
~CheckFetchedFilesVisitor();
diff --git a/paludis/repositories/e/e_repository.cc b/paludis/repositories/e/e_repository.cc
index a137f38..40faf20 100644
--- a/paludis/repositories/e/e_repository.cc
+++ b/paludis/repositories/e/e_repository.cc
@@ -1974,7 +1974,8 @@ ERepository::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id,
((_imp->layout->package_directory(id->name())) / "Manifest"),
_imp->params.use_manifest(),
output_manager, fetch_action.options.exclude_unmirrorable(),
- fetch_action.options.ignore_unfetched());
+ fetch_action.options.ignore_unfetched(),
+ fetch_action.options.ignore_not_in_manifest());
if (id->fetches_key())
{
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index 6575efe..a185dc6 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -940,7 +940,8 @@ namespace test_cases
value_for<n::fetch_parts>(FetchParts() + fp_regulars + fp_extras),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::safe_resume>(true)
+ value_for<n::safe_resume>(true),
+ value_for<n::ignore_not_in_manifest>(false)
));
{
@@ -1047,7 +1048,8 @@ namespace test_cases
value_for<n::fetch_parts>(FetchParts() + fp_regulars + fp_extras),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::safe_resume>(true)
+ value_for<n::safe_resume>(true),
+ value_for<n::ignore_not_in_manifest>(false)
));
const std::tr1::shared_ptr<const PackageID> id(*env[selection::AllVersionsSorted(generator::Matches(
diff --git a/python/action.cc b/python/action.cc
index dc9d943..0b4524a 100644
--- a/python/action.cc
+++ b/python/action.cc
@@ -134,7 +134,8 @@ namespace
value_for<n::fetch_parts>(parts),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::safe_resume>(safe_resume)
+ value_for<n::safe_resume>(safe_resume),
+ value_for<n::ignore_not_in_manifest>(false)
));
}
diff --git a/ruby/action.cc b/ruby/action.cc
index 9febae1..a3c8231 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -259,7 +259,8 @@ namespace
value_for<n::fetch_parts>(parts),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::safe_resume>(v_safe_resume)
+ value_for<n::safe_resume>(v_safe_resume),
+ value_for<n::ignore_not_in_manifest>(false)
));
VALUE tdata(Data_Wrap_Struct(self, 0, &Common<FetchActionOptions>::free, ptr));
diff --git a/src/clients/accerso/accerso.cc b/src/clients/accerso/accerso.cc
index a285e89..3bfbd25 100644
--- a/src/clients/accerso/accerso.cc
+++ b/src/clients/accerso/accerso.cc
@@ -148,7 +148,8 @@ main(int argc, char *argv[])
value_for<n::fetch_parts>(FetchParts() + fp_regulars + fp_unneeded),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(std::tr1::ref(output_manager_holder)),
- value_for<n::safe_resume>(true)
+ value_for<n::safe_resume>(true),
+ value_for<n::ignore_not_in_manifest>(false)
));
try
diff --git a/src/clients/appareo/appareo.cc b/src/clients/appareo/appareo.cc
index 2fdccd8..f3ecf6c 100644
--- a/src/clients/appareo/appareo.cc
+++ b/src/clients/appareo/appareo.cc
@@ -108,7 +108,8 @@ namespace
value_for<n::fetch_parts>(FetchParts() + fp_regulars + fp_extras + fp_unneeded),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
- value_for<n::safe_resume>(true)
+ value_for<n::safe_resume>(true),
+ value_for<n::ignore_not_in_manifest>(true)
));
(*i)->perform_action(a);
++success;
diff --git a/src/clients/cave/cmd_perform.cc b/src/clients/cave/cmd_perform.cc
index 9b2338a..8316871 100644
--- a/src/clients/cave/cmd_perform.cc
+++ b/src/clients/cave/cmd_perform.cc
@@ -398,7 +398,8 @@ PerformCommand::run(
value_for<n::fetch_parts>(parts),
value_for<n::ignore_unfetched>(cmdline.a_ignore_unfetched.specified()),
value_for<n::make_output_manager>(std::tr1::ref(output_manager_holder)),
- value_for<n::safe_resume>(true)
+ value_for<n::safe_resume>(true),
+ value_for<n::ignore_not_in_manifest>(false)
));
FetchAction fetch_action(options);
execute(env, cmdline, id, action, fetch_action);
@@ -415,7 +416,8 @@ PerformCommand::run(
value_for<n::fetch_parts>(parts),
value_for<n::ignore_unfetched>(cmdline.a_ignore_unfetched.specified()),
value_for<n::make_output_manager>(std::tr1::ref(output_manager_holder)),
- value_for<n::safe_resume>(true)
+ value_for<n::safe_resume>(true),
+ value_for<n::ignore_not_in_manifest>(false)
));
OurPretendFetchAction pretend_fetch_action(options);
execute(env, cmdline, id, action, pretend_fetch_action);