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

[Git][lintian/lintian][bts_1110969] 5 commits: Bump the uses-debhelper-compat-file tag from pedantic to warning



Title: GitLab

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

Commits:

  • a88b2fea
    by Louis-Philippe Véronneau at 2025-09-08T13:16:25+00:00
    Bump the uses-debhelper-compat-file tag from pedantic to warning
    
    The debhelper-compat virtual package has been available for a long time
    now and is the recommended way to set the debhelper compat level.
    
    Having multiple concurrent ways to set this value is confusing and makes
    it way harder to do QA consistently.
    
  • 74c4efd5
    by Louis-Philippe Véronneau at 2025-09-08T13:16:25+00:00
    rework the uses-debhelper-compat-file tag message and add mention of breakage in dh14
    
  • 2673c1de
    by Louis-Philippe Véronneau at 2025-09-08T13:18:35+00:00
    Try to decode font file using utf8 if it fails with cp1252.
    
    Some font files are not cp1252 (for example latex-cjk-chinese-arphic-gbsn00lp),
    which crashed the test.
    
    Closes: #1110969
    
  • fada7a62
    by Louis-Philippe Véronneau at 2025-09-08T13:18:35+00:00
    add missing space
    
  • b59ab77a
    by Louis-Philippe Véronneau at 2025-09-08T13:18:35+00:00
    use try-catch again instead of eval, not to fail silently
    

3 changed files:

Changes:

  • lib/Lintian/Check/Fonts/Postscript/Type1.pm
    ... ... @@ -50,14 +50,24 @@ sub visit_installed_files {
    50 50
     
    
    51 51
         my @command = ('t1disasm', $item->unpacked_path);
    
    52 52
         my $bytes = safe_qx(@command);
    
    53
    +    my $enc_warning = 'In file ' . $item->name . $COLON . $SPACE;
    
    53 54
     
    
    54 55
         my $output;
    
    55 56
         try {
    
    56 57
             # iso-8859-1 works too, but the Font 1 standard could be older
    
    57 58
             $output = decode('cp1252', $bytes, Encode::FB_CROAK);
    
    58 59
     
    
    59
    -    } catch {
    
    60
    -        die 'In file ' . $item->name . $COLON . $SPACE . $@;
    
    60
    +    } catch ($e) {
    
    61
    +        if ($e =~ m{^cp1252 "\\x81" does not map to Unicode at .+}) {
    
    62
    +            try {
    
    63
    +                # sometimes, the file is utf8
    
    64
    +                $output = decode('utf8', $bytes, Encode::FB_CROAK);
    
    65
    +            } catch {
    
    66
    +                die $enc_warning . $@;
    
    67
    +            }
    
    68
    +        } else {
    
    69
    +            die $enc_warning . $@;
    
    70
    +        }
    
    61 71
         }
    
    62 72
     
    
    63 73
         my @lines = split(/\n/, $output);
    

  • t/recipes/runner-features/runtests-options/eval/literal
    ... ... @@ -2,4 +2,4 @@ E: runtests-options source: invalid-standards-version 1.2.3
    2 2
     E: runtests-options: new-essential-package
    
    3 3
     W: runtests-options: empty-binary-package
    
    4 4
     W: runtests-options source: no-versioned-debhelper-prerequisite 13
    
    5
    -P: runtests-options source: uses-debhelper-compat-file [debian/compat]
    5
    +W: runtests-options source: uses-debhelper-compat-file [debian/compat]

  • tags/u/uses-debhelper-compat-file.tag
    1 1
     Tag: uses-debhelper-compat-file
    
    2
    -Severity: pedantic
    
    2
    +Severity: warning
    
    3 3
     Check: debhelper
    
    4
    -Explanation: This package uses a <code>debian/compat</code> file to denote the
    
    5
    - required debhelper compatibility number.
    
    4
    +Explanation: This package declares its debhelper compatibility level with the
    
    5
    + <code>debian/compat</code> file.
    
    6 6
      .
    
    7
    - However, debhelper has replaced <code>debian/compat</code> with the
    
    8
    - <code>debhelper-compat</code> virtual package for most circumstances.
    
    7
    + The recommended way to do so is to use the virtual package
    
    8
    + <code>debhelper-compat</code> instead.
    
    9 9
      .
    
    10
    - Packages not using an experimental or beta compatibility level should
    
    11
    - Build-Depend on the <code>debhelper-compat</code> virtual package, for
    
    10
    + From debhelper 14 onward, using <code>debian/compat</code> will not work
    
    11
    + anymore.
    
    12
    + .
    
    13
    + As such, unless you need an experimental or beta compatibility level, please
    
    14
    + remove the <code>debian/compat</code> file and add the
    
    15
    + <code>debhelper-compat</code> virtual package to your Build-Depends, for
    
    12 16
      example:
    
    13 17
      .
    
    14 18
       Build-Depends: debhelper-compat (= 13)
    


  • Reply to: