cli

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDBLocation    = "/.cache/eopkg-deps.db"
	DefaultIndexLocation = "/var/lib/eopkg/index/Unstable/eopkg-index.xml"
)

Paths

View Source
const (
	DBOpenErrorFormat = "Failed to open DB, reason: '%s'\n"
	UserErrorFormat   = "Failed to get user, reason: '%s'\n"
)

Error Strings

View Source
const (
	PackageFormat      = "Package: %s\n\n"
	PackageFormatColor = "\033[1mPackage:\033[0m %s\n\n"
	RowFormat          = "%s\t%d\n"
	RowFormatColor     = "\033[0m%s\t%d\n"
)

Format Strings

View Source
const (
	// DependencyHeader is a table heading for forward dependencies
	DependencyHeader = "Dependency\tSince Release\n"
	// DependencyHeaderColor is a table heading for forward dependencies, in color
	DependencyHeaderColor = "\033[1mDependency\tSince Release\n"
)
View Source
const (
	// ReverseDependencyHeader is a table heading for reverse dependencies
	ReverseDependencyHeader = "Reverse Dependency\tRelease\n"
	// ReverseDependencyHeaderColor is a table heading for reverse dependencies, in color
	ReverseDependencyHeaderColor = "\033[1mReverse Dependency\tRelease\n"
)
View Source
const (
	// ToDoHeader is a table heading for remaining packages
	ToDoHeader = "Unblocked Packages"
	// ToDoHeaderColor is a table heading for remaining packages, in color
	ToDoHeaderColor = "\033[1mUnblocked Packages"
)
View Source
const (
	// WorstHeader is a table heading for required rebuilds
	WorstHeader = "Required Rebuilds"
	// WorstHeaderColor is a table heading for required rebuilds, in color
	WorstHeaderColor = "\033[1mRequired Rebuilds"
)

Variables

View Source
var Done = cmd.Sub{
	Name:  "done",
	Alias: "do",
	Short: "Mark a package as rebuilt, marking reverse deps for rebuilds",
	Args:  &DoneArgs{},
	Run:   DoneRun,
}

Done marks a package as rebuilt and optionally marks its reverse dependencies for rebuilds

View Source
var Forward = cmd.Sub{
	Name:  "forward",
	Alias: "fwd",
	Short: "Get this package's dependencies",
	Args:  &ForwardArgs{},
	Run:   ForwardRun,
}

Forward gets a list of packages that this package depends on

View Source
var Reset = cmd.Sub{
	Name:  "reset",
	Alias: "clr",
	Short: "Clear the entire todo list",
	Run:   ResetRun,
}

Reset clears the current todo

View Source
var Reverse = cmd.Sub{
	Name:  "reverse",
	Alias: "rev",
	Short: "Get this package's reverse dependencies",
	Args:  &ReverseArgs{},
	Run:   ReverseRun,
}

Reverse gets a list of packages that depend on this package

View Source
var Root = &cmd.Root{
	Name:  "eopkg-deps",
	Short: "Manage and work with eopkg dependencies",
	Flags: &GlobalFlags{
		NoColor: false,
	},
}

Root is the main command for this application

View Source
var Start = cmd.Sub{
	Name:  "start",
	Alias: "to",
	Short: "Mark a package for rebuilds",
	Args:  &StartArgs{},
	Run:   StartRun,
}

Start marks a package for rebuilds

View Source
var ToDo = cmd.Sub{
	Name:  "todo",
	Alias: "td",
	Short: "Get packages to rebuild",
	Run:   ToDoRun,
}

ToDo gets a list of packages that still need to be rebuilt

View Source
var Update = cmd.Sub{
	Name:  "update",
	Alias: "up",
	Short: "Update rebuilds the datastore from the eopkg index",
	Run:   UpdateRun,
}

Update creats a new datastore and populates it from the current eopkg index

View Source
var Worst = cmd.Sub{
	Name:  "worst",
	Alias: "ow",
	Short: "Calculate the worst-case rebuild list",
	Args:  &WorstArgs{},
	Run:   WorstRun,
}

Worst estimates what a full receursive rebuild would look like

Functions

func DoneRun

func DoneRun(r *cmd.Root, c *cmd.Sub)

DoneRun carries out the "done" subcommand

func ForwardRun

func ForwardRun(r *cmd.Root, c *cmd.Sub)

ForwardRun carries out the "forward" subcommand

func ResetRun

func ResetRun(r *cmd.Root, c *cmd.Sub)

ResetRun carries out the "reset" subcommand

func ReverseRun

func ReverseRun(r *cmd.Root, c *cmd.Sub)

ReverseRun carries out the "Reverse" subcommand

func StartRun

func StartRun(r *cmd.Root, c *cmd.Sub)

StartRun carries out the "start" subcommand

func ToDoRun

func ToDoRun(r *cmd.Root, c *cmd.Sub)

ToDoRun carries out the "todo" subcommand

func UpdateRun

func UpdateRun(r *cmd.Root, c *cmd.Sub)

UpdateRun carries out the "update" subcommand

func WorstRun

func WorstRun(r *cmd.Root, c *cmd.Sub)

WorstRun carries out the "worst" subcommand

Types

type DoneArgs

type DoneArgs struct {
	Name     string `desc:"the name of the package that was rebuilt"`
	Continue string `desc:"queue the reverse deps? (yes/no)"`
}

DoneArgs contains the arguments for the "done" subcommand

type ForwardArgs

type ForwardArgs struct {
	Package string `desc:"the name of the package"`
}

ForwardArgs contains the arguments for the "forward" subcommand

type GlobalFlags

type GlobalFlags struct {
	NoColor bool `short:"N" long:"no-color" desc:"Disable coloring of output text"`
}

GlobalFlags contains flags applicable to all sub-commands

type ReverseArgs

type ReverseArgs struct {
	Package string `desc:"the name of the package"`
}

ReverseArgs contains the arguments for the "reverse" subcommand

type StartArgs

type StartArgs struct {
	Name string `desc:"the name of the package to rebuild"`
}

StartArgs contains the arguments for the "start" subcommand

type WorstArgs

type WorstArgs struct {
	Name string `desc:"the name of the package to rebuild"`
}

WorstArgs contains the arguments for the "worst" subcommand

Jump to

Keyboard shortcuts

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