From 320e6779e8e8725cf05285ba8822dc70167688cc Mon Sep 17 00:00:00 2001 From: Otto Liljalaakso Date: Feb 07 2023 00:16:03 +0000 Subject: Support 'results_dir=subdir' when building from srpm Previously, the scratch-build command did not work when results_dir=subdir configuration option was used. Fix by correctly finding the srpm from srcrpmdir specified by the used layout. Fixes #648 Signed-off-by: Otto Liljalaakso --- diff --git a/pyrpkg/cli.py b/pyrpkg/cli.py index 56eac04..bed9a7b 100644 --- a/pyrpkg/cli.py +++ b/pyrpkg/cli.py @@ -1930,8 +1930,8 @@ class cliClient(object): if self.args.srpm == 'CONSTRUCT': 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) + self.args.srpm = os.path.join(self.cmd.layout.srcrpmdir, + '%s.src.rpm' % self.cmd.nvr) return self._upload_file_for_build(self.args.srpm) def _watch_build_tasks(self, task_ids):