import "github.com/juju/packaging"
Package packaging abstracts away differences between package managers like apt and yum and allows for easy extension for other package managers/distros.
preferences.go source.go utils.go
type PackagePreferences struct { Path string // the file the prefs will be written at Explanation string // a short explanation for the preference Package string // the name of the package the preference applies to Pin string // a pin on a certain source Priority int // the priority of that source }
PackagePreferences is a set of packaging preferences associated to a particular set of packages and repository. On apt-based systems, they are apt_preferences(5) compatible preferences for an apt source. It can be used to override the default priority for the source. Path where the file will be created (usually in /etc/apt/preferences.d/).
RenderPreferenceFile returns contents of the package-manager specific config file of this paritcular package source.
type PackageSource struct { Name string `yaml:"-"` URL string `yaml:"source"` Key string `yaml:"key,omitempty"` }
PackageSource contains all the data required for a package source.
func (s *PackageSource) KeyFileName() string
KeyFileName returns the name of this source's keyfile.
RenderSourceFile renders the current source based on a template it recieves.
Path | Synopsis |
---|---|
commands | Package commands contains an interface which returns common package-manager related commands and the reference implementation for apt and yum-based systems. |
config | The config package defines an interface which returns packaging-related configuration options and operations depending on the desired package-management system. |
manager | The manager package defines an interface which can carry out numerous package-management related operations on the local system and the respective implementations on apt and yum-based systems. |
manager/testing | This package contains a mock implementation of the manager.PackageManager interface which always returns positive outcomes and a nil error. |
Package packaging imports 2 packages (graph) and is imported by 6 packages. Updated 2020-05-06. Refresh now. Tools for package owners.