#955 Fix MSE for self-buildrequiring modules
Merged 10 months ago by mprahl. Opened 10 months ago by mizdebsk.
mizdebsk/fm-orchestrator fix-954  into  master

@@ -297,9 +297,13 @@ 

  

          # Get the values for dependencies_id, self_nsvca and req_name_stream variables.

          for nsvca in requires:

-             req_name, req_stream, _ = nsvca.split(":", 2)

-             if req_name == current_mmd.get_name() and req_stream == current_mmd.get_stream():

-                 dependencies_id = int(nsvca.split(":")[3])

+             req_name, req_stream, _, req_context, req_arch = nsvca.split(":")

+             if req_arch == 'src':

+                 assert req_name == current_mmd.get_name()

+                 assert req_stream == current_mmd.get_stream()

+                 assert dependencies_id is None

+                 assert self_nsvca is None

+                 dependencies_id = int(req_context)

                  self_nsvca = nsvca

                  continue

              req_name_stream[req_name] = req_stream

@@ -137,6 +137,7 @@ 

          self._make_module("foo:2:0:c5", {"platform": ["f29"]}, {})

          self._make_module("platform:f28:0:c10", {}, {})

          self._make_module("platform:f29:0:c11", {}, {})

+         self._make_module("app:1:0:c6", {"platform": ["f29"]}, {})

  

      def test_generate_expanded_mmds_context(self):

          self._generate_default_modules()

@@ -206,6 +207,14 @@ 

               set([

                   frozenset(['gtk:1'])

               ])),

+ 

+             ({}, {"app": ["1"]}, False,

+              set([

+                  frozenset(['app:1:0:c6', 'platform:f29:0:c11'])

+              ]),

+              set([

+                  frozenset([])

+              ])),

          ])

      def test_generate_expanded_mmds_buildrequires(

              self, requires, build_requires, stream_ambigous, expected_xmd,

We can't rely on matching name-stream to distinguish which module is currently being built as modules can buildrequire older versions of the same module-stream.

Fixes #954

2 new commits added

  • Fix MSE for self-buildrequiring modules
  • Add reproducer for #954
10 months ago

+1

I confirmed the tests pass locally. Thanks for the PR and the reproducer.

Pull-Request has been merged by mprahl

10 months ago