Package: dpkg X-Debbugs-Cc: samuel...@debian.org Severity: wishlist Tags: patch
Multiple times I had to help newcomers when they were working with gbp and importing a new upstream release, they would usually hit the error: " dpkg-source: info: local changes detected, the modified files are: ... dpkg-source: info: you can integrate the local changes with dpkg-source --commit dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/... E: Failed to package source directory ... " This happened due to them forgetting to update the version in d/changelog after importing the new release. It would be nice if among the errors there was a message suggesting that the issue could have been caused by that, I believe this would help many newcomers working with gbp. The current message already states which version dpkg is trying to build, so one ~could~ understand what's the issue when noticing that the previous release is there, in reality I've seen so many people miss that (myself included) that I think having this extra info message will be worthy. Path attached. Thank you -- Samuel Henrique <samueloph>
From 4427ecc3cea40e2c3a407dbcb8a42dbe45a49d73 Mon Sep 17 00:00:00 2001 From: Samuel Henrique <samueloph@debian.org> Date: Sun, 10 Oct 2021 20:43:18 +0100 Subject: [PATCH] Add info message about possible cause of local changes detected When working with gbp, this issue is usually caused by a new upstream release being imported while missing to bump the version in d/changelog. --- scripts/Dpkg/Source/Package/V2.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/Dpkg/Source/Package/V2.pm b/scripts/Dpkg/Source/Package/V2.pm index 05dd3ba64..18f4a9d1c 100644 --- a/scripts/Dpkg/Source/Package/V2.pm +++ b/scripts/Dpkg/Source/Package/V2.pm @@ -559,6 +559,8 @@ sub do_build { unless (-z $tmpdiff or $self->{options}{auto_commit}) { info(g_('you can integrate the local changes with %s'), 'dpkg-source --commit'); + info(g_('this could also have been caused by importing a new upstream ' . + 'release while forgetting to bump the version in d/changelog')); error(g_('aborting due to unexpected upstream changes, see %s'), $tmpdiff); } -- 2.33.0