mirror of
https://github.com/Jguer/yay
synced 2024-10-15 20:42:19 +00:00
Update vendor dependencies
Signed-off-by: Jguer <me@jguer.space>
This commit is contained in:
parent
81bb5a1990
commit
66eac83c23
2
Gopkg.lock
generated
2
Gopkg.lock
generated
|
@ -5,7 +5,7 @@
|
||||||
branch = "master"
|
branch = "master"
|
||||||
name = "github.com/jguer/go-alpm"
|
name = "github.com/jguer/go-alpm"
|
||||||
packages = ["."]
|
packages = ["."]
|
||||||
revision = "c2766b2ff83df422e2be6073099849aab33cc1e7"
|
revision = "ec031c9cd5f6050edc3c2f23df2bff3bbb9511cc"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
|
|
11
vendor/github.com/jguer/go-alpm/conf.go
generated
vendored
11
vendor/github.com/jguer/go-alpm/conf.go
generated
vendored
|
@ -323,9 +323,9 @@ func (conf *PacmanConfig) CreateHandle() (*Handle, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// add hook directories 1-by-1 to avoid overwriting the system directory
|
// add hook directories 1-by-1 to avoid overwriting the system directory
|
||||||
for _,dir := range conf.HookDir {
|
for _, dir := range conf.HookDir {
|
||||||
err = h.AddHookDir(dir)
|
err = h.AddHookDir(dir)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -356,7 +356,7 @@ func (conf *PacmanConfig) CreateHandle() (*Handle, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
h.SetNoUpgrades(conf.NoUpgrade...)
|
h.SetNoUpgrades(conf.NoUpgrade...)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -377,7 +377,6 @@ func (conf *PacmanConfig) CreateHandle() (*Handle, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
err = h.SetRemoteFileSigLevel(conf.RemoteFileSigLevel)
|
err = h.SetRemoteFileSigLevel(conf.RemoteFileSigLevel)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -388,12 +387,12 @@ func (conf *PacmanConfig) CreateHandle() (*Handle, error) {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = h.SetUseSyslog(conf.Options & ConfUseSyslog > 0)
|
err = h.SetUseSyslog(conf.Options&ConfUseSyslog > 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
err = h.SetCheckSpace(conf.Options & ConfCheckSpace > 0)
|
err = h.SetCheckSpace(conf.Options&ConfCheckSpace > 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
14
vendor/github.com/jguer/go-alpm/handle.go
generated
vendored
14
vendor/github.com/jguer/go-alpm/handle.go
generated
vendored
|
@ -65,7 +65,7 @@ func (h Handle) LastError() error {
|
||||||
//
|
//
|
||||||
|
|
||||||
//helper functions for wrapping list_t getters and setters
|
//helper functions for wrapping list_t getters and setters
|
||||||
func (h Handle) optionGetList(f func(*C.alpm_handle_t) *C.alpm_list_t) (StringList, error){
|
func (h Handle) optionGetList(f func(*C.alpm_handle_t) *C.alpm_list_t) (StringList, error) {
|
||||||
alpmList := f(h.ptr)
|
alpmList := f(h.ptr)
|
||||||
goList := StringList{(*list)(unsafe.Pointer(alpmList))}
|
goList := StringList{(*list)(unsafe.Pointer(alpmList))}
|
||||||
|
|
||||||
|
@ -75,7 +75,6 @@ func (h Handle) optionGetList(f func(*C.alpm_handle_t) *C.alpm_list_t) (StringLi
|
||||||
return goList, nil
|
return goList, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (h Handle) optionSetList(hookDirs []string, f func(*C.alpm_handle_t, *C.alpm_list_t) C.int) error {
|
func (h Handle) optionSetList(hookDirs []string, f func(*C.alpm_handle_t, *C.alpm_list_t) C.int) error {
|
||||||
var list *C.alpm_list_t = nil
|
var list *C.alpm_list_t = nil
|
||||||
|
|
||||||
|
@ -141,9 +140,9 @@ func (h Handle) optionSetStr(str string, f func(*C.alpm_handle_t, *C.char) C.int
|
||||||
ok := f(h.ptr, c_str)
|
ok := f(h.ptr, c_str)
|
||||||
|
|
||||||
if ok < 0 {
|
if ok < 0 {
|
||||||
h.LastError()
|
h.LastError()
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -168,7 +167,6 @@ func (h Handle) Lockfile() (string, error) {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (h Handle) CacheDirs() (StringList, error) {
|
func (h Handle) CacheDirs() (StringList, error) {
|
||||||
return h.optionGetList(func(handle *C.alpm_handle_t) *C.alpm_list_t {
|
return h.optionGetList(func(handle *C.alpm_handle_t) *C.alpm_list_t {
|
||||||
return C.alpm_option_get_cachedirs(handle)
|
return C.alpm_option_get_cachedirs(handle)
|
||||||
|
@ -472,7 +470,6 @@ func (h Handle) SetArch(str string) error {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (h Handle) DeltaRatio() (float64, error) {
|
func (h Handle) DeltaRatio() (float64, error) {
|
||||||
ok := C.alpm_option_get_deltaratio(h.ptr)
|
ok := C.alpm_option_get_deltaratio(h.ptr)
|
||||||
if ok < 0 {
|
if ok < 0 {
|
||||||
|
@ -489,7 +486,6 @@ func (h Handle) SetDeltaRatio(ratio float64) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (h Handle) CheckSpace() (bool, error) {
|
func (h Handle) CheckSpace() (bool, error) {
|
||||||
ok := C.alpm_option_get_checkspace(h.ptr)
|
ok := C.alpm_option_get_checkspace(h.ptr)
|
||||||
b := false
|
b := false
|
||||||
|
@ -539,7 +535,7 @@ func (h Handle) GetDefaultSigLevel() (SigLevel, error) {
|
||||||
|
|
||||||
func (h Handle) SetDefaultSigLevel(siglevel 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.alpm_siglevel_t(siglevel))
|
||||||
|
|
||||||
if ok < 0 {
|
if ok < 0 {
|
||||||
return h.LastError()
|
return h.LastError()
|
||||||
}
|
}
|
||||||
|
@ -557,7 +553,7 @@ func (h Handle) GetLocalFileSigLevel() (SigLevel, error) {
|
||||||
|
|
||||||
func (h Handle) SetLocalFileSigLevel(siglevel 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.alpm_siglevel_t(siglevel))
|
||||||
|
|
||||||
if ok < 0 {
|
if ok < 0 {
|
||||||
return h.LastError()
|
return h.LastError()
|
||||||
}
|
}
|
||||||
|
|
2
vendor/github.com/jguer/go-alpm/package.go
generated
vendored
2
vendor/github.com/jguer/go-alpm/package.go
generated
vendored
|
@ -93,7 +93,6 @@ func (l DependList) Slice() []Depend {
|
||||||
return slice
|
return slice
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (pkg Package) FileName() string {
|
func (pkg Package) FileName() string {
|
||||||
return C.GoString(C.alpm_pkg_get_filename(pkg.pmpkg))
|
return C.GoString(C.alpm_pkg_get_filename(pkg.pmpkg))
|
||||||
}
|
}
|
||||||
|
@ -106,7 +105,6 @@ func (pkg Package) Base64Signature() string {
|
||||||
return C.GoString(C.alpm_pkg_get_base64_sig(pkg.pmpkg))
|
return C.GoString(C.alpm_pkg_get_base64_sig(pkg.pmpkg))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func (pkg Package) Validation() Validation {
|
func (pkg Package) Validation() Validation {
|
||||||
return Validation(C.alpm_pkg_get_validation(pkg.pmpkg))
|
return Validation(C.alpm_pkg_get_validation(pkg.pmpkg))
|
||||||
}
|
}
|
||||||
|
|
57
vendor/github.com/jguer/go-alpm/types.go
generated
vendored
57
vendor/github.com/jguer/go-alpm/types.go
generated
vendored
|
@ -11,18 +11,18 @@ package alpm
|
||||||
import "C"
|
import "C"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"reflect"
|
"reflect"
|
||||||
"unsafe"
|
"unsafe"
|
||||||
"fmt"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Description of a dependency.
|
// Description of a dependency.
|
||||||
type Depend struct {
|
type Depend struct {
|
||||||
Name string
|
Name string
|
||||||
Version string
|
Version string
|
||||||
Description string
|
Description string
|
||||||
NameHash uint
|
NameHash uint
|
||||||
Mod DepMod
|
Mod DepMod
|
||||||
}
|
}
|
||||||
|
|
||||||
func convertDepend(dep *C.alpm_depend_t) Depend {
|
func convertDepend(dep *C.alpm_depend_t) Depend {
|
||||||
|
@ -168,7 +168,7 @@ type QuestionInstallIgnorepkg struct {
|
||||||
ptr *C.alpm_question_install_ignorepkg_t
|
ptr *C.alpm_question_install_ignorepkg_t
|
||||||
}
|
}
|
||||||
|
|
||||||
func (question QuestionAny) Type() QuestionType{
|
func (question QuestionAny) Type() QuestionType {
|
||||||
return QuestionType(question.ptr._type)
|
return QuestionType(question.ptr._type)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,6 +184,14 @@ func (question QuestionAny) QuestionInstallIgnorepkg() (QuestionInstallIgnorepkg
|
||||||
return QuestionInstallIgnorepkg{}, fmt.Errorf("Can not convert to QuestionInstallIgnorepkg")
|
return QuestionInstallIgnorepkg{}, fmt.Errorf("Can not convert to QuestionInstallIgnorepkg")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (question QuestionAny) QuestionSelectProvider() (QuestionSelectProvider, error) {
|
||||||
|
if question.Type() == QuestionTypeSelectProvider {
|
||||||
|
return *(*QuestionSelectProvider)(unsafe.Pointer(&question)), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
return QuestionSelectProvider{}, fmt.Errorf("Can not convert to QuestionInstallIgnorepkg")
|
||||||
|
}
|
||||||
|
|
||||||
func (question QuestionInstallIgnorepkg) SetInstall(install bool) {
|
func (question QuestionInstallIgnorepkg) SetInstall(install bool) {
|
||||||
if install {
|
if install {
|
||||||
question.ptr.install = 1
|
question.ptr.install = 1
|
||||||
|
@ -201,7 +209,7 @@ func (question QuestionInstallIgnorepkg) Install() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (question QuestionInstallIgnorepkg) Pkg(h *Handle) Package {
|
func (question QuestionInstallIgnorepkg) Pkg(h *Handle) Package {
|
||||||
return Package {
|
return Package{
|
||||||
question.ptr.pkg,
|
question.ptr.pkg,
|
||||||
*h,
|
*h,
|
||||||
}
|
}
|
||||||
|
@ -224,26 +232,53 @@ func (question QuestionReplace) SetReplace(replace bool) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (question QuestionReplace) Replace() bool {
|
func (question QuestionReplace) Replace() bool {
|
||||||
return question.ptr.replace == 1
|
return question.ptr.replace == 1
|
||||||
}
|
}
|
||||||
|
|
||||||
func (question QuestionReplace) NewPkg(h *Handle) Package {
|
func (question QuestionReplace) NewPkg(h *Handle) Package {
|
||||||
return Package {
|
return Package{
|
||||||
question.ptr.newpkg,
|
question.ptr.newpkg,
|
||||||
*h,
|
*h,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (question QuestionReplace) OldPkg(h *Handle) Package {
|
func (question QuestionReplace) OldPkg(h *Handle) Package {
|
||||||
return Package {
|
return Package{
|
||||||
question.ptr.oldpkg,
|
question.ptr.oldpkg,
|
||||||
*h,
|
*h,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (question QuestionReplace) newDb(h *Handle) Db {
|
func (question QuestionReplace) newDb(h *Handle) Db {
|
||||||
return Db {
|
return Db{
|
||||||
question.ptr.newdb,
|
question.ptr.newdb,
|
||||||
*h,
|
*h,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type QuestionSelectProvider struct {
|
||||||
|
ptr *C.alpm_question_select_provider_t
|
||||||
|
}
|
||||||
|
|
||||||
|
func (question QuestionSelectProvider) Type() QuestionType {
|
||||||
|
return QuestionType(question.ptr._type)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (question QuestionSelectProvider) SetUseIndex(index int) {
|
||||||
|
question.ptr.use_index = C.int(index)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (question QuestionSelectProvider) UseIndex() int {
|
||||||
|
return int(question.ptr.use_index)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (question QuestionSelectProvider) Providers(h *Handle) PackageList {
|
||||||
|
return PackageList{
|
||||||
|
(*list)(unsafe.Pointer(question.ptr.providers)),
|
||||||
|
*h,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (question QuestionSelectProvider) Dep() Depend {
|
||||||
|
return convertDepend(question.ptr.depend)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue