Skip to content

Commit

Permalink
Add some more help text
Browse files Browse the repository at this point in the history
  • Loading branch information
stvnrhodes committed Sep 22, 2023
1 parent f4bed34 commit f33bddb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions services/packages/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ func (*installCmd) Synopsis() string { return "Install a new package" }
func (*installCmd) Usage() string {
return `install [--package_system=P] --name=X --version=Y [--disablerepo=A] [--repo|enablerepo=Z]:
Install a new package on the remote machine.
Version format is NEVRA without the name, like --name bash --new_version 0:4.2.46-34.el7.x86_64
`
}

Expand Down Expand Up @@ -239,6 +241,8 @@ func (*updateCmd) Synopsis() string { return "Update an existing package" }
func (*updateCmd) Usage() string {
return `update [--package_system=P] --name=X --old_version=Y --new_version=Z [--disablerepo=B] [--repo|enablerepo=A]:
Update a package on the remote machine. The package must already be installed at a known version.
Version format is NEVRA without the name, like -name bash -old_version 0:4.2.46-34.el7.x86_64 -new_version 0:4.2.46-35.el7_9.x86_64
`
}

Expand Down
7 changes: 5 additions & 2 deletions services/packages/server/packages.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,11 @@ var (
}
)

func parseToNumbers(version string) []int {
out := make([]int, 5)
// parseToNumbers parses a string like 14:4.99.3-2.fc38.x86_64 into a slice
// of integers like [14, 4, 99, 3, 2]. Callers should ensure that the input
// is valid.
func parseToNumbers(version string) [5]int {
var out [5]int

// Grab epoch
split := strings.SplitN(version, ":", 2)
Expand Down

0 comments on commit f33bddb

Please sign in to comment.