From cd4f74a04d3d9fb586ce82e552ee7767cd646734 Mon Sep 17 00:00:00 2001 From: Jguer Date: Tue, 29 May 2018 00:05:37 +0100 Subject: [PATCH] 5.1 vendor update Signed-off-by: Jguer --- Gopkg.lock | 4 ++-- vendor/github.com/jguer/go-alpm/conf.go | 10 +++------- vendor/github.com/jguer/go-alpm/db.go | 2 +- vendor/github.com/jguer/go-alpm/enums.go | 4 ++-- vendor/github.com/jguer/go-alpm/handle.go | 6 +++--- vendor/github.com/jguer/go-alpm/package.go | 10 ++++------ 6 files changed, 15 insertions(+), 21 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index bf537b1a..ebb57c37 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -5,7 +5,7 @@ branch = "master" name = "github.com/jguer/go-alpm" packages = ["."] - revision = "6150b61c07385c54c6dd8087b9be05cf8b064424" + revision = "ad1a7ae8a5232dbbe48dc3f75a42e6812f2dce11" [[projects]] branch = "master" @@ -18,7 +18,7 @@ name = "github.com/mikkeloscar/gopkgbuild" packages = ["."] revision = "7b0e7c63b22efc73e1c10e6f3117fdc03cd21816" - + [solve-meta] analyzer-name = "dep" analyzer-version = 1 diff --git a/vendor/github.com/jguer/go-alpm/conf.go b/vendor/github.com/jguer/go-alpm/conf.go index f449d8e2..a9922565 100644 --- a/vendor/github.com/jguer/go-alpm/conf.go +++ b/vendor/github.com/jguer/go-alpm/conf.go @@ -114,18 +114,14 @@ func (rdr *confReader) ParseLine() (tok iniToken, err error) { rdr.Lineno++ line = bytes.TrimSpace(line) - - comment := bytes.IndexByte(line, '#') - if comment >= 0 { - line = line[:comment] - } - if len(line) == 0 { tok.Type = tokenComment return } - switch line[0] { + case '#': + tok.Type = tokenComment + return case '[': closing := bytes.IndexByte(line, ']') if closing < 0 { diff --git a/vendor/github.com/jguer/go-alpm/db.go b/vendor/github.com/jguer/go-alpm/db.go index 90d1698c..214984de 100644 --- a/vendor/github.com/jguer/go-alpm/db.go +++ b/vendor/github.com/jguer/go-alpm/db.go @@ -89,7 +89,7 @@ func (h Handle) RegisterSyncDb(dbname string, siglevel SigLevel) (*Db, error) { cName := C.CString(dbname) defer C.free(unsafe.Pointer(cName)) - db := C.alpm_register_syncdb(h.ptr, cName, C.alpm_siglevel_t(siglevel)) + db := C.alpm_register_syncdb(h.ptr, cName, C.int(siglevel)) if db == nil { return nil, h.LastError() } diff --git a/vendor/github.com/jguer/go-alpm/enums.go b/vendor/github.com/jguer/go-alpm/enums.go index 2b1bdd3a..ba228089 100644 --- a/vendor/github.com/jguer/go-alpm/enums.go +++ b/vendor/github.com/jguer/go-alpm/enums.go @@ -62,7 +62,7 @@ func (mod DepMod) String() string { } // Signature checking level. -type SigLevel uint +type SigLevel int const ( SigPackage SigLevel = 1 << iota @@ -79,7 +79,7 @@ const ( const SigUseDefault SigLevel = 1 << 31 // Signature status -type SigStatus uint +type SigStatus int const ( SigStatusValid SigStatus = iota diff --git a/vendor/github.com/jguer/go-alpm/handle.go b/vendor/github.com/jguer/go-alpm/handle.go index cdf4a432..d2c8ee82 100644 --- a/vendor/github.com/jguer/go-alpm/handle.go +++ b/vendor/github.com/jguer/go-alpm/handle.go @@ -534,7 +534,7 @@ func (h Handle) GetDefaultSigLevel() (SigLevel, error) { } func (h Handle) SetDefaultSigLevel(siglevel SigLevel) error { - ok := C.alpm_option_set_default_siglevel(h.ptr, C.alpm_siglevel_t(siglevel)) + ok := C.alpm_option_set_default_siglevel(h.ptr, C.int(siglevel)) if ok < 0 { return h.LastError() @@ -552,7 +552,7 @@ func (h Handle) GetLocalFileSigLevel() (SigLevel, error) { } func (h Handle) SetLocalFileSigLevel(siglevel SigLevel) error { - ok := C.alpm_option_set_local_file_siglevel(h.ptr, C.alpm_siglevel_t(siglevel)) + ok := C.alpm_option_set_local_file_siglevel(h.ptr, C.int(siglevel)) if ok < 0 { return h.LastError() @@ -570,7 +570,7 @@ func (h Handle) GetRemoteFileSigLevel() (SigLevel, error) { } func (h Handle) SetRemoteFileSigLevel(siglevel SigLevel) error { - ok := C.alpm_option_set_remote_file_siglevel(h.ptr, C.alpm_siglevel_t(siglevel)) + ok := C.alpm_option_set_remote_file_siglevel(h.ptr, C.int(siglevel)) if ok < 0 { return h.LastError() diff --git a/vendor/github.com/jguer/go-alpm/package.go b/vendor/github.com/jguer/go-alpm/package.go index ef589dd0..8873eb5b 100644 --- a/vendor/github.com/jguer/go-alpm/package.go +++ b/vendor/github.com/jguer/go-alpm/package.go @@ -159,18 +159,16 @@ func (pkg Package) OptionalDepends() DependList { } // Depends returns the package's check dependency list. -//Exists in futre alpm -/*func (pkg Package) CheckDepends() DependList { +func (pkg Package) CheckDepends() DependList { ptr := unsafe.Pointer(C.alpm_pkg_get_checkdepends(pkg.pmpkg)) return DependList{(*list)(ptr)} -}*/ +} // Depends returns the package's make dependency list. -//Exists in futre alpm -/*func (pkg Package) MakeDepends() DependList { +func (pkg Package) MakeDepends() DependList { ptr := unsafe.Pointer(C.alpm_pkg_get_makedepends(pkg.pmpkg)) return DependList{(*list)(ptr)} -}*/ +} // Description returns the package's description. func (pkg Package) Description() string {