#1013294 git-buildpackage: improvement to doc to import NMUs

#1013294#5
Date:
2022-06-21 04:31:40 UTC
From:
To:
Hello,
after reading [1] (thanks for that btw!) i was still unsure how to proceed

[1] https://honk.sigxcpu.org/projects/git-buildpackage/manual-html/gbp.special.nmus.html

thru some trial and error i found the below procedure to work flawlessly,
so i think i'd contribute back so that you can expand the doc to include that:

0. download all the "missing" debian source packages in a temporary location
   - and example on how to do that is `depsnap -d /temp/location/  <src package?>`
1. `git checkout <packaging branch>`
   usually master|main|debian/master
2. gbp import-dsc --debian-branch=nmu --create-missing-branches /temp/location/pkg_ver.dsc
   repeat as many time as needed, follow chronological order.
   this will also take care of creating tags, importing new upstream releases, update pristine-tar, etc
3. `git merge nmu`
   do the usual git merge dance
4. `git branch --delete nmu`

thanks!

#1013294#10
Date:
2022-06-21 06:49:40 UTC
From:
To:
Hi Sandro,

Thanks for taking the time to write that down. I'm happy to apply
patches to the documentation along these lines.

Cheers,
 -- Guido

#1013294#15
Date:
2022-06-21 14:11:47 UTC
From:
To:
i'm afraid that was all the time that i have available for this matter
#1013294#20
Date:
2025-08-19 17:49:03 UTC
From:
To:
Related, in https://www.debian.org/doc/manuals/developers-reference/pkgs.html#nmus-from-the-maintainer-s-point-of-view
we now have:

***
Note that easiest way to both check if your package has been NMUed,
and also automatically download and commit the changes into a
git-buildpackage maintained git repository is to run gbp import-dsc
--verbose --pristine-tar apt:<package>/sid. This example command
assumes you are working on the debian/latest branch preparing the next
upload to Debian unstable, and it assumes your apt has the deb-src
line active for Debian unstable.
***

Ideally though git-buildpackage could automatically check and warn if
the Debian archive has newer versions, and suggest the user to import
into git the NMUed version. Perhaps this could be an extra check that
runs version related commands are invoked, such as `gbp clone`, `gbp
import-*` or `gbp dch`.