packaging: Index | Files | Directories

package packaging

import ""

Package packaging abstracts away differences between package managers like apt and yum and allows for easy extension for other package managers/distros.


Package Files

preferences.go source.go utils.go

type PackagePreferences Uses

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

func (*PackagePreferences) RenderPreferenceFile Uses

func (p *PackagePreferences) RenderPreferenceFile(fileTemplate *template.Template) (string, error)

RenderPreferenceFile returns contents of the package-manager specific config file of this paritcular package source.

type PackageSource Uses

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 (*PackageSource) KeyFileName Uses

func (s *PackageSource) KeyFileName() string

KeyFileName returns the name of this source's keyfile.

func (*PackageSource) RenderSourceFile Uses

func (s *PackageSource) RenderSourceFile(fileTemplate *template.Template) (string, error)

RenderSourceFile renders the current source based on a template it recieves.


commandsPackage commands contains an interface which returns common package-manager related commands and the reference implementation for apt and yum-based systems.
configThe config package defines an interface which returns packaging-related configuration options and operations depending on the desired package-management system.
managerThe 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/testingThis 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.