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

[Git][lintian/lintian][master] Change regex for yaml parsing after appstreamcli output



Title: GitLab

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

Commits:

  • 7a2dbe28
    by Nilesh Patra at 2025-09-18T01:12:10+05:30
    Change regex for yaml parsing after appstreamcli output
    
    The "Passed: no" changed to strings with quotes around them
    
    The output changed to the following with appstream 1.1.0:
    
    ---
    {
      'File': 'appstream-metadata.metadata.xml',
      'Validator': '1.1.0',
      'Issues': [
        {
          'tag': 'developer-info-missing',
          'severity': 'info',
          'component': 'org.debian.lintian.check.appstream.udev',
          'explanation': 'This component contains no `developer` element with information about its author.'
        },
        {
          'tag': 'metainfo-filename-cid-mismatch',
          'severity': 'warning',
          'component': 'org.debian.lintian.check.appstream.udev',
          'explanation': 'The metainfo filename does not match the component ID.'
        }],
      'Passed': 'no'
    }
    
    It was this with appstream 1.0.6-2:
    
    ---
    File: appstream-metadata.metadata.xml
    Validator: 1.0.5
    Issues:
    - tag: developer-info-missing
      severity: info
      component: org.debian.lintian.check.appstream.udev
      explanation: >-
        This component contains no `developer` element with information about its author.
    - tag: metainfo-filename-cid-mismatch
      severity: warning
      component: org.debian.lintian.check.appstream.udev
      explanation: >-
        The metainfo filename does not match the component ID.
    Passed: no
    

1 changed file:

Changes:

  • lib/Lintian/Check/AppstreamMetadata.pm
    ... ... @@ -88,7 +88,7 @@ sub installable {
    88 88
                 system('appstreamcli', 'validate-tree', '--format=yaml',
    
    89 89
                     '--no-net', $basedir);
    
    90 90
             };
    
    91
    -        if ($output =~ m/Passed: no/) {
    
    91
    +        if ($output =~ m/'?Passed'?: '?no'?/) {
    
    92 92
                 my @yaml = YAML::XS::Load($output);
    
    93 93
                 die
    
    94 94
                   unless @yaml;
    


  • Reply to: