Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • D devscripts
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Merge requests 9
    • Merge requests 9
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • DebianDebian
  • devscripts
  • Merge requests
  • !207

uscan: add "compat" target to download components with a compatible version

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Yadd requested to merge yadd/devscripts:uscan-version-compat into master Nov 05, 2020
  • Overview 4
  • Commits 1
  • Pipelines 12
  • Changes 11

Closes: #973814:

uscan offers some target for components: ignore, same,... same is strict and matches only the exact same version, while ignore doesn't check anything.

It could be interesting to have a compat target that accept to download the last component whose version is compatible (using Semver algorithm). Example: nodejs needs to embed a compatible @types/node nodejs module. Nodejs unstable version is 12 and @types/node does not follow any minor version of nodejs, so:

  • same will often fail
  • ignore will download @types/node version ≥ 14, corresponding to last published version. This generates build errors (see #964637 for example)

The compat target (with compat_group and compat_checksum) will avoid to modify debian/watch regexp and is more precise:

  • if nodejs version is 12.2.3 and @types/nodejs has 12.2.3, 12.2.5, 12.5.6, compat will choose 12.2.5 (last where major and minor match)
  • if nodejs version is 12.2.3 and @types/nodejs has 12.1.3, 12.3.3, 12.5.6, compat will choose 12.5.6 (last where major match)
  • if nodejs version is 12.2.3 and @types/nodejs has no 12.x version, compat won't return any compatible version

Another example:

  • a module has no types embedded in its version 1.x, @types/foo is available and compat downloads it
  • upstream decide to publish 2.X with embedded types definitions. @types/foo won't publish any 2.x version. Then uscan fails and DD discovers that embedding @types/foo is no more needed (many examples in nodejs packages)
Edited Nov 06, 2020 by Yadd
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: uscan-version-compat