5a3f541 Group images to deduplicate also according to their repositories.

Authored and Committed by jkaluza 4 years ago
    Group images to deduplicate also according to their repositories.
    
    There is an situation when images with the same name-version but
    different release and in the completely different repositories.
    For example, foo-1-1 is built against fedora-28, foo-1-2 is built
    against fedora-29.
    
    Current Freshmaker deduplication code replaces foo-1-1 with foo-1-2,
    because the Release is higher, but this is wrong, because both images
    live in different container repositories and are "unrelated".
    
    This commit fixes this by grouping images not only by name-version,
    but also by the sorted list of the repositories the images are in.
    
    Thanks to that, foo-1-1 won't be treated as older release of foo-1-2,
    because they repositories do not match.
    
        
file modified
+22 -18
file modified
+61 -0