Package: dgit
Version: 12.8
Severity: normal
Hi. I'm pretty sure this isn't a bug, and that I'm doing something
wrong. But I can't tell by reading the docs what I should be doing
instead. Help appreciated.
I want to take an existing gbp repo and convert it to a dgit repo. To be
clear, by "gbp repo" I mean: tracking debian/ in git, merging squashed
upstream tarball with each release. By "dgit repo" I mean using the
upstream git repo, and merging in the debian/ commits as needed.
I want to preserve the existing history of debian/. So I did a "git
filter-repo" on the old tree to make a tree that just has the history of
debian/. Then I "git rm debian/patches". And I merged that to my
upstream. Looks like this:
M─┐ Merged previous non-dgit debian/
│ o removed patches; these will be handled by dgit
│ o changelog
│ o .....
o {upstream/master} python-cameramodel-converter.c doesn't use PyTuple macros
o Added test-python-cameramodel-converter.py
o minor comment, docs
o docs
o I ship mrcal-show-model-resolution,mrcal-show-stereo-pair-diff
o When loading data from optimization_inputs, I match the endianness
o loosened tests to make stuff pass on more architectures
o build notes
o no more buster builds
o <v2.5> test-save-load-image works in old numpy
o tests work on ancient numpy
....
The branch on the right is the debian/ history with the patches removed.
The branch on the left is upstream. I'd like dgit to figure out that
v2.5 is the upstream release, and that everything from v2.5 to
upstream/master should be made into a patch. This doesn't work. I see
this:
$ dgit --dry-run --clean=git quilt-fixup
DRY RUN ONLY
Format `3.0 (quilt)', need to check/update patch stack
# git clean -xdf
examining quilt state (multiple patches, linear mode)
dgit: base trees orig=0a6b7feaacba15276a34 o+d/p=0a6b7feaacba15276a34
dgit: quilt differences: src: ## orig == gitignores: == orig ==
dgit: quilt differences: HEAD ## o+d/p HEAD == o+d/p
starting quiltify (multiple patches, linear mode)
dgit: error: quilt fixup cannot be linear. Stopped at:
dgit: a922e354..41f06c89: changed debian/source/format
dgit: 1f6d0344..80c69b69: changed
debian/patches/0001-loosened-tests-to-make-stuff-pass-on-more-architectu.patch,debian/patches/0002-When-loading-data-from-optimization_inputs-I-match-t.patch,debian/patches/series
dgit: This might be a patches-unapplied branch.
dgit: Maybe you need one of --[quilt=]gbp --[quilt=]dpm --quilt=unapplied ?
dgit: Warning: Tree has .gitattributes. See GITATTRIBUTES in dgit(7).
dgit: Maybe orig tarball(s) are not identical to git representation?
dgit: error: quilt history linearisation failed. Search `quilt fixup' in
dgit(7).
dgit:
So it's looking in the branch that has debian/, seeing that I mucked
with the patches in there, and gets confused. It says
orig=0a6b7feaacba15276a34 o+d/p=0a6b7feaacba15276a34
Note these are the same. The orig is correct: it's the upstream release
+ debian/. The o+d/p is NOT correct: it should be seeing all the extra
patches in upstream/master, but it doesn't.
It feels like this should be normal and simple, but I can't figure it
out. How should this be done? And a very related question: how should
migrations to dgit be done, if not like this?
Thanks!