CDIST-TYPE__PACKAGE_DPKG(7)

πŸ’– cdist-type__package_dpkg πŸ’–

okay bestie, so this is the cdist manual page for cdist-type__package_dpkg β€” it lives in section 7 of the manual, and it's literally your go-to for managing packages with dpkg. no cap. 🫢


✨ NAME ✨

cdist-type__package_dpkg β€” manage packages with dpkg πŸŽ€


🌸 DESCRIPTION 🌸

so this type is the one you want on Debian and its variants (think Ubuntu, hi πŸ‘‹) when you need to install packages that are handed to you locally as *.deb files. like, you already have the file, you just need it on the system. iconic behavior tbh.

the object you give to this type must be the name of the deb package. and no, you can't freestyle the filename β€” the filename of the deb package has to follow Debian naming conventions, i.e.

${binary:Package}_${Version}_${Architecture}.deb

(peep dpkg-query(1) for the details, she explains it all πŸ’…)


πŸ’… OPTIONAL PARAMETERS πŸ’…

  • state β€” either present or absent, and it defaults to present. so if you don't say anything, she's installing. periodt.

πŸ”₯ REQUIRED PARAMETERS πŸ”₯

  • source β€” the path to the *.deb package. yes you have to give this. no you cannot skip it. bestie. πŸ™ˆ

πŸ‘‘ BOOLEAN PARAMETERS πŸ‘‘

  • purge-if-absent β€” if you pass this while state is absent, the package gets purged from the system (it does this using --purge). so not just removed β€” removed including config. drama. πŸ’€

πŸ” EXPLORER πŸ”

  • pkg_state β€” returns the full package name if the package is installed, and empty otherwise. simple as that, she's not complicated. ✨

πŸ“¬ MESSAGES πŸ“¬

  • installed β€” the deb-file was installed. slay. πŸŽ‰
  • removed (--remove) β€” the package was removed, keeping config.
  • removed (--purge) β€” the package was removed including config (purged). that's the full send. πŸ’€

🌈 EXAMPLES 🌈

installing foo and bar, look at us go:

# Install foo and bar packages
__package_dpkg foo_0.1_all.deb --source /tmp/foo_0.1_all.deb
__package_dpkg bar_1.4.deb --source $__type/files/bar_1.4.deb

uninstalling baz, bye girl:

# uninstall baz:
__package_dpkg baz_1.4_amd64.deb \
    --source $__type/files/baz_1.4_amd64.deb \
    --state "absent"

and if you want her gone gone β€” config files and all:

# uninstall baz and also purge config-files:
__package_dpkg baz_1.4_amd64.deb \
    --source $__type/files/baz_1.4_amd64.deb \
    --purge-if-absent \
    --state "absent"

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’œ AUTHORS πŸ’œ

  • Tomas Pospisek <tpo_deb--@--sourcepole.ch>
  • Thomas Eckert <tom--@--it-eckert.de>

give them their flowers, they built this. πŸ‘‘


πŸŽ€ COPYING πŸŽ€

Copyright (C) 2013 Tomas Pospisek. 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. This type is based on __package_apt.


ungleich GmbH 2021


and that's the whole page bestie!! πŸ’– version 7.0.0, dated Jul 31, 2022 β€” go forth and dpkg responsibly ✨🫢

πŸ“¦ where this page comes from