yum

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultAuthCommand = "sudo"

DefaultAuthCommand is the default command used for authentication.

Variables

This section is empty.

Functions

This section is empty.

Types

type YumManager

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

YumManager implements PackageManager for systems using YUM.

func NewYumManager

func NewYumManager() *YumManager

NewYumManager creates a new YumManager with default settings.

func (*YumManager) CheckVersion added in v0.7.0

func (y *YumManager) CheckVersion(pkg, version string) (string, []string)

CheckVersion returns the command and arguments for checking the info of a specific package.

func (*YumManager) Configure

func (y *YumManager) Configure(options ...pkgcommon.PackageManagerOption)

Configure applies functional options to customize the package manager.

func (*YumManager) Install

func (y *YumManager) Install(pkg, version string, args []string) (string, []string)

Install returns the command and arguments for installing a package.

func (YumManager) Parse added in v0.7.0

func (y YumManager) Parse(output string) (*pkgcommon.PackageVersion, error)

Parse parses the dnf info output to extract Installed and Candidate versions.

func (*YumManager) Remove

func (y *YumManager) Remove(pkg string, args []string) (string, []string)

Remove returns the command and arguments for removing a package.

func (*YumManager) SetAuthCommand

func (y *YumManager) SetAuthCommand(authCommand string)

SetAuthCommand sets the authentication command.

func (*YumManager) SetUseAuth

func (y *YumManager) SetUseAuth(useAuth bool)

SetUseAuth enables or disables authentication.

func (*YumManager) Upgrade

func (y *YumManager) Upgrade(pkg, version string) (string, []string)

Upgrade returns the command and arguments for upgrading a specific package.

func (*YumManager) UpgradeAll

func (y *YumManager) UpgradeAll() (string, []string)

UpgradeAll returns the command and arguments for upgrading all packages.

Jump to

Keyboard shortcuts

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