From b3a53d613d270e8f62db688cfc1503399570e4e8 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Tue, 24 Jul 2018 13:04:07 +0100 Subject: [PATCH 1/3] Update vendored dependencies --- Gopkg.lock | 2 +- vendor/github.com/mikkeloscar/aur/aur.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Gopkg.lock b/Gopkg.lock index 0281eb12..c3f4ee22 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -17,7 +17,7 @@ branch = "master" name = "github.com/mikkeloscar/aur" packages = ["."] - revision = "837b260b8e90895c45737e2e72313fe5bce6f2c4" + revision = "2980c04ca5c926b2cb7c4ac3ac8dc0b7f70d29ba" [solve-meta] analyzer-name = "dep" diff --git a/vendor/github.com/mikkeloscar/aur/aur.go b/vendor/github.com/mikkeloscar/aur/aur.go index 6e0a804a..778ea1e1 100644 --- a/vendor/github.com/mikkeloscar/aur/aur.go +++ b/vendor/github.com/mikkeloscar/aur/aur.go @@ -41,6 +41,7 @@ type Pkg struct { Provides []string `json:"Provides"` Replaces []string `json:"Replaces"` OptDepends []string `json:"OptDepends"` + Groups []string `json:"Groups"` License []string `json:"License"` Keywords []string `json:"Keywords"` } From 523c471a456547861935dce4b6e01be8bfb7e8e7 Mon Sep 17 00:00:00 2001 From: morganamilo Date: Tue, 24 Jul 2018 01:48:36 +0100 Subject: [PATCH 2/3] Add extra fields to -Si[i] --- print.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/print.go b/print.go index 3f571a27..bc162bb0 100644 --- a/print.go +++ b/print.go @@ -275,9 +275,12 @@ func printInfoValue(str, value string) { func PrintInfo(a *rpc.Pkg) { printInfoValue("Repository", "aur") printInfoValue("Name", a.Name) + printInfoValue("Keywords", strings.Join(a.Keywords, " ")) printInfoValue("Version", a.Version) printInfoValue("Description", a.Description) printInfoValue("URL", a.URL) + printInfoValue("AUR URL", baseURL+"/packages/"+a.Name) + printInfoValue("Groups", strings.Join(a.Groups, " ")) printInfoValue("Licenses", strings.Join(a.License, " ")) printInfoValue("Provides", strings.Join(a.Provides, " ")) printInfoValue("Depends On", strings.Join(a.Depends, " ")) @@ -288,12 +291,22 @@ func PrintInfo(a *rpc.Pkg) { printInfoValue("Maintainer", a.Maintainer) printInfoValue("Votes", fmt.Sprintf("%d", a.NumVotes)) printInfoValue("Popularity", fmt.Sprintf("%f", a.Popularity)) + printInfoValue("First Submitted", formatTime(a.FirstSubmitted)) + printInfoValue("Last Modified", formatTime(a.LastModified)) + if a.OutOfDate != 0 { printInfoValue("Out-of-date", "Yes ["+formatTime(a.OutOfDate)+"]") } else { printInfoValue("Out-of-date", "No") } + if cmdArgs.existsDouble("i") { + printInfoValue("ID", fmt.Sprintf("%d", a.ID)) + printInfoValue("Package Base ID", fmt.Sprintf("%d", a.PackageBaseID)) + printInfoValue("Package Base", a.PackageBase) + printInfoValue("Snapshot URL", baseURL+a.URLPath) + } + fmt.Println() } From 7c74dc5dec8c73a3de7a1cd45a7dcd3d45e51bbf Mon Sep 17 00:00:00 2001 From: morganamilo Date: Tue, 24 Jul 2018 01:49:54 +0100 Subject: [PATCH 3/3] Use none for empty fields --- print.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/print.go b/print.go index bc162bb0..2f2f27c7 100644 --- a/print.go +++ b/print.go @@ -268,6 +268,10 @@ func printDownloads(repoName string, length int, packages string) { } func printInfoValue(str, value string) { + if value == "" { + value = "None" + } + fmt.Printf(bold("%-16s%s")+" %s\n", str, ":", value) }