dch --release does not default to previous released distribution

Bug #1721838 reported by Chad Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devscripts (Ubuntu)
New
Undecided
Unassigned

Bug Description

On Xenial, trying to release a package targeted for zesty:

$ dpkg-query -W devscripts
devscripts 2.16.2ubuntu3

info dch says:
       --release, -r
              Finalize the changelog for a release. Update the changelog
              timestamp. If the distribution is set to UNRELEASED, change it
              to the distribution from the previous changelog entry (or
              another distribution as specified by --distribution).

Yet on Ubuntu Xenial if I dch --release on a product where debian/changelog contains changelogs referencing zesty, my resulting debian/changelog diff still is set to xenial

$ head -n 10 debian/changelog
curtin (0.1.0~bzr532-0ubuntu1~17.04.1ubuntu1) UNRELEASED; urgency=medium

  * test dch --release

 -- Chad Smith <email address hidden> Fri, 06 Oct 2017 11:44:36 -0600

curtin (0.1.0~bzr532-0ubuntu1~17.04.1) zesty; urgency=medium

  * New upstream snapshot. (LP: #1721808)
    - vmtest: fix artful networking

$ dch --release

$ bzr diff
=== modified file 'debian/changelog'
--- debian/changelog 2017-10-06 17:45:19 +0000
+++ debian/changelog 2017-10-06 17:55:43 +0000
@@ -1,8 +1,8 @@
-curtin (0.1.0~bzr532-0ubuntu1~17.04.1ubuntu1) UNRELEASED; urgency=medium
+curtin (0.1.0~bzr532-0ubuntu1~17.04.1ubuntu1) xenial; urgency=medium

   * something

- -- Chad Smith <email address hidden> Fri, 06 Oct 2017 11:44:36 -0600
+ -- Chad Smith <email address hidden> Fri, 06 Oct 2017 11:55:37 -0600

 curtin (0.1.0~bzr532-0ubuntu1~17.04.1) zesty; urgency=medium

curtin (0.1.0~bzr532-0ubuntu1~17.04.1ubuntu1) UNRELEASED; urgency=medium

  * something

 -- Chad Smith <email address hidden> Fri, 06 Oct 2017 11:44:36 -0600

curtin (0.1.0~bzr532-0ubuntu1~17.04.1) zesty; urgency=medium

  * New upstream snapshot. (LP: #1721808)
    - vmtest: fix artful networking

Tags: manpage xenial
Revision history for this message
Chad Smith (chad.smith) wrote :

This bug looks like it is likely the same intent as https://bugs.launchpad.net/ubuntu/+source/devscripts/+bug/1655717

summary: - dch --release does not defaut to previous released distribution
+ dch --release does not defaulted to previous released distribution
Revision history for this message
Lars Kruse (devel-sumpfralle) wrote : Re: dch --release does not defaulted to previous released distribution

The specific problem here is the wrong documentation of the behavior in the manpage:

```
--release
Finalize the changelog for a release. Update the changelog timestamp. If the distribution is set to UNRELEASED, change it to the distribu-
tion from the previous changelog entry (or another distribution as specified by --distribution). If there are no previous changelog entries
and an explicit distribution has not been specified, unstable will be used (or the name of the current development release when run under
Ubuntu).
```

The last sentence ("If there are no previous changelog entries ...") is wrong, since under Ubuntu the "current development release" is used, even if previous changelog entries exist (e.g. for "unstable").

Thus at the moment reading the source is the only option for determining the behavior of the distribution resolution. A fix for the wrong description in the man page would be very helpful!

PS: Personally I refrained from doing this work myself, since the current implementation feels really questionable: Ubuntu users are exposed to an incompatible implementation of "dch" and there is no way to disable this Ubuntu-specific behavior - neither locally nor for specific projects. This is not beautiful :(

Ken Sharp (kennybobs)
summary: - dch --release does not defaulted to previous released distribution
+ dch --release does not default to previous released distribution
tags: added: manpage xenial
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.