Skip to content

Commit

Permalink
backports: pin using codename
Browse files Browse the repository at this point in the history
Debian 11 bullseye and Debian 12 bookworm backports release files look
like this:

https://deb.debian.org/debian/dists/bullseye-backports/InRelease:

    Suite: bullseye-backports
    Codename: bullseye-backports

https://deb.debian.org/debian/dists/bookworm-backports/InRelease:

    Suite: stable-backports
    Codename: bookworm-backports

Using "release" (aka Suite in the InRelease file) causes our pin to not
match for bookworm because they changed it to stable-backports instead
of $codename-backports. We can use codename to support both for this
pin.

Fixes #1187.
  • Loading branch information
kenyon committed Jun 10, 2024
1 parent ee5ba4e commit 6913684
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions manifests/backports.pp
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,9 @@
if $pin =~ Hash {
$_pin = $pin
} elsif $pin =~ Numeric or $pin =~ String {
# apt::source defaults to pinning to origin, but we should pin to release
# for backports
$_pin = {
'priority' => $pin,
'release' => $_release,
'codename' => $_release,
}
} else {
fail('pin must be either a string, number or hash')
Expand Down

0 comments on commit 6913684

Please sign in to comment.