#601 Fix SRPM localization when using `*pkg --path build --srpm --scratch`
Merged 2 years ago by onosek. Opened 2 years ago by drumian.
drumian/rpkg Issue_RHELCMP-6875  into  master

file modified
+1
@@ -1872,6 +1872,7 @@ 

                  self.log.debug('Generating an srpm')

                  self.srpm()

                  self.args.srpm = '%s.src.rpm' % self.cmd.nvr

+                 self.args.srpm = os.path.join(self.args.path, self.args.srpm)

              return self._upload_file_for_build(self.args.srpm)

  

      def _watch_build_tasks(self, task_ids):

file modified
+2 -1
@@ -3519,7 +3519,8 @@ 

          srpm_file, unique_path = args

  

          if expected_srpm_file is None:

-             self.assertEqual('{0}.src.rpm'.format(cli.cmd.nvr), srpm_file)

+             self.assertEqual('{0}.src.rpm'.format(os.path.join(cli.cmd.path, cli.cmd.nvr)),

+                              srpm_file)

          else:

              self.assertEqual(expected_srpm_file, srpm_file)

          six.assertRegex(self, unique_path, r'^cli-build/\d+\.\d+\.[a-zA-Z]+$')

Fixes fail during *pkg --path build --srpm --scratch command execution.
The SRPM was correctly created but *pkg was unable to loca it when
uploading to Koji.

JIRA: RHELCMP-6875
Fixes: https://pagure.io/rpkg/issue/580

Signed-off-by: Dominik Rumian drumian@redhat.com

The code looks good. I can see a minor typo in the description.

rebased onto aed1d59

2 years ago

Pull-Request has been merged by onosek

2 years ago
Metadata