debian

package
v0.0.0-...-767721b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2015 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dpkg

type Dpkg struct {
	// contains filtered or unexported fields
}

Dpkg provides access to a subset of the overall dpkg features.

Instead of exec'ing dpkg-query (which is sloooow), we instead rely on a native implementation that allows us to execute the operations we need fast and asynchronously.

func NewDpkg

func NewDpkg() *Dpkg

NewDpkg returns a new Dpkg instance, pointing to the system default dpkg runtime dir

func (Dpkg) Architecture

func (self Dpkg) Architecture() (string, error)

func (Dpkg) QueryForFilePattern

func (self Dpkg) QueryForFilePattern(pattern string) ([]string, error)

QueryForFilePattern searches through all installed files, matching them against pattern and returns the list of package names containing a file matching patterns.

Returns an error if globbing /var/lib/dpkg/info/*.list fails.

func (Dpkg) Show

func (self Dpkg) Show(name string) (Package, error)

Show loads all package information for the package with name.

type Package

type Package textproto.MIMEHeader

func NewPackage

func NewPackage(reader *bufio.Reader) (Package, error)

func (Package) Arch

func (self Package) Arch() string

func (Package) IsInstalledCorrectly

func (self Package) IsInstalledCorrectly() bool

func (Package) Name

func (self Package) Name() string

func (Package) Version

func (self Package) Version() string

type System

type System struct {
	// contains filtered or unexported fields
}

System implements pkg.System for a Debian system

func NewSystem

func NewSystem() *System

NewSystem returns a new System instance, providing it with a valid Dpkg instance.

func (System) Arch

func (self System) Arch() (pkg.Arch, error)

Arch queries the system architecture that the system has been built for.

Returns an error if querying the information from the system fails.

func (System) Resolve

func (self System) Resolve(pattern string) ([]pkg.Bundle, error)

Resolve returns all packages containing a file matching pattern.

Returns an error if querying the underlying package index fails.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL