Bug#780987: devscripts: [debchange] new option: --no-append to override release heuristics when using --local

Alan D. Salewski salewski at att.net
Sun Mar 22 20:31:24 UTC 2015


Source: devscripts
Severity: wishlist
Tags: patch

Dear Devscripts Maintainers,

The attached patch adds a new '--no-append' option to debchange (a.k.a. dch)
that allows the user to override the release heuristics guessing
(DEBCHANGE_RELEASE_HEURISTIC and friends) that 'debchange' performs when
deciding whether to append a new changelog message to the current changelog
entry, or to create a new changelog entry section. It is mainly useful in
combination with the existing '--local' option, as explained below.

Usually the release heuristics do what the user wants, insofar as changes are
collected in a changelog entry leading up to a release of the package, and
once released, further changes will be added to a new changelog entry leading
up to the next release of the package.

There are circumstances, however, under which I wish to produce a modified
version of a given package for use on the local machine only, so the package
will never be "released" or be uploaded for inclusion in the Debian
distribution (or even to a local package repository). In such a case, I
sometimes want to accumulate multiple versions of the package over time (where
each changelog entry section uses a locally augmented version number (updated
using the --local option), each of which specifies UNRELEASED in the
distribution field. By default, the release heuristics guessing will always[0]
add new change detail messages to the current or topmost changelog entry whose
distribution field is UNRELEASED; the '--no-append' option allows the user to
override this behavior where desired to force 'debchange' to create a new
changelog entry section.

For example, let's say I have a locally modified 'deoobleckify-1.2.5-4'
package that was produced using the dch '--local' option to append my initials
(ads) as the version suffix. The top-most changelog entry for that version
looks like this:

----------------------------------------8<----------------------------------------
    deoobleckify (1.2.5-4ads2) UNRELEASED; urgency=low

      * Woke royal bell ringer
      * Woke royal trumpeter

     -- Bartholomew Cubbins <bcubbins at k-o-di.dd>  Fri, 02 Jan 2015 19:13:55 -0500
----------------------------------------8<----------------------------------------


So I come along a couple of months later and make another change to the
package, and want to install it as 'deoobleckify-1.2.5-4ads3'. I want the
changelog to now look something like this:

----------------------------------------8<----------------------------------------
    deoobleckify (1.2.5-4ads3) UNRELEASED; urgency=low

      * Warned captain of the guards

     -- Bartholomew Cubbins <bcubbins at k-o-di.dd>  Sun, 22 Mar 2015 15:36:27 -0400

    deoobleckify (1.2.5-4ads2) UNRELEASED; urgency=low

      * Woke royal bell ringer
      * Woke royal trumpeter

     -- Bartholomew Cubbins <bcubbins at k-o-di.dd>  Fri, 02 Jan 2015 19:13:55 -0500
----------------------------------------8<----------------------------------------


Without artificially indicating a release distribution (something other than
'UNRELEASED') in the changelog, dch cannot be used to produce that; when I
need to do this, I currently just edit the changelog file directly. When using
dch, the changelog would look like this:

----------------------------------------8<----------------------------------------
    deoobleckify (1.2.5-4ads3) UNRELEASED; urgency=low

      * Woke royal bell ringer
      * Woke royal trumpeter
      * Warned captain of the guards

     -- Bartholomew Cubbins <bcubbins at k-o-di.dd>  Fri, 02 Jan 2015 19:13:55 -0500
----------------------------------------8<----------------------------------------

The local version number was updated, but I've now lost the self-contained set
of change messages grouped under the 1.2.5-4ads2 changelog entry, and the last
edit/change date from that version has been clobbered.

Please consider applying the attached patch to the devscripts source tree.

Man page doc update included in patch.

The change supports the same behavior when updating NEWS files, too, of course.

Thanks much,
-Al


[0] Note that it is sometimes possible to get the behavior described here by
    specifying the command line option: '--release-heuristic log', but only as
    a side effect, and not reliably.


-- Package-specific info:

--- /etc/devscripts.conf ---

--- ~/.devscripts ---
Not present

-- System Information:
Debian Release: 7.8
  APT prefers stable
  APT policy: (990, 'stable'), (800, 'testing'), (500, 'stable-updates'), (500, 'oldstable-updates'), (500, 'oldstable'), (80, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.16.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debchange-add-opt-no-append.patch
Type: text/x-diff
Size: 6435 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/devscripts-devel/attachments/20150322/b55100dd/attachment.patch>


More information about the devscripts-devel mailing list