converge: github.com/asteris-llc/converge/resource/package/rpm Index | Files

package rpm

import "github.com/asteris-llc/converge/resource/package/rpm"

Index

Package Files

package_manager.go preparer.go

type Preparer Uses

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.

func (*Preparer) Prepare Uses

func (p *Preparer) Prepare(ctx context.Context, render resource.Renderer) (resource.Task, error)

Prepare a new packge

type YumManager Uses

type YumManager struct {
    Sys pkg.SysCaller
}

YumManager provides a concrete implementation of PackageManager for yum packages.

func (*YumManager) InstallPackage Uses

func (y *YumManager) InstallPackage(pkg string) (string, error)

InstallPackage installs a package, returning an error if something went wrong

func (*YumManager) InstalledVersion Uses

func (y *YumManager) InstalledVersion(p string) (pkg.PackageVersion, bool)

InstalledVersion gets the installed version of package, if available

func (*YumManager) RemovePackage Uses

func (y *YumManager) RemovePackage(pkg string) (string, error)

RemovePackage removes a package, returning an error if something went wrong

Package rpm imports 7 packages (graph) and is imported by 1 packages. Updated 2016-12-25. Refresh now. Tools for package owners.