"git ubuntu build" fails when orig tarball contains loose files

Bug #1802333 reported by Robie Basak on 2018-11-08
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Example package: tzdata

The orig tarball contains loose files (files aren't all under one directory as is common convention). dpkg-source supports this, but git-ubuntu currently doesn't.

Example failure:

$ git ubuntu build
11/08/2018 16:03:58 - ERROR:Command exited 1: quilt --quiltrc - push -a
11/08/2018 16:03:58 - ERROR:stdout: Applying patch systemv.diff
  can't find file to patch at input line 5
  Perhaps you used the wrong -p or --strip option?
  The text leading up to this was:
  |Create the SystemV links, for compatibility with previous versions.
  |--- tzdata.orig/systemv 2006-04-10 11:36:52.455402059 +0200
  |+++ tzdata/systemv 2006-04-10 11:37:12.684500320 +0200
  No file to patch. Skipping patch.
  1 out of 1 hunk ignored
  Patch systemv.diff does not apply (enforce with -f)

This is because the directory ends up mostly empty because of the use of --strip-components=1 that causes most extraction to be eliminated.

tar's --one-top-level option is related. However there are probably caveats with just using that when component tarballs are in use.

Maybe we can use git archive to grab HEAD as a starting point for the quilt run, rather than trying to extract from orig tarballs. This will mean that we will have to determine if we're already applied or not, but will save us having to recreate dpkg-source's behaviour for orig tarball extraction.

The actual bug is in git_repository::GitUbuntuRepository::_maybe_quiltify_tree_hash().

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers