Builtins¶
distgen provides some builtins that might come convenient to you while writing templates. Following is an overview and usage instructions of these builtins.
Commands¶
If you use one of the builtin configs of distgen or your
config contains package_installer.name
that is known (currently
either yum
or dnf
), the commands.pkginstaller
will be
available. Here’s a list of valuable attributes and functions that
become available with commands.pkginstaller
:
commands.pkginstaller.binary
- the name of the binary of the installercommands.pkginstaller.install(['foo', 'bar'])
- installfoo
andbar
packagescommands.pkginstaller.reinstall(['foo', 'bar'])
- reinstallfoo
andbar
packagescommands.pkginstaller.remove(['foo', 'bar'])
- removefoo
andbar
packagescommands.pkginstaller.update(['foo', 'bar'])
- updatefoo
andbar
packagescommands.pkginstaller.update_all()
- update all installed packagescommands.pkginstaller.cleancache()
- clean installer cache