mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 09:07:21 +01:00
Update vendored go-alpm
This commit is contained in:
parent
7fd5677678
commit
8a0bade6cd
15
vendor/github.com/jguer/go-alpm/package.go
generated
vendored
15
vendor/github.com/jguer/go-alpm/package.go
generated
vendored
@ -282,6 +282,21 @@ func (pkg Package) ComputeRequiredBy() []string {
|
||||
return requiredby
|
||||
}
|
||||
|
||||
// ComputeOptionalFor returns the names of packages that optionally require the given package
|
||||
func (pkg Package) ComputeOptionalFor() []string {
|
||||
result := C.alpm_pkg_compute_optionalfor(pkg.pmpkg)
|
||||
optionalfor := make([]string, 0)
|
||||
for i := (*list)(unsafe.Pointer(result)); i != nil; i = i.Next {
|
||||
defer C.free(unsafe.Pointer(i))
|
||||
if i.Data != nil {
|
||||
defer C.free(unsafe.Pointer(i.Data))
|
||||
name := C.GoString((*C.char)(unsafe.Pointer(i.Data)))
|
||||
optionalfor = append(optionalfor, name)
|
||||
}
|
||||
}
|
||||
return optionalfor
|
||||
}
|
||||
|
||||
// NewVersion checks if there is a new version of the package in the Synced DBs.
|
||||
func (pkg Package) NewVersion(l DbList) *Package {
|
||||
ptr := C.alpm_sync_newversion(pkg.pmpkg,
|
||||
|
Loading…
Reference in New Issue
Block a user