MCPcopy Create free account
hub / github.com/aptly-dev/aptly / RootCommand

Function RootCommand

cmd/cmd.go:81–131  ·  view source on GitHub ↗

RootCommand creates root command in command tree

()

Source from the content-addressed store, hash-verified

79
80// RootCommand creates root command in command tree
81func RootCommand() *commander.Command {
82 cmd := &commander.Command{
83 UsageLine: os.Args[0],
84 Short: "Debian repository management tool",
85 Long: `
86aptly is a tool to create partial and full mirrors of remote
87repositories, manage local repositories, filter them, merge,
88upgrade individual packages, take snapshots and publish them
89back as Debian repositories.
90
91aptly's goal is to establish repeatability and controlled changes
92in a package-centric environment. aptly allows one to fix a set of packages
93in a repository, so that package installation and upgrade becomes
94deterministic. At the same time aptly allows one to perform controlled,
95fine-grained changes in repository contents to transition your
96package environment to new version.`,
97 Flag: *flag.NewFlagSet("aptly", flag.ExitOnError),
98 Subcommands: []*commander.Command{
99 makeCmdConfig(),
100 makeCmdDB(),
101 makeCmdGraph(),
102 makeCmdMirror(),
103 makeCmdRepo(),
104 makeCmdServe(),
105 makeCmdSnapshot(),
106 makeCmdTask(),
107 makeCmdPublish(),
108 makeCmdVersion(),
109 makeCmdPackage(),
110 makeCmdAPI(),
111 },
112 }
113
114 cmd.Flag.Int("db-open-attempts", 10, "number of attempts to open DB if it's locked by other instance")
115 cmd.Flag.Bool("dep-follow-suggests", false, "when processing dependencies, follow Suggests")
116 cmd.Flag.Bool("dep-follow-source", false, "when processing dependencies, follow from binary to Source packages")
117 cmd.Flag.Bool("dep-follow-recommends", false, "when processing dependencies, follow Recommends")
118 cmd.Flag.Bool("dep-follow-all-variants", false, "when processing dependencies, follow a & b if dependency is 'a|b'")
119 cmd.Flag.Bool("dep-verbose-resolve", false, "when processing dependencies, print detailed logs")
120 cmd.Flag.String("architectures", "", "list of architectures to consider during (comma-separated), default to all available")
121 cmd.Flag.String("config", "", "location of configuration file (default locations in order: ~/.aptly.conf, /usr/local/etc/aptly.conf, /etc/aptly.conf)")
122 cmd.Flag.String("gpg-provider", "", "PGP implementation (\"gpg\", \"gpg1\", \"gpg2\" for external gpg or \"internal\" for Go internal implementation)")
123
124 if aptly.EnableDebug {
125 cmd.Flag.String("cpuprofile", "", "write cpu profile to file")
126 cmd.Flag.String("memprofile", "", "write memory profile to this file")
127 cmd.Flag.String("memstats", "", "write memory stats periodically to this file")
128 cmd.Flag.Duration("meminterval", 100*time.Millisecond, "memory stats dump interval")
129 }
130 return cmd
131}

Callers 4

TestRunMainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
aptlyTaskRunFunction · 0.85

Calls 13

makeCmdConfigFunction · 0.85
makeCmdDBFunction · 0.85
makeCmdGraphFunction · 0.85
makeCmdMirrorFunction · 0.85
makeCmdRepoFunction · 0.85
makeCmdServeFunction · 0.85
makeCmdSnapshotFunction · 0.85
makeCmdTaskFunction · 0.85
makeCmdPublishFunction · 0.85
makeCmdVersionFunction · 0.85
makeCmdPackageFunction · 0.85
makeCmdAPIFunction · 0.85

Tested by 1

TestRunMainFunction · 0.74