verifyChecksum fails for non-output files
PR #967 introduced another error. Before verifyChecksum was used only from kojikamid and it made sense, that it failed on other files. Now it is used also for build requires, etc. As it makes no harm (read-only), we can extend this check for other paths. Fixes: https://pagure.io/koji/issue/1669
This commit is contained in:
parent
6c97ff4309
commit
46f85c9b86
1 changed files with 2 additions and 1 deletions
|
|
@ -760,7 +760,8 @@ class VMExecTask(BaseTaskHandler):
|
|||
|
||||
def verifyChecksum(self, path, checksum, algo='sha1'):
|
||||
local_path = os.path.abspath(os.path.join(self.output_dir, path))
|
||||
if not local_path.startswith(self.output_dir):
|
||||
if not local_path.startswith(self.output_dir) and \
|
||||
not local_path.startswith(self.buildreq_dir):
|
||||
raise koji.BuildError('invalid path: %s' % path)
|
||||
if not os.path.isfile(local_path):
|
||||
raise koji.BuildError('%s does not exist' % local_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue