Documentation
¶
Index ¶
- Variables
- func Close()
- func SetErrorAnalyzer(fn func(logs []string, err error) error)
- func SetTranslator(fn func(msgId string) string)
- type Actions
- func (a *Actions) CombineInstallRemovePackages(packagesInstall []string, packagesRemove []string, handler lib.ProgressHandler, ...) error
- func (a *Actions) DistUpgrade(handler lib.ProgressHandler, downloadOnly bool) error
- func (a *Actions) DownloadSourcePackages(packageNames []string, destDir string, handler lib.ProgressHandler) (packages []lib.SourcePackage, err error)
- func (a *Actions) GetConfigOverrides() map[string]string
- func (a *Actions) GetInfo(packageName string) (packageInfo *lib.PackageInfo, err error)
- func (a *Actions) InstallPackages(packageNames []string, handler lib.ProgressHandler, downloadOnly bool) error
- func (a *Actions) ReinstallPackages(packageNames []string, handler lib.ProgressHandler) error
- func (a *Actions) RemovePackages(packageNames []string, purge bool, depends bool, handler lib.ProgressHandler) error
- func (a *Actions) RpmGetInstalledPackages(ctx context.Context, commandPrefix string, noLock ...bool) (map[string]string, error)
- func (a *Actions) RpmInstallSourcePackages(ctx context.Context, commandPrefix string, files []string) error
- func (a *Actions) RpmIsAnyPackageInstalled(packageNames []string) (bool, error)
- func (a *Actions) RpmIsPackageInstalled(packageName string) (bool, error)
- func (a *Actions) RpmQueryKernelPackages(ctx context.Context) ([]KernelRPMInfo, error)
- func (a *Actions) Search(pattern string, noLock ...bool) (packages []lib.PackageInfo, err error)
- func (a *Actions) SetConfigOverrides(overrides map[string]string)
- func (a *Actions) SimulateAutoRemove() (packageChanges *lib.PackageChanges, err error)
- func (a *Actions) SimulateChange(installNames []string, removeNames []string, purge bool, depends bool) (packageChanges *lib.PackageChanges, err error)
- func (a *Actions) SimulateChangeWithRpmInfo(installNames []string, removeNames []string, purge bool, depends bool, ...) (packageChanges *lib.PackageChanges, rpmInfos []*lib.PackageInfo, err error)
- func (a *Actions) SimulateDistUpgrade() (packageChanges *lib.PackageChanges, err error)
- func (a *Actions) SimulateInstall(packageNames []string) (packageInfo *lib.PackageChanges, err error)
- func (a *Actions) SimulateReinstall(packageNames []string) (packageInfo *lib.PackageChanges, err error)
- func (a *Actions) SimulateRemove(packageNames []string, purge bool, depends bool) (packageInfo *lib.PackageChanges, err error)
- func (a *Actions) Update(handler lib.ProgressHandler, noLock ...bool) error
- type InstalledPackageInfo
- type KernelRPMInfo
- type OperationOptions
Constants ¶
This section is empty.
Variables ¶
var T_ = func(msgId string) string { return msgId }
T_ is the string translation hook, defaults to identity
Functions ¶
func SetErrorAnalyzer ¶
SetErrorAnalyzer sets the error analyzer for APT operations
func SetTranslator ¶
SetTranslator sets the translation function for the binding and lib
Types ¶
type Actions ¶
type Actions struct {
// contains filtered or unexported fields
}
func NewActions ¶
func NewActions() *Actions
func (*Actions) CombineInstallRemovePackages ¶
func (a *Actions) CombineInstallRemovePackages(packagesInstall []string, packagesRemove []string, handler lib.ProgressHandler, purge bool, depends bool, downloadOnly bool) error
CombineInstallRemovePackages installs and removes packages in one transaction
func (*Actions) DistUpgrade ¶
func (a *Actions) DistUpgrade(handler lib.ProgressHandler, downloadOnly bool) error
DistUpgrade upgrades the system
func (*Actions) DownloadSourcePackages ¶ added in v0.5.2
func (a *Actions) DownloadSourcePackages(packageNames []string, destDir string, handler lib.ProgressHandler) (packages []lib.SourcePackage, err error)
DownloadSourcePackages downloads .src.rpm files for the given names into destDir
func (*Actions) GetConfigOverrides ¶
GetConfigOverrides returns current APT configuration overrides
func (*Actions) GetInfo ¶
func (a *Actions) GetInfo(packageName string) (packageInfo *lib.PackageInfo, err error)
GetInfo returns info for a single package
func (*Actions) InstallPackages ¶
func (a *Actions) InstallPackages(packageNames []string, handler lib.ProgressHandler, downloadOnly bool) error
InstallPackages installs packages
func (*Actions) ReinstallPackages ¶
func (a *Actions) ReinstallPackages(packageNames []string, handler lib.ProgressHandler) error
ReinstallPackages reinstalls packages
func (*Actions) RemovePackages ¶
func (a *Actions) RemovePackages(packageNames []string, purge bool, depends bool, handler lib.ProgressHandler) error
RemovePackages removes packages
func (*Actions) RpmGetInstalledPackages ¶
func (a *Actions) RpmGetInstalledPackages(ctx context.Context, commandPrefix string, noLock ...bool) (map[string]string, error)
RpmGetInstalledPackages returns a map of installed packages (name -> version)
func (*Actions) RpmInstallSourcePackages ¶ added in v0.5.2
func (a *Actions) RpmInstallSourcePackages(ctx context.Context, commandPrefix string, files []string) error
RpmInstallSourcePackages installs .src.rpm files into the rpm build tree
func (*Actions) RpmIsAnyPackageInstalled ¶
RpmIsAnyPackageInstalled checks whether at least one of the packages is installed
func (*Actions) RpmIsPackageInstalled ¶
RpmIsPackageInstalled checks whether the package is installed
func (*Actions) RpmQueryKernelPackages ¶
func (a *Actions) RpmQueryKernelPackages(ctx context.Context) ([]KernelRPMInfo, error)
RpmQueryKernelPackages returns installed kernels via rpm
func (*Actions) SetConfigOverrides ¶
SetConfigOverrides sets APT configuration overrides
func (*Actions) SimulateAutoRemove ¶
func (a *Actions) SimulateAutoRemove() (packageChanges *lib.PackageChanges, err error)
SimulateAutoRemove simulates removal of unused packages
func (*Actions) SimulateChange ¶
func (a *Actions) SimulateChange(installNames []string, removeNames []string, purge bool, depends bool) (packageChanges *lib.PackageChanges, err error)
SimulateChange simulates combined install and remove
func (*Actions) SimulateChangeWithRpmInfo ¶
func (a *Actions) SimulateChangeWithRpmInfo(installNames []string, removeNames []string, purge bool, depends bool, rpmFiles []string) (packageChanges *lib.PackageChanges, rpmInfos []*lib.PackageInfo, err error)
SimulateChangeWithRpmInfo simulates changes and fetches RPM file info in a single cache session
func (*Actions) SimulateDistUpgrade ¶
func (a *Actions) SimulateDistUpgrade() (packageChanges *lib.PackageChanges, err error)
SimulateDistUpgrade simulates a system upgrade
func (*Actions) SimulateInstall ¶
func (a *Actions) SimulateInstall(packageNames []string) (packageInfo *lib.PackageChanges, err error)
SimulateInstall simulates installation
func (*Actions) SimulateReinstall ¶
func (a *Actions) SimulateReinstall(packageNames []string) (packageInfo *lib.PackageChanges, err error)
SimulateReinstall simulates package reinstallation
func (*Actions) SimulateRemove ¶
func (a *Actions) SimulateRemove(packageNames []string, purge bool, depends bool) (packageInfo *lib.PackageChanges, err error)
SimulateRemove simulates removal
type InstalledPackageInfo ¶
InstalledPackageInfo holds installed package info from rpm
type KernelRPMInfo ¶
KernelRPMInfo holds kernel package info from rpm
type OperationOptions ¶
OperationOptions holds options for APT operations