uscan: match unmangled versions against --download-version

Hi,

This is a followup of !431 (closed). This merge request reverts commit f1564873

Apply uversionmangle rules to --download-version.

and implements instead the refactoring suggested there:

Having to provide dirversionmangle as well for that test case to work doesn't feel quite right, but it all boils down to using the mangled versions on both sides of equality comparisons, and changing that (that is, using the mangled versions only for sorting comparisons) would require heavier refactoring.

as this appears necessary to fix other archive naming issues including #1100020.

It also:

  • adds a new testGitVersionMangle test case to check that #1100020 is fixed
  • adjust test cases for the breaking changes listed below
  • fixes a few other minor issues in uscan test scripts
  • implement filename mangling (filenamemangle) for mode=git and mode=svn
  • updates documentation.

There are some (minor) breaking changes:

  • in default mode, dirversionmangle rules that duplicate (implicit or explicit) uversionmangle rules must be removed
  • in _vcs HEAD modes, filenamemangle must now be used instead of uversionmangle (as was previously suggested by the documentation) to set a version number.

A few (maybe around 20-30 total) packages are affected.

Closes: #1100020 — devscripts: uscan mode=git generates archives with mangled names

Edited by Julien Plissonneau Duquène

Merge request reports

Loading