control: tags -1 +confirmed On Fri, Jan 27, 2017 at 08:22:02PM +0100, gregor herrmann wrote: > Package: git-buildpackage > Version: 0.8.10 > Followup-For: Bug #596513 > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > I just wanted to file a new bug report "gbb-dch hardcodes > - --nomainttrailer' but we might as well re-use this old one, since it > is maybe the answer to my issue. > > > I was a bit surprised that gbp-dch recently started to always change > the trailer line in d/changelog on an innocent `gbp dch -a'. After > looking at the changelog and the git history it seems like this is a > side effect of fixing #796913, i.e. of commit 42878ff. > > What we see in gbp/scripts/dch.py in fixup_section() is: > > > mainttrailer_opts = ['--nomainttrailer', '--mainttrailer', '-t'] > ... > for opt in mainttrailer_opts: > if opt in dch_options: > break > else: > opts.append(mainttrailer_opts[0]) > > > which looks nice, except that I don't see how any of > '--nomainttrailer', '--mainttrailer', '-t' would ever get into > dch_options. (The only place where dch_options is set is in > process_options() further down, and there only the command line > options are used, and there's no trace of (no)mainttrailer anywhere.) > > So in the end in fixup_section() we always end up in the else branch, > which means that '--nomainttrailer' is appended and is therefore > effectively hardcoded in a slightly complicated way :) > > > If, as the piece of code above indicates, it should be possible to > select between --nomainttrailer and --mainttrailer then gbp-dch > probably either needs commandline options and config variables to > allow it (hence adding to this old bug report) or it needs to read > ~/.devscripts / use the dch settings. Or maybe there are other > options. > > (I guess hardcoding '--nomainttrailer' was not the plan as this could > have been written in an easier way then it is currently done in > fixup_section().) > > I'd very much like to see the old behaviour of not touching the > trailer (except for releases and new sections etc.) back one way or > another.
(sorry for the delay, I'm not coming around with a fix yet but I wanted at least comment that you hit a nail): Agreed. This is clearly a regression. We only want to touch the trailer in the cases you describe but also have #796913 fixed. Cheers, -- Guido