summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Dumont <dod@debian.org>2019-11-26 13:06:22 +0100
committerDominique Dumont <dod@debian.org>2019-11-28 15:42:33 +0100
commitdba2161154607790158627b8dac042346fb90946 (patch)
treec1ebb68e96e89bf031637c2623cf79f38f49bc62
parent06b1671e7c801d9bc967f9d630cd3cfcee987918 (diff)
Dependency: skip check when check param is 'no'
this avoid deep recursion when a check on a value requires reading other values.
-rw-r--r--lib/Config/Model/Dpkg/Dependency.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Config/Model/Dpkg/Dependency.pm b/lib/Config/Model/Dpkg/Dependency.pm
index 573977ee..65d53091 100644
--- a/lib/Config/Model/Dpkg/Dependency.pm
+++ b/lib/Config/Model/Dpkg/Dependency.pm
@@ -336,6 +336,8 @@ sub check_dependency {
my ($value, $check, $silent, $notify_change, $ok, $apply_fix)
= @args{qw/value check silent notify_change ok fix/} ;
+ return ($ok, $value) if defined $check and $check eq 'no';
+
# value is one dependency, something like "perl ( >= 1.508 )"
# or exim | mail-transport-agent or gnumach-dev [hurd-i386]