#854377 dgit: should pass -v for a NEW upload to backports

Package:
dgit
Source:
dgit
Submitter:
Sean Whitton
Date:
2025-08-02 15:37:02 UTC
Severity:
minor
Tags:
#854377#5
Date:
2017-02-06 13:37:33 UTC
From:
To:
When uploading non-NEW backports, dgit passes the correct -v
automatically and the user doesn't have to worry about following the
backports convention of including all changelog entries since the last
backport that was uploaded.

It doesn't do this for NEW backports.  It would be nice if it did.  I
think that this will require backports specific code, but it is easy to
match the target suite against /.*-backports/.

#854377#10
Date:
2017-02-06 14:03:24 UTC
From:
To:
Sean Whitton writes ("Bug#854377: dgit: should pass -v for a NEW upload to backports"):

What is the right convention for NEW backports ?  It can't be "all
changelog entries since the last backport that was uploaded" since
that's "all changelog entries ever" surely.

Ian.

#854377#13
Date:
2017-02-06 14:21:56 UTC
From:
To:
It can be a bit controversial, but that's it usually, yes.
From the doc:

|It is recommended to include all changelog entries since the last
|version on debian-backports or since stable if it's the first version.
|You should do this by passing "-v" to dpkg-buildpackage. Eg: "debuild
|-v0.7.5-2", where "0.7.5-2" is the version in stable. If the package
|wasn't in stable or backports before you don't have include the
|changelog entries (but you are free to do so). It helps others to follow
|the changes introduced with the backport (by reading the changes mailing
|list).

That's pretty clear on what the expected behaviour is for a new
backport of a package already in stable; it's less unclear about a
package never in stable; that said, I those cases I usually put all of
the changelog, yes... because the changelog of a package never in stable
can't be so big, right?! /me looks at dgit's changelog… ok, this
particular case would not be cool to include all of the changelog
indeed u.U

#854377#20
Date:
2025-08-02 15:35:39 UTC
From:
To:
We discussed IRL the handling of backport and -v versions.

There are *two* things we are trying to do with the previous version
informatiion:

 * Calculate the -v option to pass to dpkg-parsechangelog.
   (With a normal upload this is the version currently present in the
   target suite.)

 * Perform the overwrkte check: we normally insist (with
   --trust-changelog eg in t2u) that the version currently present
   in the target suite, is mentioned in *this* upload's changelog.

Backports may be based on the previous backport (merge workflow) or
may be re-created afresh from the parent suite (restart workflow).

We think this can be supported with the following behavioural change
in dgit:

 * Backports suites are special (and known via the configuration).

 * When uploading to backports, check our changelog (of the thing
   we're uploading) for *either*
    - the current version in the parent suite
    - the current version in the backport suite

 * Whichever of these exists and is most recent in our changelog,
   should be used for dpkg-parsechangelog -v.  It should appear
   because otherwise we'll be failing the --trust-changelog check.

 * With --overwrite=SPECIFIC-VERSION, it is ok to specify either of
   those versions as SPECIFIC-VERSION.  We might the user (who isn't
   using t2u) to specify -v.

Ian.