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β eitherpresentorabsent, and it defaults topresent. so if you don't say anything, she's installing. periodt.
π₯ REQUIRED PARAMETERS π₯
sourceβ the path to the*.debpackage. yes you have to give this. no you cannot skip it. bestie. π
π BOOLEAN PARAMETERS π
purge-if-absentβ if you pass this whilestateisabsent, 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.
β COPYRIGHT β
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
- fedora 43: cdist 7.0.0-16.fc43 Β· GPL-3.0-only
- fedora 44: cdist 7.0.0-18.fc44 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms