kojiwrapper: Call chmod recursively

Related: https://pagure.io/pungi/issue/932
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2018-06-04 08:31:08 +02:00
parent 71f2c61020
commit 663a07068e
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ class KojiWrapper(object):
command = "rm -f /var/lib/rpm/__db*; rm -rf /var/cache/yum/*; set -x; " + command
if destdir:
command += " && chmod a+r %s" % shlex_quote(destdir)
command += " && chmod -R a+r %s" % shlex_quote(destdir)
cmd.append(command)
return cmd

View File

@ -427,7 +427,7 @@ class RunrootKojiWrapperTest(KojiWrapperBaseTestCase):
self.assertEqual(cmd[-2], 's390x')
self.assertEqual(
cmd[-1],
"rm -f /var/lib/rpm/__db*; rm -rf /var/cache/yum/*; set -x; /bin/echo '&' && chmod a+r '/output dir'"
"rm -f /var/lib/rpm/__db*; rm -rf /var/cache/yum/*; set -x; /bin/echo '&' && chmod -R a+r '/output dir'"
)
self.assertItemsEqual(cmd[3:-3],
['--channel-override=chan', '--quiet', '--use-shell',