From 80cb233b2225abd8fcb687aa61a522e6e8280617 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 31 May 2018 14:50:03 +0200 Subject: [PATCH 5/6] kojiwrapper: Don't mark runroot as successful by chmod MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- 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 b8d56791..bcfb5303 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 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 4a14aed6..30037b27 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 a+r '/output dir'" ) self.assertItemsEqual(cmd[3:-3], ['--channel-override=chan', '--quiet', '--use-shell', -- 2.14.3