aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Kim Højgaard-Hansen <kimrhh@exherbo.org> 2009-10-22 20:54:27 +0200
committerAvatar Bo Ørsted Andresen <bo.andresen@zlin.dk> 2009-10-30 20:45:24 +0000
commit66174e086793bc71000103a5aad74ef7e2bcfa81 (patch)
tree3866379601ce1e3613aca24ee58c4ade5e339721
parent58230e98675841fad704e5c14801cb8793a539fd (diff)
downloadpaludis-66174e086793bc71000103a5aad74ef7e2bcfa81.tar.gz
paludis-66174e086793bc71000103a5aad74ef7e2bcfa81.tar.xz
add fetch_regulars_only to make it possible to avoid fetching -scm
-rw-r--r--doc/api/cplusplus/examples/example_action.cc1
-rw-r--r--paludis/action.hh10
-rw-r--r--paludis/install_task.cc2
-rw-r--r--paludis/repositories/e/e_repository_TEST.cc2
-rw-r--r--paludis/repositories/e/ebuild_entries.cc4
-rw-r--r--python/action.cc1
-rw-r--r--ruby/action.cc1
-rw-r--r--src/clients/accerso/accerso.cc5
-rw-r--r--src/clients/appareo/appareo.cc1
-rw-r--r--src/clients/cave/cmd_perform.cc2
10 files changed, 26 insertions, 3 deletions
diff --git a/doc/api/cplusplus/examples/example_action.cc b/doc/api/cplusplus/examples/example_action.cc
index 69a52f1..bb78116 100644
--- a/doc/api/cplusplus/examples/example_action.cc
+++ b/doc/api/cplusplus/examples/example_action.cc
@@ -79,6 +79,7 @@ int main(int argc, char * argv[])
FetchAction fetch_action(make_named_values<FetchActionOptions>(
value_for<n::errors>(failures),
value_for<n::exclude_unmirrorable>(false),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(false),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
diff --git a/paludis/action.hh b/paludis/action.hh
index 814f464..059bada 100644
--- a/paludis/action.hh
+++ b/paludis/action.hh
@@ -54,6 +54,7 @@ namespace paludis
struct exclude_unmirrorable;
struct failed_automatic_fetching;
struct failed_integrity_checks;
+ struct fetch_regulars_only;
struct fetch_unneeded;
struct if_for_install_id;
struct ignore_for_unmerge;
@@ -88,6 +89,15 @@ namespace paludis
*/
NamedValue<n::exclude_unmirrorable, bool> exclude_unmirrorable;
+ /**
+ * Avoid fetching for non-regular packages like -scm
+ * \since 0.43
+ */
+ NamedValue<n::fetch_regulars_only, bool> fetch_regulars_only;
+
+ /**
+ * Fetch things in non-enabled flag? () blocks
+ */
NamedValue<n::fetch_unneeded, bool> fetch_unneeded;
/**
diff --git a/paludis/install_task.cc b/paludis/install_task.cc
index 5d372ff..25251fd 100644
--- a/paludis/install_task.cc
+++ b/paludis/install_task.cc
@@ -742,6 +742,7 @@ InstallTask::_pretend()
FetchActionOptions options(make_named_values<FetchActionOptions>(
value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(false),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(false),
value_for<n::ignore_unfetched>(true),
value_for<n::make_output_manager>(std::tr1::ref(output_manager_holder)),
@@ -1906,6 +1907,7 @@ InstallTask::make_fetch_action_options(const DepListEntry &, OutputManagerFromEn
return make_named_values<FetchActionOptions>(
value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(false),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(false),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(std::tr1::ref(o)),
diff --git a/paludis/repositories/e/e_repository_TEST.cc b/paludis/repositories/e/e_repository_TEST.cc
index f9ed7d5..c5f613b 100644
--- a/paludis/repositories/e/e_repository_TEST.cc
+++ b/paludis/repositories/e/e_repository_TEST.cc
@@ -948,6 +948,7 @@ namespace test_cases
FetchAction action(make_named_values<FetchActionOptions>(
value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(false),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(false),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
@@ -1055,6 +1056,7 @@ namespace test_cases
FetchAction action(make_named_values<FetchActionOptions>(
value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(false),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(false),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
diff --git a/paludis/repositories/e/ebuild_entries.cc b/paludis/repositories/e/ebuild_entries.cc
index 2d23407..b11b856 100644
--- a/paludis/repositories/e/ebuild_entries.cc
+++ b/paludis/repositories/e/ebuild_entries.cc
@@ -458,8 +458,8 @@ EbuildEntries::fetch(const std::tr1::shared_ptr<const ERepositoryID> & id,
id->fetches_key()->value()->root()->accept(c);
}
- if ((c.need_nofetch()) ||
- ((! fetch_action.options.ignore_unfetched()) && (! id->eapi()->supported()->ebuild_phases()->ebuild_fetch_extra().empty())))
+ if ( (! fetch_action.options.fetch_regulars_only()) && ((c.need_nofetch()) ||
+ ((! fetch_action.options.ignore_unfetched()) && (! id->eapi()->supported()->ebuild_phases()->ebuild_fetch_extra().empty()))))
{
bool userpriv_ok((! userpriv_restrict) && (_imp->environment->reduced_gid() != getgid()) &&
check_userpriv(FSEntry(_imp->params.builddir()), _imp->environment,
diff --git a/python/action.cc b/python/action.cc
index c3b4255..53ef9d6 100644
--- a/python/action.cc
+++ b/python/action.cc
@@ -126,6 +126,7 @@ namespace
return new FetchActionOptions(make_named_values<FetchActionOptions>(
value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(exclude_unmirrorable),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(fetch_unneeded),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
diff --git a/ruby/action.cc b/ruby/action.cc
index 8f1dbed..04d86d9 100644
--- a/ruby/action.cc
+++ b/ruby/action.cc
@@ -251,6 +251,7 @@ namespace
ptr = new FetchActionOptions(make_named_values<FetchActionOptions>(
value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(v_exclude_unmirrorable),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(v_fetch_unneeded),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
diff --git a/src/clients/accerso/accerso.cc b/src/clients/accerso/accerso.cc
index 116974f..8e808a8 100644
--- a/src/clients/accerso/accerso.cc
+++ b/src/clients/accerso/accerso.cc
@@ -144,6 +144,7 @@ main(int argc, char *argv[])
FetchAction a(make_named_values<FetchActionOptions>(
value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(true),
+ value_for<n::fetch_regulars_only>(true),
value_for<n::fetch_unneeded>(true),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(std::tr1::ref(output_manager_holder)),
@@ -165,7 +166,9 @@ main(int argc, char *argv[])
catch (const ActionFailedError & e)
{
if (a.options.errors()->empty())
- results.insert(std::make_pair(*i, "Unknown fetch error"));
+ {
+ results.insert(std::make_pair(*i, e.message()));
+ }
for (Sequence<FetchActionFailure>::ConstIterator f(a.options.errors()->begin()),
f_end(a.options.errors()->end()) ; f != f_end ; ++f)
diff --git a/src/clients/appareo/appareo.cc b/src/clients/appareo/appareo.cc
index 44b77de..ceb2064 100644
--- a/src/clients/appareo/appareo.cc
+++ b/src/clients/appareo/appareo.cc
@@ -105,6 +105,7 @@ namespace
FetchAction a(make_named_values<FetchActionOptions>(
value_for<n::errors>(failures),
value_for<n::exclude_unmirrorable>(false),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(true),
value_for<n::ignore_unfetched>(false),
value_for<n::make_output_manager>(&make_standard_output_manager),
diff --git a/src/clients/cave/cmd_perform.cc b/src/clients/cave/cmd_perform.cc
index f02ca44..d17a8dd 100644
--- a/src/clients/cave/cmd_perform.cc
+++ b/src/clients/cave/cmd_perform.cc
@@ -323,6 +323,7 @@ PerformCommand::run(
FetchActionOptions options(make_named_values<FetchActionOptions>(
value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(cmdline.a_exclude_unmirrorable.specified()),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(cmdline.a_fetch_unneeded.specified()),
value_for<n::ignore_unfetched>(cmdline.a_ignore_unfetched.specified()),
value_for<n::make_output_manager>(std::tr1::ref(output_manager_holder)),
@@ -340,6 +341,7 @@ PerformCommand::run(
FetchActionOptions options(make_named_values<FetchActionOptions>(
value_for<n::errors>(make_shared_ptr(new Sequence<FetchActionFailure>)),
value_for<n::exclude_unmirrorable>(cmdline.a_exclude_unmirrorable.specified()),
+ value_for<n::fetch_regulars_only>(false),
value_for<n::fetch_unneeded>(cmdline.a_fetch_unneeded.specified()),
value_for<n::ignore_unfetched>(cmdline.a_ignore_unfetched.specified()),
value_for<n::make_output_manager>(std::tr1::ref(output_manager_holder)),