Documentation ¶
Overview ¶
Package dpkg contains routines to parse Debian package information.
Index ¶
Constants ¶
View Source
const ( DependancySuggests = iota DependancyRecommends DependancyDepends DependancyPreDepends DependancyBreaks DependancyConflicts DependancyProvides DependancyReplaces DependancyEnhances )
dpkg deptype
View Source
const ( PriorityRequired = iota PriorityImportant PriorityStandard PriorityOptional PriorityExtra PriorityOther PriorityUnknown PriorityUnset = -1 )
dpkg pkgpriority
View Source
const ( StatusNotInstalled = iota StatusConfigFiles StatusHalfInstalled StatusUnpacked StatusHalfConfigured StatusTriggersAwaited StatusTriggersPending StatusInstalled )
dpkg pkgstatus
View Source
const ( WantUnknown = iota WantInstall WantHold WantDeinstall WantPurge )
dpkg pkgwant
View Source
const ( Earlier = 0001 Later = 0002 Strict = 0010 OrEqual = 0020 BuiltUp = 0100 None = 0200 EarlierEqual = BuiltUp | Earlier | OrEqual EarlierStrict = BuiltUp | Earlier | Strict LaterEqual = BuiltUp | Later | OrEqual LaterStrict = BuiltUp | Later | Strict Exact = 0400 )
dpkg depverrel
Variables ¶
View Source
var ( DebianStatus = "/var/lib/dpkg/status" DebianInfo = "/var/lib/dpkg/info" )
Functions ¶
Types ¶
type Dependancies ¶
type Dependancies []Dependancy
func (Dependancies) Check ¶
func (f Dependancies) Check() error
func (*Dependancies) Parse ¶
func (f *Dependancies) Parse(s string) (err error)
func (Dependancies) String ¶
func (f Dependancies) String() string
type Dependancy ¶
type Dependancy struct { PackageInfo Relation int Version version.Version Type int }
func (Dependancy) String ¶
func (dep Dependancy) String() string
type Package ¶
type Package struct { Name Name `dpkg:"Package"` Essential bool Status Status Priority Priority Section string InstalledSize int64 `dpkg:"Installed-Size"` Origin string Maintainer string Bugs string Architecture string Source string Version string Revision string ConfigVersion string `dpkg:"Config-Version"` Replaces Dependancies Provides Dependancies Depends Dependancies PreDepends Dependancies `dpkg:"Pre-Depends"` Recommends Dependancies Suggests Dependancies Breaks Dependancies Conflicts Dependancies Enhances Dependancies Conffiles Conffiles Filename string Size int64 MD5sum string Description string Extra map[string]string }
Package describes a package in the dpkg database. Fields as described in dpkg/lib/dpkg/parse.c
type PackageInfo ¶
type StatusParser ¶
type StatusParser struct {
// contains filtered or unexported fields
}
func NewStatus ¶
func NewStatus(r io.Reader) *StatusParser
func (*StatusParser) Packages ¶
func (p *StatusParser) Packages() (pkgs []Package, err error)
Click to show internal directories.
Click to hide internal directories.