From 4da77c5e5d07079db73bc4589ea7cfe4b0c54678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Thu, 21 Apr 2016 14:59:00 +0200 Subject: [PATCH] [createrepo] Use more verbose output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lubomír Sedlář --- pungi/wrappers/createrepo.py | 2 +- tests/test_createrepo_wrapper.py | 9 +++++---- tests/test_initphase.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pungi/wrappers/createrepo.py b/pungi/wrappers/createrepo.py index b13b9b9a..0e80391c 100644 --- a/pungi/wrappers/createrepo.py +++ b/pungi/wrappers/createrepo.py @@ -36,7 +36,7 @@ class CreaterepoWrapper(object): oldpackagedirs=None, num_deltas=None, workers=None): # groupfile = /path/to/comps.xml - cmd = [self.createrepo, directory] + cmd = [self.createrepo, directory, '--verbose'] if baseurl: cmd.append("--baseurl=%s" % baseurl) diff --git a/tests/test_createrepo_wrapper.py b/tests/test_createrepo_wrapper.py index 76924263..708720c5 100755 --- a/tests/test_createrepo_wrapper.py +++ b/tests/test_createrepo_wrapper.py @@ -18,7 +18,7 @@ class CreateRepoWrapperTest(unittest.TestCase): cmd = repo.get_createrepo_cmd('/test/dir') self.assertEqual(cmd[:2], ['createrepo_c', '/test/dir']) - self.assertItemsEqual(cmd[2:], ['--update', '--database', '--unique-md-filenames']) + self.assertItemsEqual(cmd[2:], ['--verbose', '--update', '--database', '--unique-md-filenames']) def test_get_createrepo_c_cmd_full(self): repo = CreaterepoWrapper() @@ -40,14 +40,15 @@ class CreateRepoWrapperTest(unittest.TestCase): '--checksum=sha256', '--distro=Fedora', '--simple-md-filenames', '--no-database', '--content=c1', '--content=c2', '--repo=r1', '--repo=r2', '--revision=rev', '--deltas', '--oldpackagedirs=/test/old', '--num-deltas=2', '--workers=3', - '--outputdir=/test/output']) + '--outputdir=/test/output', '--verbose']) def test_get_createrepo_cmd_minimal(self): repo = CreaterepoWrapper(False) cmd = repo.get_createrepo_cmd('/test/dir') self.assertEqual(cmd[:2], ['createrepo', '/test/dir']) - self.assertItemsEqual(cmd[2:], ['--update', '--database', '--unique-md-filenames', '--pretty']) + self.assertItemsEqual(cmd[2:], ['--update', '--database', '--unique-md-filenames', + '--pretty', '--verbose']) def test_get_createrepo_cmd_full(self): repo = CreaterepoWrapper(False) @@ -69,4 +70,4 @@ class CreateRepoWrapperTest(unittest.TestCase): '--checksum=sha256', '--distro=Fedora', '--simple-md-filenames', '--no-database', '--content=c1', '--content=c2', '--repo=r1', '--repo=r2', '--revision=rev', '--deltas', '--oldpackagedirs=/test/old', '--num-deltas=2', '--workers=3', - '--outputdir=/test/output']) + '--outputdir=/test/output', '--verbose']) diff --git a/tests/test_initphase.py b/tests/test_initphase.py index 891a2c43..416f8b7c 100755 --- a/tests/test_initphase.py +++ b/tests/test_initphase.py @@ -155,7 +155,7 @@ class TestCreateCompsRepo(PungiTestCase): init.create_comps_repo(compose, 'x86_64') self.assertEqual(run.mock_calls, - [mock.call(['createrepo_c', self.topdir + '/work/x86_64/comps_repo', + [mock.call(['createrepo_c', self.topdir + '/work/x86_64/comps_repo', '--verbose', '--outputdir=%s/work/x86_64/comps_repo' % self.topdir, '--groupfile=%s/work/x86_64/comps/comps-x86_64.xml' % self.topdir, '--update', '--skip-stat', '--database', '--checksum=sha256',