Skip to content

Commit

Permalink
Fix package pinning when specifying a suite by its release codename
Browse files Browse the repository at this point in the history
Previously, pinning would work when using something like this:

    debspawn create --suite=stable-backports --base-suite=stable ...

but packages would fail to install when using something like this:

    debspawn create --suite=bookworm-backports --base-suite=bookworm ...
  • Loading branch information
dlitz authored and ximion committed May 9, 2024
1 parent 65a5557 commit 8b022b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion debspawn/osbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def _setup_apt_repo_preferences(self, instance_dir, preferred_suites):
priority = 500
if suite == self.suite:
priority = 600
f.write(('Package: *\n' 'Pin: release a={}\n' 'Pin-Priority: {}\n').format(suite, priority))
f.write(('Package: *\n' 'Pin: release {}\n' 'Pin-Priority: {}\n').format(suite, priority))

# we *always* prefer locally injected packages above anything else
f.write('\nPackage: *\nPin: release o=LocalInjected\nPin-Priority: 1000\n')
Expand Down

0 comments on commit 8b022b4

Please sign in to comment.