a435fd5 gather: Add all srpms to variant lookaside repo

Authored and Committed by lsedlar 2 years ago
    gather: Add all srpms to variant lookaside repo
    
    The original code could cause a source RPM to be present in two variants
    that have a dependency relation.
    
    There is always only one source repo for a variant in the final compose.
    When gathering packages for a variant that depends on another variant,
    we need to build a temporary lookaside repo that has similar content to
    the parent variant. This lookaside only contained source RPMs for
    packages present the the architecture.
    
    This could result in duplicated SRPMs in the compose.
    
    Example situation:
    
     * Variant B depends on variant A.
     * A contains foo.x86_64.rpm (only on x86_64)
     * B pulls in subpackage foo-bar.s390x.rpm (on s390x)
    
    Source repo for A will correctly contain foo.src.rpm. With original code
    the srpm would also end up in B.src. By adding all sources to the
    temporary lookaside Pungi will know that source repo for B doesn't need
    to duplicate the package.
    
    The refactoring to use a set to store the packages is meant to avoid
    listing the same SRPM multiple times in the repo in the most common
    situation when SRPM is listed in multiple architectures.
    
    JIRA: RHELCMP-6002
    Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
    
        
  • jenkins
    success (100%)
    Build #1614 successful (commit: a435fd58)
    2 years ago