Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 RPM Package
RPM Package manages system packages with `rpm` and `yum`. It assumes that both `rpm` and `yum` are installed on the system, and that the user has permissions to install, remove, and query packages.
type YumManager ¶
type YumManager struct {
Sys pkg.SysCaller
}
YumManager provides a concrete implementation of PackageManager for yum packages.
func (*YumManager) InstallPackage ¶
func (y *YumManager) InstallPackage(pkg string) (string, error)
InstallPackage installs a package, returning an error if something went wrong
func (*YumManager) InstalledVersion ¶
func (y *YumManager) InstalledVersion(p string) (pkg.PackageVersion, bool)
InstalledVersion gets the installed version of package, if available
func (*YumManager) RemovePackage ¶
func (y *YumManager) RemovePackage(pkg string) (string, error)
RemovePackage removes a package, returning an error if something went wrong
Click to show internal directories.
Click to hide internal directories.