CDIST-TYPE__APT_PIN(7)

✨ cdist-type__apt_pin β€” the manual page, bestie edition ✨

okay so real talk, this is cdist-type__apt_pin, section 7 of the cdist manual. it's the lil type that handles your apt pinning rules and honestly? it's giving organizational queen. πŸ’…


🌸 NAME 🌸

cdist-type__apt_pin β€” manage apt pinning rules, periodt.


πŸ’– DESCRIPTION πŸ’–

so this type adds, removes and edits rules that pin some packages to a specific distribution. it's the moment when you're running multiple debian repositories at the same time and you need them to not fight each other. no cap, it's genuinely useful if you wanna pull just a few specific packages from backports, or maybe from Debian testing... or even sid. πŸ‘‘


πŸ”₯ REQUIRED PARAMETERS πŸ”₯

like, you literally cannot skip these, bestie.

  • distribution β€” tells the type which distribution the package should be pinned to. it accepts codenames like buster/bullseye/sid and suite names like stable/testing/.... both vibes work, pick your fighter. ✨

πŸŽ€ OPTIONAL PARAMETERS πŸŽ€

these ones are optional, but the way they carry the whole operation... iconic.

  • package β€” the package name, a glob, or a regular expression that matches (multiple) packages. if you don't specify it, __object_id gets used instead. πŸ¦‹
  • priority β€” the priority value assigned to the matching packages. defaults to 500. (that's to match the default target distro's priority, iykyk.) ⭐
  • state β€” this gets passed straight through to the underlying __file type. go peek over there for the valid values and the defaults, because that's where the answers live. πŸ’œ

🫢 BOOLEAN PARAMETERS 🫢

  • None.

literally none. nothing. zero. the void. πŸ™ˆ


🌈 EXAMPLES 🌈

here's the part where it gets cute and practical, bestie. copy these exactly, don't freestyle the flags:

# Add the bullseye repo to buster, but do not install any packages by default,
# only if explicitely asked for (-1 means "never" for apt)
 __apt_pin bullseye-default \
    --package "*" \
    --distribution bullseye \
    --priority -1

 require="__apt_pin/bullseye-default" __apt_source bullseye \
    --uri http://deb.debian.org/debian/ \
    --distribution bullseye \
    --component main

 __apt_pin foo --package "foo foo-*" --distribution bullseye

 __foo # Assuming, this installs the `foo` package internally

 __package foo-plugin-extras # Assuming we also need some extra stuff

πŸ‘‘ SEE ALSO πŸ‘‘

go read these too, they're in the group chat:


🧚 AUTHORS 🧚

Daniel Fancsali <fancsali@gmail.com> β€” absolute legend, we stan. πŸ’–


πŸ’€ COPYING πŸ’€

Copyright (C) 2021 Daniel Fancsali. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

(so basically: free to share, free to remix, just keep the license energy intact. no stealing and pretending it's yours, that's not the vibe. ✨)


ungleich GmbH 2021


and that's the whole page bestie!! version 7.0.0, dated Jul 31, 2022, brought to you by the cdist girlies. go pin some packages, you got this. πŸŽ€πŸ’…πŸ¦‹
πŸ“¦ where this page comes from