#1024 Set modulemd 'arch' field in arch-specific modulemd files imported to CG build.
Merged 5 years ago by jkaluza. Opened 5 years ago by jkaluza.
jkaluza/fm-orchestrator mms-arch-field  into  master

@@ -20,6 +20,7 @@ 

  # SOFTWARE.

  #

  # Written by Stanislav Ochotnicky <sochotnicky@redhat.com>

+ #            Jan Kaluza <jkaluza@redhat.com>

  

  

  import calendar
@@ -546,6 +547,8 @@ 

          :return: Finalized modulemd string.

          """

          mmd = self.module.mmd()

+         # Set the "Arch" field in mmd.

+         mmd.set_arch(pungi.arch.tree_arch_to_yum_arch(arch))

          # Fill in the list of built RPMs.

          mmd = self._fill_in_rpms_list(mmd, arch)

  

@@ -180,10 +180,10 @@ 

              assert len(mmd.read()) == 1134

  

          with open(path.join(dir_path, "modulemd.x86_64.txt")) as mmd:

-             assert len(mmd.read()) == 242

+             assert len(mmd.read()) == 257

  

          with open(path.join(dir_path, "modulemd.i686.txt")) as mmd:

-             assert len(mmd.read()) == 242

+             assert len(mmd.read()) == 255

  

      @patch("module_build_service.builder.KojiContentGenerator.get_session")

      def test_tag_cg_build(self, get_session):

This is the same way as architecture is currently set in Pungi code.

Tests failed, because https://kojipkgs.fedoraproject.org/repos-dist/epel7Server-infra/ is empty. Already asked on #fedora-noc to regenerate that repo...

:+1:, assuming tests are fine.

Pull-Request has been merged by jkaluza

5 years ago