fix: append +ds1 suffix to upstream version when repacking#298
fix: append +ds1 suffix to upstream version when repacking#298aviralgarg05 wants to merge 2 commits intoDebian:masterfrom
Conversation
|
It is not evident to me why Note: Git commit does not follow project conventions, you could just write |
|
isn't the suggested suffix (as per note that i have no clue about team policy here, so please disregard my comment if it is off. |
|
Thanks for the reviews! Logic and Timing Suffix Convention Commit Message |
8915e54 to
42840db
Compare
|
Thanks for the explanation about The repackaged suffix does not seem to be defined in the Debian Policy. Both the Developers Reference and the uscan man page mention |
Thanks for the detailed review!
Ready for another look. |
What lintian tag are you referring to exactly? At least the man page for
So the digit is not that strange. I think this digit can help in more complex packages, to indicate that the repacked tarball has changed when e.g. more files have been removed from it. This is uncommon and maybe not that important, but I don't think this digit hurts and I think it is better to not change something for no reason. Otherwise great addition to dh-make-golang, I've been bitten by this already. |
i guess |
|
Reverted back to the correct one! |
There is no clear "correct" one. It is true that |
|
I do not have any strong opinion, I was simply against changing something for no reason. In this case the Lintian tag |
|
@aviralgarg05 I advertised this on the mailing list https://lists.debian.org/debian-go/2026/02/msg00097.html to get more opinions so we can finalize and merge this. Meanwhile, if you have time, please consider reviewing other open PRs by other people so to motivate them to review yours. Thanks! |
|
After thinking about this and re-reading the comments above, I think we should not have the digit and thus probably the optimal is to have |
When vendorDirs or Godeps are detected, append the +ds suffix to the upstream version. This ensures consistency between the generated debian/changelog, debian/watch, and orig tarball naming. The +ds suffix (without digit) follows the Lintian anticipated-repack-count recommendation and aligns with uscan defaults. Fixes: Debian#141
1093917 to
58fbe05
Compare
Description
This PR resolves the issue where the upstream version/tag used in the initial packaging was not aligned with the
debian/watchfile expectations when repacking is involved.Previously,
dh-make-golangwould correctly configuredebian/watchwithrepacksuffix=+ds1if it detected that vendor directories or Godeps needed to be removed. However, the initial package version (used for the.orig.tarname and the firstdebian/changelogentry) did not include this suffix, leading to a mismatch that caused issues for tools likeuscanandgbp.Changes:
+ds1suffix to the upstream version whenever repacking is detected (len(u.vendorDirs) > 0 || u.hasGodeps).package_version+ds1.orig.tar.xz.debian/changelogentry starts withversion+ds1-1.debian/watchfile (which expects+ds1for repacked tarballs) is perfectly aligned with the package state.Related Issue
Fixes #141
Verification Performed
go test ./...and confirmed all tests pass.go build.go vet ./....gofmt -s.u.versionmodification happens after the upstream source analysis but before the Git repository and template generation, ensuring the correct version propagates to all generated files.Checklist
fix-issue-141-version-alignment