git-buildpackage icon indicating copy to clipboard operation
git-buildpackage copied to clipboard

Fix an issue when both export-dir and tarball-dir is set

Open mochrul opened this issue 5 years ago • 4 comments

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.

mochrul avatar Aug 29 '20 09:08 mochrul

can you demonstrate this with a testcase tests/component/deb that fails initially and works after your fix?

agx avatar Aug 29 '20 10:08 agx

WIP

mochrul avatar Aug 29 '20 16:08 mochrul

I'm a bit puzzled since if you use overlay then isn't the whole point that we're not generating an archive but use tarball-dir?

agx avatar Sep 09 '20 08:09 agx

Yes, you are completely right. To be honest, I inherited/stole the gbp configuration, and as it worked correctly for years, I haven't checked the actual meaning of the options. (It worked because the first step was to download the new upstream version and that step did generate the orig.tar.gz, so the issue is not triggered. This was the first time I started to work on the project in a different computer where I downloaded the upstream version).

To be honest, I tried to create the test case and reproduce the issue for a very long time before I realized that the overlay option also has its role in the game. And thinking the more about it the less I'm confident about the solution. But I'm still confident that this should be handled somehow, maybe with a correct error message.

mochrul avatar Sep 10 '20 18:09 mochrul