Documentation ¶
Index ¶
Constants ¶
View Source
const ( // PkgHold means package is installed and held to a version PkgHold = "hold ok installed" // PkgInstalled means package is installed normally PkgInstalled = "install ok installed" // PkgRemoved means package has been removed, but not purged (config files still present) PkgRemoved = "deinstall ok config-files" // PkgUninstalled means package has been uninstalled PkgUninstalled = "unknown ok not-installed" )
Outputs from dpkg-query
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
Sys pkg.SysCaller
}
Manager provides a concrete implementation of PackageManager for debian packages.
func (*Manager) InstallPackage ¶
InstallPackage installs a package, returning an error if something went wrong
func (*Manager) InstalledVersion ¶
InstalledVersion gets the installed version of package, if available
type Preparer ¶
type Preparer struct { // Name of the package or package group. Name string `hcl:"name" required:"true" nonempty:"true"` // State of the package. Present means the package will be installed if // missing; Absent means the package will be uninstalled if present. State pkg.State `hcl:"state" valid_values:"present,absent"` }
Preparer for Debian Package
Apt Package manages system packages with `apt` and `dpkg`. It assumes that both `apt` and `dpkg` are installed on the system, and that the user has permissions to install, remove, and query packages.
Click to show internal directories.
Click to hide internal directories.