Update vendor dependencies

Signed-off-by: Jguer <me@jguer.space>
This commit is contained in:
Jguer 2018-03-20 08:54:58 +01:00
parent 81bb5a1990
commit 66eac83c23
5 changed files with 57 additions and 29 deletions

2
Gopkg.lock generated
View file

@ -5,7 +5,7 @@
branch = "master"
name = "github.com/jguer/go-alpm"
packages = ["."]
revision = "c2766b2ff83df422e2be6073099849aab33cc1e7"
revision = "ec031c9cd5f6050edc3c2f23df2bff3bbb9511cc"
[[projects]]
branch = "master"

View file

@ -377,7 +377,6 @@ func (conf *PacmanConfig) CreateHandle() (*Handle, error) {
return nil, err
}
err = h.SetRemoteFileSigLevel(conf.RemoteFileSigLevel)
if err != nil {
return nil, err

View file

@ -75,7 +75,6 @@ func (h Handle) optionGetList(f func(*C.alpm_handle_t) *C.alpm_list_t) (StringLi
return goList, nil
}
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
@ -168,7 +167,6 @@ func (h Handle) Lockfile() (string, error) {
})
}
func (h Handle) CacheDirs() (StringList, error) {
return h.optionGetList(func(handle *C.alpm_handle_t) *C.alpm_list_t {
return C.alpm_option_get_cachedirs(handle)
@ -472,7 +470,6 @@ func (h Handle) SetArch(str string) error {
})
}
func (h Handle) DeltaRatio() (float64, error) {
ok := C.alpm_option_get_deltaratio(h.ptr)
if ok < 0 {
@ -489,7 +486,6 @@ func (h Handle) SetDeltaRatio(ratio float64) error {
return nil
}
func (h Handle) CheckSpace() (bool, error) {
ok := C.alpm_option_get_checkspace(h.ptr)
b := false

View file

@ -93,7 +93,6 @@ func (l DependList) Slice() []Depend {
return slice
}
func (pkg Package) FileName() string {
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))
}
func (pkg Package) Validation() Validation {
return Validation(C.alpm_pkg_get_validation(pkg.pmpkg))
}

View file

@ -11,9 +11,9 @@ package alpm
import "C"
import (
"fmt"
"reflect"
"unsafe"
"fmt"
)
// Description of a dependency.
@ -184,6 +184,14 @@ func (question QuestionAny) QuestionInstallIgnorepkg() (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) {
if install {
question.ptr.install = 1
@ -247,3 +255,30 @@ func (question QuestionReplace) newDb(h *Handle) Db {
*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)
}