stub out fake installs of available packages

This commit is contained in:
Stephen McQuay 2018-03-03 22:24:37 -08:00
parent b5d3b6d213
commit 63c5def07f
Signed by untrusted user: sm
GPG Key ID: 4E4B72F479BA3CE5

View File

@ -1,10 +1,25 @@
package pkg
import (
"log"
"github.com/pkg/errors"
"mcquay.me/pm/db"
)
// Install fetches and installs pkgs from appropriate remotes.
func Install(root string, pkgs []string) error {
av, err := db.LoadAvailable(root)
if err != nil {
return errors.Wrap(err, "loading available db")
}
ms, err := av.Installable(pkgs)
if err != nil {
return errors.Wrap(err, "checking ability to install")
}
for _, m := range ms {
log.Printf("fake install %v", m)
}
return errors.New("NYI")
}