aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Stephen P. Bennett <spb@exherbo.org> 2006-01-29 17:03:10 +0000
committerAvatar Stephen P. Bennett <spb@exherbo.org> 2006-01-29 17:03:10 +0000
commitde4bdd8833ae530818bce39db997fd78f027f26a (patch)
treec0d4e25363ef02260d309737bd8d363794cfd3a4
parent01bf0b6ffd6378992da93ba49e80aea03d325c4e (diff)
downloadpaludis-de4bdd8833ae530818bce39db997fd78f027f26a.tar.gz
paludis-de4bdd8833ae530818bce39db997fd78f027f26a.tar.xz
Added --dl-dont-ignore-the-frickin-patch-dep, defaulting off.
-rw-r--r--paludis/dep_list.cc12
-rw-r--r--paludis/dep_list.hh6
-rw-r--r--src/command_line.cc1
-rw-r--r--src/command_line.hh3
-rw-r--r--src/install.cc1
5 files changed, 22 insertions, 1 deletions
diff --git a/paludis/dep_list.cc b/paludis/dep_list.cc
index 4ab23a4..6297b56 100644
--- a/paludis/dep_list.cc
+++ b/paludis/dep_list.cc
@@ -111,6 +111,7 @@ namespace paludis
bool recursive_deps;
bool drop_circular;
bool drop_self_circular;
+ bool dont_ignore_patch_dep;
bool drop_all;
bool ignore_installed;
///}
@@ -131,6 +132,7 @@ namespace paludis
recursive_deps(true),
drop_circular(false),
drop_self_circular(false),
+ dont_ignore_patch_dep(false),
drop_all(false),
ignore_installed(false),
stack_depth(0),
@@ -301,7 +303,9 @@ DepList::visit(const PackageDepAtom * const p)
{
if (_implementation->drop_circular)
return;
- else if (_implementation->merge_list_insert_pos == i && _implementation->drop_self_circular)
+ else if (_implementation->merge_list_insert_pos == i &&
+ ( _implementation->drop_self_circular ||
+ (! _implementation->dont_ignore_patch_dep && p->package() == QualifiedPackageName("sys-devel/patch"))))
return;
else
throw CircularDependencyError(i, next(i));
@@ -604,6 +608,12 @@ DepList::set_drop_self_circular(const bool value)
}
void
+DepList::set_dont_ignore_patch_dep(const bool value)
+{
+ _implementation->dont_ignore_patch_dep = value;
+}
+
+void
DepList::set_drop_all(const bool value)
{
_implementation->drop_all = value;
diff --git a/paludis/dep_list.hh b/paludis/dep_list.hh
index 89f243d..9789b65 100644
--- a/paludis/dep_list.hh
+++ b/paludis/dep_list.hh
@@ -273,6 +273,12 @@ namespace paludis
void set_drop_self_circular(const bool value);
/**
+ * Behaviour: if set, don't ignore the stupid sys-devel/patch dep
+ * upon itself
+ */
+ void set_dont_ignore_patch_dep(const bool value);
+
+ /**
* Behaviour: if set, any circular dependencies are treated as if
* they do not exist.
*/
diff --git a/src/command_line.cc b/src/command_line.cc
index 92b2fac..3feb945 100644
--- a/src/command_line.cc
+++ b/src/command_line.cc
@@ -50,6 +50,7 @@ CommandLine::CommandLine() :
("as-needed", "To resolve circular dependencies"),
"as-needed"),
a_dl_drop_self_circular(&dl_args, "dl-drop-self-circular", '\0', "Drop self-circular dependencies"),
+ a_dl_patch_dep(&dl_args, "dl-dont-ignore-the-frickin-patch-dep", '\0', "Don't ignore the stupid patch depend on itself"),
a_dl_drop_circular(&dl_args, "dl-drop-circular", '\0', "Drop circular dependencies"),
a_dl_drop_all(&dl_args, "dl-drop-all", '0', "Drop all dependencies"),
a_dl_ignore_installed(&dl_args, "dl-ignore-installed", 'e', "Ignore installed packages"),
diff --git a/src/command_line.hh b/src/command_line.hh
index 3bf1715..e43ad52 100644
--- a/src/command_line.hh
+++ b/src/command_line.hh
@@ -125,6 +125,9 @@ class CommandLine :
/// --dl-drop-self-circular
paludis::args::SwitchArg a_dl_drop_self_circular;
+ /// --dl-dont-ignore-the-frickin-patch-dep
+ paludis::args::SwitchArg a_dl_patch_dep;
+
/// --dl-drop-circular
paludis::args::SwitchArg a_dl_drop_circular;
diff --git a/src/install.cc b/src/install.cc
index 265c4cd..46ca935 100644
--- a/src/install.cc
+++ b/src/install.cc
@@ -58,6 +58,7 @@ do_install()
p::DepList dep_list(env);
dep_list.set_drop_self_circular(CommandLine::get_instance()->a_dl_drop_self_circular.specified());
+ dep_list.set_dont_ignore_patch_dep(CommandLine::get_instance()->a_dl_patch_dep.specified());
dep_list.set_drop_circular(CommandLine::get_instance()->a_dl_drop_circular.specified());
dep_list.set_drop_all(CommandLine::get_instance()->a_dl_drop_all.specified());
dep_list.set_ignore_installed(CommandLine::get_instance()->a_dl_ignore_installed.specified());