otaylor / rpkg

Forked from rpkg 5 years ago
Clone

ded77b0 lint: Avoid checking rpm's multiple times

Authored and Committed by tmz 6 years ago
    lint: Avoid checking rpm's multiple times
    
    When using the lint command, the rpm list includes duplicate packages
    which are then checked via rpmlint multiple times.
    
    Simplify the listing of rpm files using `glob` rather than looping over
    `os.listdir()`.  Use `set` rather than `list` to ensure there are no
    duplicates in the rpms or arches lists.  Sort the rpms when calling
    rpmlint for consistent ordering across lint runs.
    
    Thanks to Lubomír Sedlář for providing the tests.
    
    Helped-by: Lubomír Sedlář <lsedlar@redhat.com>
    Signed-off-by: Todd Zullinger <tmz@pobox.com>
    
        
file modified
+4 -7
file modified
+35 -0