Sean Whitton writes ("Bug#1140941: git-debpush: Forgetting --gbp when a package
previously had no patches can result in irrecoverable tags"):
> Colin Watson [28/Jun 4:34pm +01] wrote:
> > If one uses `git debpush --gbp` for a tree where dgit can already detect
> > that the package uses gbp-pq(1) patches (I think by looking at the last
> > tag in the history?), then the tool complains at you that the option was
> > superfluous. A comment indicates that this is to get people into the
> > habit of just typing `git debpush` for their regular uploads.
> >
> > However, if one is obediently in that habit, then uploads can fail as
> > shown in the forwarded email. The previous upload of pydantic
> > (2.13.4-1) had no patches and so dgit did not require any kind of
> > --quilt argument. 2.13.4-2 added patches. I used `git debpush`, which
> > appeared completely happy on the client side, but resulted in a failure
> > from tag2upload.
Right.
When to pass --gbp can be rather subtle. Assuming you're using gbp
branch format:
When running dgit, --gbp is is always required. If you omit --gbp
when running dgit, your upload can succeed while making metadata that
causes a future upload with tag2upload to fail.
When running git-debpush, --gbp is sometimes optional, but right now
if you pass it when it's not needed, you get a failed check.
I would ideally like to advise users who are sometimes using
git-debpush and sometimes using dgit, to always pass --gbp
(when the package is maintained in git with patches -unapplied).
That is easy to remember and avoids lossage. But right now that often
produces a failed check from git-debpush. In May in I proposed to
downsgrade that check, but the dixcussion has not yet converged:
https://salsa.debian.org/dgit-team/dgit/-/merge_requests/497
> To clarify one thing immediately, there is always a quilt mode for
> tag2upload because we are always in dgit's split-brain mode.
I don't think this is quite right. There's always a quilt mode with
"3.0 (quilt)", regardless of whether it's local dgit or tag2upload,
and regardless of split brain. With "3.0 (native)" and 1.0, there is
no quilt mode, even with split brain (as in tag2upload).
> I think maybe we can fix this by just extending the patch application
> check to more quilt modes, or adding a similar check.
I think adding such a check is a good idea. In the current instance
it would have detected the problem earlier, while trying to make the
-2 tag. But I'm not sure I would call this a "fix" - the wrong quilt
mode was already baked into the tag made for the -1 upload. Ideally
we would have avoided that somehow.
> Also if we implement #1111423 dgit would have chosen --gbp so the
> problem wouldn't have occurred.
Yes, assuming that the last upload prior to 2.13.4-1 used dgit or
tag2upload and had the right quilt mode.
#1111423 seems nontrivial to me. So I think git-debpush and dgit
are going to have different behaviour for some time yet.
Ian.
--
Ian Jackson <[email protected]> These opinions are my own.
Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.