yay/vendor/github.com/jguer/go-alpm/sync.go

28 lines
452 B
Go
Raw Normal View History

2018-07-26 14:58:51 +02:00
// db.go - Functions for database handling.
//
// Copyright (c) 2013 The go-alpm Authors
//
// MIT Licensed. See LICENSE for details.
package alpm
/*
#include <alpm.h>
*/
import "C"
func (h *Handle) SyncSysupgrade(enableDowngrade bool) error {
intEnableDowngrade := C.int(0)
if enableDowngrade {
intEnableDowngrade = C.int(1)
}
ret := C.alpm_sync_sysupgrade(h.ptr, intEnableDowngrade)
if ret != 0 {
return h.LastError()
}
return nil
}