#1054 Include also 'src' RPMs in the final RPMs list.
Merged 5 years ago by jkaluza. Opened 5 years ago by jkaluza.
jkaluza/fm-orchestrator cg-fix  into  master

@@ -468,8 +468,9 @@ 

              # Filter out RPMs which will never end up in final modulemd:

              # - the architecture of an RPM is not multilib architecture for `arch`.

              # - the architecture of an RPM is not the final mmd architecture.

-             # - the architecture of an RPM is not "noarch".

-             if rpm["arch"] not in multilib_arches and rpm["arch"] not in [arch, "noarch"]:

+             # - the architecture of an RPM is not "noarch" or "src".

+             if (rpm["arch"] not in multilib_arches and

+                     rpm["arch"] not in [arch, "noarch", "src"]):

                  continue

  

              srpm = rpm["srpm_name"]

@@ -433,9 +433,11 @@ 

          self._add_test_rpm("dhcp-libs-12:4.3.5-5.module_2118aef6.x86_64", "dhcp")

          self._add_test_rpm("dhcp-libs-12:4.3.5-5.module_2118aef6.i686", "dhcp")

          self._add_test_rpm("dhcp-libs-12:4.3.5-5.module_2118aef6.s390x", "dhcp")

+         self._add_test_rpm("dhcp-libs-12:4.3.5-5.module_2118aef6.src", "dhcp")

          self._add_test_rpm("perl-Tangerine-12:4.3.5-5.module_2118aef6.x86_64", "perl-Tangerine")

          self._add_test_rpm("perl-Tangerine-12:4.3.5-5.module_2118aef6.i686", "perl-Tangerine")

          self._add_test_rpm("perl-Tangerine-12:4.3.5-5.module_2118aef6.s390x", "perl-Tangerine")

+         self._add_test_rpm("perl-Tangerine-12:4.3.5-5.module_2118aef6.src", "perl-Tangerine")

  

          mmd = self.cg.module.mmd()

          mmd = self.cg._fill_in_rpms_list(mmd, "x86_64")
@@ -443,7 +445,9 @@ 

          # Only x86_64 packages should be filled in, because we requested x86_64 arch.

          assert set(mmd.get_rpm_artifacts().get()) == set([

              "dhcp-libs-12:4.3.5-5.module_2118aef6.x86_64",

-             "perl-Tangerine-12:4.3.5-5.module_2118aef6.x86_64"])

+             "dhcp-libs-12:4.3.5-5.module_2118aef6.src",

+             "perl-Tangerine-12:4.3.5-5.module_2118aef6.x86_64",

+             "perl-Tangerine-12:4.3.5-5.module_2118aef6.src"])

  

      def test_fill_in_rpms_exclusivearch(self):

          self._add_test_rpm("dhcp-libs-12:4.3.5-5.module_2118aef6.noarch", "dhcp",

This fixes regression introduced in previous bcb104a commit.

Looks good to me :thumbsup:

Pull-Request has been merged by jkaluza

5 years ago