5acfb90 createrepo: handle missing product ids scm dir

Authored and Committed by ktdreyer 6 years ago
    createrepo: handle missing product ids scm dir
    
    Prior to this change, if the entire product IDs SCM directory was missing, pungi would crash with an error.
    
    For example, if "ceph-3" was missing from the SCM:
    
        OSError: [Errno 2] No such file or directory: '/tmp/tmpMb9O6r/product_ids/ceph-3'
    
    This occurred even if product_id_allow_missing was set to True.
    
    Make product_id_allow_missing cover this case as well, and gracefully
    skip all product IDs.
    
    We now see the following warning in the logs instead:
    
        [WARNING ] No product IDs in {'scm': 'git', 'repo': 'git://example.com/rcm/rcm-metadata.git', 'dir': 'product_ids/ceph-3'}
    
    and the compose succeeds.
    
    Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
    
        
file modified
+8 -1