checkpoint

This commit is contained in:
2020-04-30 20:40:52 -04:00
parent 9aa367e9f5
commit abba062f4f
28 changed files with 615 additions and 544 deletions

View File

@@ -10,6 +10,14 @@ namespace Foodsoft.Alpm
public override Database? DB { get; }
public bool CheckMD5Sum()
{
var ret = alpm.alpm_pkg_checkmd5sum(Handle);
if (ret == 0) return true;
var errno = alpm.alpm_errno(Handle.SafeAlpmHandle);
return errno == Error.PkgInvalid ? false : throw new AlpmException(errno);
}
public void SetInstallReason(InstallReason reason)
{
if (alpm.alpm_pkg_set_reason(Handle, reason) != 0)