Documentation ¶
Index ¶
- Constants
- Variables
- func DoneRun(r *cmd.Root, c *cmd.Sub)
- func ForwardRun(r *cmd.Root, c *cmd.Sub)
- func ResetRun(r *cmd.Root, c *cmd.Sub)
- func ReverseRun(r *cmd.Root, c *cmd.Sub)
- func StartRun(r *cmd.Root, c *cmd.Sub)
- func ToDoRun(r *cmd.Root, c *cmd.Sub)
- func UpdateRun(r *cmd.Root, c *cmd.Sub)
- func WorstRun(r *cmd.Root, c *cmd.Sub)
- type DoneArgs
- type ForwardArgs
- type GlobalFlags
- type ReverseArgs
- type StartArgs
- type WorstArgs
Constants ¶
const ( DefaultDBLocation = "/.cache/eopkg-deps.db" DefaultIndexLocation = "/var/lib/eopkg/index/Unstable/eopkg-index.xml" )
Paths
const ( DBOpenErrorFormat = "Failed to open DB, reason: '%s'\n" UserErrorFormat = "Failed to get user, reason: '%s'\n" )
Error Strings
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
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" )
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" )
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" )
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 ¶
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
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
var Reset = cmd.Sub{ Name: "reset", Alias: "clr", Short: "Clear the entire todo list", Run: ResetRun, }
Reset clears the current todo
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
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
var Start = cmd.Sub{ Name: "start", Alias: "to", Short: "Mark a package for rebuilds", Args: &StartArgs{}, Run: StartRun, }
Start marks a package for rebuilds
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
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
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 ForwardRun ¶
ForwardRun carries out the "forward" subcommand
func ReverseRun ¶
ReverseRun carries out the "Reverse" 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