pungi/0006-kojiwrapper-Call-chmod-recursively.patch
2018-06-04 13:27:01 +02:00

45 lines
1.8 KiB
Diff

From 210037ad48aa7f91d0391dc7c9330d4fd5c7172e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= <lsedlar@redhat.com>
Date: Mon, 4 Jun 2018 08:31:08 +0200
Subject: [PATCH 6/6] kojiwrapper: Call chmod recursively
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Related: https://pagure.io/pungi/issue/932
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
---
pungi/wrappers/kojiwrapper.py | 2 +-
tests/test_koji_wrapper.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pungi/wrappers/kojiwrapper.py b/pungi/wrappers/kojiwrapper.py
index bcfb5303..abcdecb9 100644
--- a/pungi/wrappers/kojiwrapper.py
+++ b/pungi/wrappers/kojiwrapper.py
@@ -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
diff --git a/tests/test_koji_wrapper.py b/tests/test_koji_wrapper.py
index 30037b27..0f20562a 100644
--- a/tests/test_koji_wrapper.py
+++ b/tests/test_koji_wrapper.py
@@ -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',
--
2.14.3