apt

package
v0.0.0-...-434a8ce Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPkgSystemError

func CheckPkgSystemError(lock bool) error

func DownloadPackages

func DownloadPackages(packages []string, environ map[string]string, options map[string]string) (string, error)

func GenOnlineUpdatePackagesByEmulateInstall

func GenOnlineUpdatePackagesByEmulateInstall(packages []string, option []string) (map[string]system.PackageInfo, map[string]system.PackageInfo, error)

GenOnlineUpdatePackagesByEmulateInstall option 需要带上仓库参数 // TODO 存在正则范围不够的情况,导致风险,需要替换成ListDistUpgradePackages

func ListDistUpgradePackages

func ListDistUpgradePackages(sourcePath string, option []string) ([]string, error)

ListDistUpgradePackages return the pkgs from apt dist-upgrade NOTE: the result strim the arch suffix

func ListInstallPackages

func ListInstallPackages(packages []string) ([]string, error)

func NewSystem

func NewSystem(nonUnknownList []string, otherList []string) system.System

func OptionToArgs

func OptionToArgs(options map[string]string) []string

func WaitDpkgLockRelease

func WaitDpkgLockRelease()

Types

type APTSystem

type APTSystem struct {
	CmdSet    map[string]*system.Command
	Indicator system.Indicator
}

func New

func New(nonUnknownList []string, otherList []string) APTSystem

func (*APTSystem) Abort

func (p *APTSystem) Abort(jobId string) error

func (*APTSystem) AbortWithFailed

func (p *APTSystem) AbortWithFailed(jobId string) error

func (*APTSystem) AddCMD

func (p *APTSystem) AddCMD(cmd *system.Command)

func (*APTSystem) AttachIndicator

func (p *APTSystem) AttachIndicator(f system.Indicator)

func (*APTSystem) CheckSystem

func (p *APTSystem) CheckSystem(jobId string, checkType string, environ map[string]string, cmdArgs map[string]string) error

func (*APTSystem) Clean

func (p *APTSystem) Clean(jobId string) error

func (*APTSystem) DistUpgrade

func (p *APTSystem) DistUpgrade(jobId string, packages []string, environ map[string]string, args map[string]string) error

func (*APTSystem) DownloadPackages

func (p *APTSystem) DownloadPackages(jobId string, packages []string, environ map[string]string, args map[string]string) error

func (*APTSystem) DownloadSource

func (p *APTSystem) DownloadSource(jobId string, packages []string, environ map[string]string, args map[string]string) error

func (*APTSystem) FindCMD

func (p *APTSystem) FindCMD(id string) *system.Command

func (*APTSystem) FixError

func (p *APTSystem) FixError(jobId string, errType string, environ map[string]string, args map[string]string) error

func (*APTSystem) Install

func (p *APTSystem) Install(jobId string, packages []string, environ map[string]string, args map[string]string) error

func (*APTSystem) Remove

func (p *APTSystem) Remove(jobId string, packages []string, environ map[string]string) error

func (*APTSystem) RemoveCMD

func (p *APTSystem) RemoveCMD(id string)

func (*APTSystem) UpdateSource

func (p *APTSystem) UpdateSource(jobId string, environ map[string]string, args map[string]string) error

Jump to

Keyboard shortcuts

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