From 3f0b8c44303f76a122200de86715db9fe0c7c488 Mon Sep 17 00:00:00 2001 From: SZALAY Attila Date: Sat, 29 Aug 2020 17:29:44 +0200 Subject: [PATCH 1/2] Add test case to reproduce the issue with the --tarball-dir --- tests/component/deb/test_buildpackage.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/component/deb/test_buildpackage.py b/tests/component/deb/test_buildpackage.py index fe0802a0..cfd06ce5 100644 --- a/tests/component/deb/test_buildpackage.py +++ b/tests/component/deb/test_buildpackage.py @@ -177,6 +177,14 @@ def test_export_dir_buildpackage(self, repo): self._test_buildpackage(repo, ['--git-export-dir=../foo/bar']) ok_(os.path.exists('../foo/bar')) + @RepoFixtures.quilt30() + def test_export_dir_with_tarball_dir_buildpackage(self, repo): + """Test that building with a export dir and tarball dir (without the actual tarball) works""" + self._test_buildpackage(repo, ['--git-export-dir=../foo/bar', + '--git-tarball-dir=../foo', + '--git-overlay']) + ok_(os.path.exists('../foo/bar')) + @RepoFixtures.quilt30_additional_tarball() def test_export_dir_additional_tar(self, repo): """Test that building with a export dir and additional tarball works""" From 0a0a39453637abda108dd24ad9c5ed459c247470 Mon Sep 17 00:00:00 2001 From: SZALAY Attila Date: Sat, 29 Aug 2020 11:45:28 +0200 Subject: [PATCH 2/2] Fix an issue when both export-dir and tarball-dir is set When the export-dir is set, the git tree is archived and then re-extracted into the new place. Unfortunately, different directory is in use to create the archive (output_dir) and then to extract it (tarball_dir, controlled by the tarball-dir option). This means that if no orig.tar.gz is provided in the tarball_dir directory, the extraction will fail. --- gbp/scripts/buildpackage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gbp/scripts/buildpackage.py b/gbp/scripts/buildpackage.py index 9b3d67fa..d143b911 100755 --- a/gbp/scripts/buildpackage.py +++ b/gbp/scripts/buildpackage.py @@ -538,7 +538,7 @@ def main(argv): # Export to another build dir if requested: if options.export_dir: - export_source(repo, tree, source, options, tmp_dir, tarball_dir) + export_source(repo, tree, source, options, tmp_dir, output_dir) # Run postexport hook if options.postexport: