This is an automated email from the git hooks/post-receive script. dod pushed a commit to branch master in repository libconfig-model-dpkg-perl.
commit abcba8f0932715d0ac2ef43482339a5b7ecce3fe Author: Dominique Dumont <d...@debian.org> Date: Wed Jul 8 21:12:47 2015 +0200 Dpkg dependency: make sure that debhelper shows a warning when compat is increased .. this bug showed up in interactive mode (with the GUI): after an increase of compat value, the versioned dependency of debhelper must also be increased. This did not happen in interactive mode: the GUI did not show a warning after an update. This is now fixed by registering debhelper object as a dependency of compat object. This way, notify_change is called on debhelper any time compat is updated, which triggers the relevant check and warnings. --- lib/Config/Model/Dpkg/Dependency.pm | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/lib/Config/Model/Dpkg/Dependency.pm b/lib/Config/Model/Dpkg/Dependency.pm index 653769f..8b4a186 100644 --- a/lib/Config/Model/Dpkg/Dependency.pm +++ b/lib/Config/Model/Dpkg/Dependency.pm @@ -339,28 +339,35 @@ sub check_debhelper_version { my $lintian_dep = Lintian::Relation->new( $dep_string ) ; $logger->debug("checking '$dep_string' with lintian"); - # using mode loose because debian-control model can be used alone - # and compat is outside of debian-control - my $compat = $self->grab_value(mode => 'loose', step => "!Dpkg compat") ; - return unless defined $compat ; + # try to create compat_obj, but do not try twice (hence the exists test) + if (not exists $self->{_compat_obj} ) { + # using mode loose because debian-control model can be used alone + # and compat is outside of debian-control + my $c = $self->{_compat_obj} = $self->grab(mode => 'loose', step => "!Dpkg compat") ; + $c->register_dependency($self) if defined $c; + } + + return unless defined $self->{_compat_obj}; + + my $compat_value = $self->{_compat_obj}->fetch; - my $min_dep = Lintian::Relation->new("debhelper ( >= $compat)") ; + my $min_dep = Lintian::Relation->new("debhelper ( >= $compat_value)") ; $logger->debug("checking if ".$lintian_dep->unparse." implies ". $min_dep->unparse); return if $lintian_dep->implies ($min_dep) ; - $logger->debug("'$dep_string' does not imply debhelper >= $compat"); + $logger->debug("'$dep_string' does not imply debhelper >= $compat_value"); # $show_rel avoids undef warnings my $show_rel = join(' ', map { $_ || ''} ($oper, $dep_v)); if ($apply_fix) { - @$depend = ( 'debhelper', '>=', $compat ) ; # notify_change called in check_value + @$depend = ( 'debhelper', '>=', $compat_value ) ; # notify_change called in check_value $logger->info("fixed debhelper dependency from " - ."$dep_name $show_rel -> ".$min_dep->unparse." (for compat $compat)"); + ."$dep_name $show_rel -> ".$min_dep->unparse." (for compat $compat_value)"); } else { $self->{nb_of_fixes}++ ; - my $msg = "should be (>= $compat) not ($show_rel) because compat is $compat" ; + my $msg = "should be (>= $compat_value) not ($show_rel) because compat is $compat_value" ; $self->add_warning( $msg ); $logger->info("will warn: $msg (fix++)"); } -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits