Re: Basics of packaging with the new workflow
Arnaud Rebillout <arnaud.rebillout@collabora.com> writes:
> When you use GBP to update your package to a newer version, GBP
> automatically imports things in the upstream branch, in the
> pristine-tar branch (if ever it exists), and creates a tag. So it does
> a bunch of things automatically, which is nice, except for one thing:
> you have to *undo* it all when you realize that you need to
> keep/remove things in the vendor directory (by setting the field
> Files-Excluded in d/copyright).
Yeah. Please let me share my gbp-revert-import-orig script:
#!/bin/sh -ex
git checkout debian/master
git tag debian/master.bak
git tag -d $(git tag --points-at upstream/latest)
git reset --hard $(git rev-list --topo-order --ancestry-path --reverse --merges upstream/latest..debian/master | head -n1)^
git branch -f upstream/latest upstream/latest^
git branch -f pristine-tar pristine-tar^
It works against full DEP-14 repositories, with the main packaging
branch called debian/master and the main upstream branch called
upstream/latest. I generally like working with such packaging
repositories, and whenever I recognize that my latest import was wrong,
I run this script, redo the import correctly, then cherry pick the
post-import packaging changes from the ancestry of debian/master.bak.
Once the diff of debian/master and debian/master.bak is what I want, I
delete the debian/master.bak tag. This pretty much eliminated my big
gripe with gbp import-orig. I don't think it solves everybody's every
problem, though. :)
--
Regards,
Feri
Reply to: