[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SCM] Debian package checker branch, master, updated. 2.2.6-29-g8083cda



"Adam D. Barratt" <adam@adam-barratt.org.uk> writes:

> @@ -336,9 +336,9 @@ foreach my $file (sort keys %{$info->index}) {
>  	    if (defined $info->field('pre-depends')) {
>  		$pre_depends = $info->field('pre-depends');
>  	    }
> -	    $pre_depends = Dep::parse($pre_depends);
> +	    $pre_depends = Lintian::Relation->new($pre_depends);
>  	    tag "file-in-usr-something-x11-without-pre-depends", "$file"
> -		unless Dep::implies($pre_depends, Dep::parse('x11-common (>= 1:7.0.0)'));
> +		unless $pre_depends->implies('x11-common (>= 1:7.0.0)');
>  
>  	    # Always set this so that we don't redo the check, even if we
>  	    # didn't warn.  If the first instance didn't warn, none will.

You should be able to simplify that even further now to:

tag 'file-in-usr-something-x11-without-pre-depends', $file
    unless $info->relation('pre-depends')->implies('x11-common (>= 1:7.0.0)');

relation() returns a Lintian::Relation object, so you don't have to
construct your own.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: