780ed11 Find compatible base modules based on the virtual streams.

Authored and Committed by jkaluza 5 years ago
    Find compatible base modules based on the virtual streams.
    
    Before this commit, the compatible base modules for Module Stream Expansion
    have been found without any limitation, just based on the stream version.
    It was therefore possible that `platform:lp29.0.0` was found as compatible
    module for `platform:f29.1.0` although those platform streams are not
    compatible at all.
    
    In this commit, the module can be treated as compatible only if it has
    the same virtual stream as the input module. The idea behind this
    is that both `platform:f29.0.0` and `platform:f29.1.0` should include
    the `virtual_streams: [f29]` in their XMD section which tells MBS
    that they are actually compatible. The `lp29` stream will not
    have the same virtual stream (most likely it won't have any virtual
    stream at all).
    
    The `virtual_streams` is already used for this use-case in `MMDResolver`,
    but it was not used to limit the inputs to `MMDResolver` which is what
    this commit is doing.
    
    This commit also fixes the issue in `get_last_builds_in_stream_version_lte`
    which was simply broken if multiple stream_versions of single base module
    existed and their builds had different version. In this case, only
    builds with single (randomly chosen) version were returned.
    
        
file modified
+27 -15
file modified
+12 -1