Hi, Thanks for providing the details.
On Thu, Nov 02, 2017 at 12:41:51PM +0000, Chris Lamb wrote: > Hi Guido Günther, > > > Can you provide a repo and the steps to reproduce this? We're gbp > > dch'ing in repos with epochs since several years (e.g. icedove) and > > I've not seen any issues. > > Starting at: > > $ gbp clone > https://anonscm.debian.org/git/python-modules/packages/python-django.git > > Then: > > $ git reset --hard > HEAD is now at 6073e7b2e releasing package python-django version 1:1.11.7-1 > > $ wget -O~/python-django_1.11.7.orig.tar.gz \ > https://www.djangoproject.com/download/1.11.7/tarball/ > […] > > $ # Forcing some new version number for this test > $ gbp import-orig ~/python-django_1.11.7.orig.tar.gz > What is the upstream version? [1.11.7] 1.11.8 > gbp:info: Importing '/home/lamby/python-django_1.11.7.orig.tar.gz' to branch > 'upstream/1.11.x'... > gbp:info: Source package is python-django > gbp:info: Upstream version is 1.11.8 > gbp:info: Replacing upstream source on 'debian/sid' > gbp:info: Successfully imported version 1.11.8 of > /home/lamby/python-django_1.11.7.orig.tar.gz > > $ # I want to build this new version > $ dch -v 1:1.11.8-1 "New upstream release" > > $ git add debian/changelog && debcommit > git commit -m 'New upstream release' > [debian/sid c7c27b005] New upstream release > 1 file changed, 6 insertions(+) > > $ echo "# dummy packaging change" >> debian/rules > $ git add debian/rules && git commit -m "dummy change"w > > $ gbp dch -R --verbose > gbp:debug: ['git', 'rev-parse', '--show-cdup'] > gbp:debug: ['git', 'rev-parse', '--is-bare-repository'] > gbp:debug: ['git', 'rev-parse', '--git-dir'] > gbp:debug: ['git', 'symbolic-ref', 'HEAD'] > gbp:debug: ['git', 'show-ref', 'refs/heads/debian/sid'] > gbp:debug: ['git', 'tag', '-l', 'debian/1%1.11.8-1'] > gbp:debug: ['git', 'tag', '-l', 'debian/1.11.8-1'] > gbp:error: Version 1:1.11.8-1 not found > > Oh.. I am expecting it to look since 1:1.11.7-1, not 1:1.11.8-1. :/ This fails since the changelog has 1.11.8-1 while there is no debian tag for it. You're basically driving "gbp dch" in manual mode. If you use: gbp dch -R -a or gbp dch -S -a it will figure this out automatically. Alternatively you can use --since as you described but that's more cumbersome. With --auto "gbp dch" will rely on debian/changelog modification to find the needed commits. You can then leave out _all_ your dch _and_ debcommit invocations: gbp import-orig ../python-django_1.11.8.orig.tar.gz echo "# dummy packaging change" >> debian/rules git add debian/rules && git commit -m "dummy change" gbp dch -R -a is all that's needed. I'm using [import-orig] # Automatically forward the changelog after importing a new upstream version postimport = gbp dch -S -a --debian-branch=$GBP_BRANCH && git commit --amend -C@{0} debian/changelog to get a new upstream version after every import into the changelog and from there on only "gbp dch -S -a" or "gbp dch -R -a". I never invoke dch by hand. I'm happy to apply a patch to the manual to make this more clear but otherwise I'm not seeing a bug here. Cheers, -- Guido

