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

[Git][lintian/lintian][master] Don't re-check if python is in dependencies for every file



Title: GitLab

Louis-Philippe Véronneau pushed to branch master at lintian / lintian

Commits:

  • 6926e7c4
    by Timo Paulssen at 2024-10-08T21:50:34+00:00
    Don't re-check if python is in dependencies for every file
    

1 changed file:

Changes:

  • lib/Lintian/Check/Languages/Python/StdlibDeprecation.pm
    ... ... @@ -62,12 +62,6 @@ my %DEPRECATED_STDLIBS = (
    62 62
     sub visit_patched_files {
    
    63 63
         my ( $self, $item ) = @_;
    
    64 64
     
    
    65
    -    my $build_all = $self->processable->relation('Build-Depends-All');
    
    66
    -
    
    67
    -    # Skip if the package doesn't depend on python
    
    68
    -    return
    
    69
    -      unless $build_all->satisfies($PYTHON3_DEPEND);
    
    70
    -
    
    71 65
         # Skip if it's not a python file
    
    72 66
         return
    
    73 67
           unless $item->name =~ /\.py$/;
    
    ... ... @@ -76,6 +70,12 @@ sub visit_patched_files {
    76 70
         return
    
    77 71
           unless $item->is_open_ok;
    
    78 72
     
    
    73
    +    my $build_all = $self->processable->relation('Build-Depends-All');
    
    74
    +
    
    75
    +    # Skip if the package doesn't depend on python
    
    76
    +    return
    
    77
    +      unless $build_all->satisfies($PYTHON3_DEPEND);
    
    78
    +
    
    79 79
         open( my $fd, '<', $item->unpacked_path )
    
    80 80
           or die encode_utf8( 'Cannot open ' . $item->unpacked_path );
    
    81 81
     
    


  • Reply to: