From 49f82610a3dde957e3438c9e2dbf2e337ee8c619 Mon Sep 17 00:00:00 2001 From: stephen mcquay Date: Fri, 2 Mar 2018 23:23:04 -0800 Subject: [PATCH] Stubs in pm pull --- cmd/pm/main.go | 7 ++++++- remote/pull.go | 8 ++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 remote/pull.go diff --git a/cmd/pm/main.go b/cmd/pm/main.go index 5e380d1..8b3a0a5 100644 --- a/cmd/pm/main.go +++ b/cmd/pm/main.go @@ -18,8 +18,9 @@ const usage = `pm: simple, cross-platform system package manager subcommands: environ (env) -- print environment information keyring (key) -- interact with pm's OpenPGP keyring - remote -- configure remote pmd servers package (pkg) -- create packages + pull -- fetch all available packages from all configured remotes + remote -- configure remote pmd servers ` const keyUsage = `pm keyring: interact with pm's OpenPGP keyring @@ -209,6 +210,10 @@ func main() { default: fatalf("unknown package subcommand: %q\n\nusage: %v", sub, remoteUsage) } + case "pull": + if err := remote.Pull(root); err != nil { + fatalf("pulling available packages: %v\n", err) + } default: fatalf("uknown subcommand %q\n\nusage: %v", cmd, usage) } diff --git a/remote/pull.go b/remote/pull.go new file mode 100644 index 0000000..5204052 --- /dev/null +++ b/remote/pull.go @@ -0,0 +1,8 @@ +package remote + +import "github.com/pkg/errors" + +// Pull updates the available package database. +func Pull(root string) error { + return errors.New("NYI") +}