update

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const RPMInstallRepoPath = "/system/upgrade/repository/"

RPMInstallRepoPath is the path where RPM contents are expected to installed/extracted.

Variables

This section is empty.

Functions

func Commit

func Commit(result *Status, library string) bool

Commit runs the commit-precheck and commit plugins of the update workflow.

func Install

func Install(result *Status, library string) bool

Install runs the preinstall and install plugins of the update workflow.

func Reboot

func Reboot(result *Status, library string) bool

Reboot runs the prereboot plugins and reboot the system as part of the

update workflow.

func RegisterCommandOptions

func RegisterCommandOptions(progname string)

RegisterCommandOptions registers the command options that are supported

func Rollback

func Rollback(result *Status, library string) bool

Rollback runs the required rollback plugins of the update workflow in the

new version/partition.

func ScanCommandOptions

func ScanCommandOptions(options map[string]interface{}) error

ScanCommandOptions scans for the command line options and makes appropriate function call. Input:

  1. map[string]interface{} where, the options could be following: "progname": Name of the program along with any cmds (ex: asum pm) "cmd-index": Index to the cmd (ex: run)

Types

type Status

type Status struct {
	// INFO: The Status contains info of all operations so as to support
	//  all operations with one call to asum with appropriate flags set to
	// 	continue onto the next operation.
	// 	Ex: Install can receive auto-reboot=true, in which after installation
	// 		is completed successfully, `asum` will run reboot operation.
	Install   []pm.RunStatus `yaml:",omitempty"`
	Reboot    []pm.RunStatus `yaml:",omitempty"`
	Rollback  []pm.RunStatus `yaml:",omitempty"`
	Commit    []pm.RunStatus `yaml:",omitempty"`
	Status    string
	StdOutErr string
}

Status is the execution/run status of PM on a specified plugin type.

Jump to

Keyboard shortcuts

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