Skip to content

Truly honor pinning when looking for the source package to download

The previous approach was flawed for these reasons:

  • With --no-apt-fallback (no_fallback_enabled_source_suites = True), find_source_version_to_download() always ended up selecting the lowest versioned package, regardless of pinning, given that the for loop iterating over available the versions has a break after the first candidate version is found:
    if no_fallback_enabled_source_suites:
        break

however sometimes pinning would require a different version.

  • Without --no-apt-fallback (no_fallback_enabled_source_suites = False, the defualt), in the case of disjoint package sets from different suites/pocket, we always ended up selecting the highest version. This was even documented in the function docstring, but is in my opinion wrong. We should honor pinning instead.

  • In my understanding --no-apt-fallback should not affect the selection of the source package to download at all: it should only relax pinning in case the test dependencies are uninstallable with the default "strict" pinning.

This changes makes pinning (= priority) more significant than versions, and the version selection independent from --no-apt-pinning.

This amends 38bd054b.

Merge request reports

Loading