summaryrefslogtreecommitdiff
path: root/tests/tests/import-dsc
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2020-02-01 21:12:25 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2020-02-02 16:31:51 +0000
commitccebebe13a570e7432416817f09306e068928e96 (patch)
treed1cba9c5e498ced89d2de80523d53e25ae73a2f3 /tests/tests/import-dsc
parent0bbccf3893a0c5a2ce38bb0d9c5ce3e975ae1775 (diff)
dgit: absurd: Work around mangled env metadata from gbp
Some versions of gbp pq will pass broken metadata from patch files into the env vars for git-commit-tree. Eg, #950446/#950326 where gbp pq from buster cannot cope with binutils_2.33.90.20200122-2.dsc, setting GIT_AUTHOR_DATE to "???" (literally, three ? marks, as copied from the patch file libctf-soname.diff). Work around this as follows: * Try git-commit-tree of an empty commit message. Does it work? If so, workaround is not needed. * Try resetting GIT_AUTHOR_* to GIT_COMMITTER_*. Does it work now? Ah, that is the fix! * Otherwise, just run git-commit-tree as usual. This code makes some perhaps-unreasonable assumptions: * gbp's git commit-tree has the tree object as 2nd argument (really shonky command line parsing). However, if this assumption is violated, the result is that the git-commit-tree attempts either fail harmlessly, or succeed harmlessly, defeating the workaround but with no other implications. * if a workaround is needed, it is best to throw away all the author information, rather that try to pick and choose, or to fix it up. These are IMO tolerable because I think it's gbp's job to get this right. The output from dgit (if it succeeds) will be right in terms of tree and even in terms of commit structure. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/tests/import-dsc')
0 files changed, 0 insertions, 0 deletions