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

package apt

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

Index

Package Files

package_manager.go preparer.go

Constants

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

type Manager Uses

type Manager struct {
    Sys pkg.SysCaller
}

Manager provides a concrete implementation of PackageManager for debian packages.

func (*Manager) InstallPackage Uses

func (a *Manager) InstallPackage(p string) (string, error)

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

func (*Manager) InstalledVersion Uses

func (a *Manager) InstalledVersion(p string) (pkg.PackageVersion, bool)

InstalledVersion gets the installed version of package, if available

func (*Manager) RemovePackage Uses

func (a *Manager) RemovePackage(p string) (string, error)

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

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 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.

func (*Preparer) Prepare Uses

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

Prepare a new package

Package apt imports 7 packages (graph) and is imported by 1 packages. Updated 2017-01-05. Refresh now. Tools for package owners.