#2 small enhancements for multilib testing
Merged 6 years ago by jhutar. Opened 6 years ago by dcallagh.
dcallagh/rpmfluff multilib  into  master

file modified
+5 -3
@@ -1084,7 +1084,8 @@ 

                                 subpackageSuffix=None):

          """Add a simple source file to the sources, build it, and install it somewhere, using the given compilation flags"""

          sourceId = self.add_source(SourceFile(sourceFileName, sourceContent))

-         self.section_build += "gcc %s %s\n"%(compileFlags, sourceFileName)

+         self.section_build += "%if %{__isa_bits} == 32\n%define mopt -m32\n%endif\n"

+         self.section_build += "gcc %%{?mopt} %s %s\n"%(compileFlags, sourceFileName)

          if createParentDirs:

              self.create_parent_dirs(installPath)

          self.section_install += "cp a.out $RPM_BUILD_ROOT/%s\n"%installPath
@@ -1184,14 +1185,15 @@ 

          self.repoDir = tempfile.mkdtemp()

          self.rpmBuilds = rpmBuilds

  

-     def make(self, arch):

+     def make(self, *arches):

          # Build all the packages

          for pkg in self.rpmBuilds:

              pkg.make()

  

          # Now assemble into a yum repo:

          for pkg in self.rpmBuilds:

-             check_call(['cp', pkg.get_built_rpm(arch), self.repoDir])

+             for arch in arches:

+                 check_call(['cp', pkg.get_built_rpm(arch), self.repoDir])

  

          check_call(['createrepo', self.repoDir])

  

no initial comment

Pull-Request has been merged by jhutar

6 years ago

Would it be possible to have some test for this as well?

Fair point. I will try and whip something up.

Metadata