Local Plugin
Description
After each libdnf5 transaction copy all downloaded packages to local repositories on the filesystem and generate repository metadata.
The plugin creates two repositories:
_dnf_localfor packages from repositories withpkg_gpgcheckenabled. Thepkg_gpgchecksetting is inherited from the main configuration. The repository doesn’t specify anygpgkey, it assumes all required keys were already imported._dnf_local_nogpgcheckfor packages from repositories withpkg_gpgcheckdisabled. This repository haspkg_gpgcheckset tofalse.
Each repository is only created when there are cached packages in it.
Both repositories are configured with the following options:
skip_if_unavailable = true
metadata_expire = 0
The _dnf_local repository has cost = 500 and the _dnf_local_nogpgcheck
repository has cost = 501, so the gpgcheck-enabled repository is preferred
when both contain the same package.
To generate the metadata createrepo_c is required.
Configuration
The plugin configuration is in /etc/dnf/libdnf5-plugins/local.conf.
The minimal content of the conf file should contain main and createrepo sections.
The main section requires:
name-
The plugin’s name is
local enabledWhether or where the plugin is enabled:
true,false,host-only,installroot-only.For
host-onlythe plugin will run only on transactions in the default installroot/.For
installroot-onlythe plugin will run only on transactions in installroots different from/.
It can also contain:
repodir-
Path where the local repository is located. By default it is in persistdir in
plugins/localsubdirectory. repodir_nogpgcheck-
Path where the local repository for packages from repos with
pkg_gpgcheckdisabled is located. By default it is in persistdir inplugins/local-nogpgchecksubdirectory.
The createrepo section requires:
enabled-
Whether running
createrepoto generate repodata is enabled:trueorfalse.
Additionally it can contain: