fe0640e Support Virtual Streams in MMDResolver.

Authored and Committed by jkaluza 5 years ago
    Support Virtual Streams in MMDResolver.
    
    Modularity team needs to be able to define multiple streams for single "platform"
    module. They need it to express that "platform:el8.1.0" also provides "platform:el8".
    
    This needs changes in a way how MMDResolver resolves dependencies between modules.
    
    For example, if we are building module against platform:el8.1.0, the MMDResolver must
    not return buildrequired module built against platform > el8.1.0, but it can for example
    return (cherry-pick) buildrequired module from platform:el8.0.0 if there is no such
    module built for platform:el8.1.0.
    
    The way how it is implemented is following:
    
      - MMDResolver reads list of virtual streams from xmd["mbs"]["virtual_streams"] when
        creating Solvable from MMD and adds additional Provides for these virtual streams.
        We expect these to be set mainly on base modules. The versions of such provides
        are based on "stream version" number, so we can compare them.
      - The base module ("platform") buildrequires of MMDs added to MMDResolver are overriden
        to mark particular platform "stream version". For example, if module "foo" buildrequires
        "platform:el8" in MMD file, but was in fact built against platform:el8.1.0, it will
        be treated as if it would really buildrequire "platform:el8.1.0". This is needed
        to not include buildrequired modules built against newer platform than what we want.
      - MMDResolver resolves all the valid combinations of buildrequires, but we are only
        interested in the one with latest versions of buildrequired module. Therefore the
        solve() method is changed to find out combinations which have the latest versions
        for each alternative name:stream buildrequires.
    
        
file modified
+99 -1