Add utility functions for OS/version matching and process execution.

Review Request #7724 — Created Oct. 21, 2015 and submitted

Information

rbpkg
master

Reviewers

This introduces a few utility functions that will be used for lookup of
packages and invocation of package managers.

matches_current_system() compares a list of system specifiers (OS/distro
name and optional version range) with the current system, returning a
boolean indicating if any of them match.

matches_version_range() compares a version with a version specifier,
returning a boolean indicating if it matches that range. It can also
optionally verify the name used in that version specifier.

execute() executes external processes, returning the results.

Unit tests pass.

Used these in testing.

reviewbot
  1. Tool: Pyflakes
    Processed Files:
        rbpkg/utils/errors.py
        rbpkg/utils/tests/test_matches.py
        rbpkg/utils/matches.py
        rbpkg/utils/process.py
    
    Ignored Files:
        rbpkg/utils/tests/__init__.py
        rbpkg/utils/__init__.py
    
    
    
    Tool: PEP8 Style Checker
    Processed Files:
        rbpkg/utils/errors.py
        rbpkg/utils/tests/test_matches.py
        rbpkg/utils/matches.py
        rbpkg/utils/process.py
    
    Ignored Files:
        rbpkg/utils/tests/__init__.py
        rbpkg/utils/__init__.py
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed
Status:
Completed
Change Summary:
Pushed to master (cf682ec)