#65 Fix how the command is run in the mock chroot
Merged 4 years ago by pingou. Opened 4 years ago by nphilipp.
fedora-infra/ nphilipp/rpmautospec master--mock-shell-args  into  master

@@ -64,14 +64,7 @@ 

  

      srcdir_within = buildroot.path_without_to_within(srcdir)

      buildroot.mock(

-         [

-             "--shell",

-             "rpmautospec",

-             "--debug",

-             "process-distgit",

-             "--process-specfile",

-             srcdir_within,

-         ]

+         ["--shell", f"rpmautospec --debug process-distgit --process-specfile {srcdir_within}"]

      )

  

      # Restore log level of the buildroot logger

@@ -122,10 +122,6 @@ 

  

          mock_args = [

              "--shell",

-             "rpmautospec",

-             "--debug",

-             "process-distgit",

-             "--process-specfile",

-             srcdir_within,

+             f"rpmautospec --debug process-distgit --process-specfile {srcdir_within}",

          ]

          buildroot.mock.assert_called_with(mock_args)

The "mock --shell" command expects the command to be run in the chroot
as one argument, anything beyond will be interpreted as additional
arguments to the mock command.

Signed-off-by: Nils Philippsen nils@redhat.com

Pull-Request has been merged by pingou

4 years ago