Commit ec821892 authored by guinux's avatar guinux

add pacman 5.2 support

parent f740662d
......@@ -49,7 +49,6 @@ internal class AlpmConfig {
string? logfile;
string? gpgdir;
string? arch;
double deltaratio;
int usesyslog;
GLib.List<string> cachedirs;
GLib.List<string> hookdirs;
......@@ -91,7 +90,6 @@ internal class AlpmConfig {
holdpkgs = new GLib.List<string> ();
syncfirsts = new GLib.List<string> ();
usesyslog = 0;
deltaratio = 0.7;
siglevel = Alpm.Signature.Level.PACKAGE | Alpm.Signature.Level.PACKAGE_OPTIONAL | Alpm.Signature.Level.DATABASE | Alpm.Signature.Level.DATABASE_OPTIONAL;
localfilesiglevel = Alpm.Signature.Level.USE_DEFAULT;
remotefilesiglevel = Alpm.Signature.Level.USE_DEFAULT;
......@@ -193,7 +191,6 @@ internal class AlpmConfig {
}
handle.gpgdir = gpgdir;
handle.arch = arch;
handle.deltaratio = deltaratio;
handle.usesyslog = usesyslog;
handle.checkspace = 1;
handle.defaultsiglevel = siglevel;
......@@ -299,8 +296,6 @@ internal class AlpmConfig {
} else {
arch = val;
}
} else if (key == "UseDelta") {
deltaratio = double.parse (val);
} else if (key == "UseSysLog") {
usesyslog = 1;
} else if (key == "SigLevel") {
......
......@@ -487,7 +487,7 @@ namespace Pamac {
foreach (unowned string name in alpm_config.get_syncfirsts ()) {
unowned Alpm.Package? pkg = Alpm.find_satisfier (alpm_handle.localdb.pkgcache, name);
if (pkg != null) {
unowned Alpm.Package? candidate = pkg.sync_newversion (alpm_handle.syncdbs);
unowned Alpm.Package? candidate = pkg.get_new_version (alpm_handle.syncdbs);
if (candidate != null) {
to_syncfirst.add (candidate.name);
}
......@@ -1379,7 +1379,6 @@ namespace Pamac {
case Alpm.Errno.PKG_INVALID:
case Alpm.Errno.PKG_INVALID_CHECKSUM:
case Alpm.Errno.PKG_INVALID_SIG:
case Alpm.Errno.DLT_INVALID:
details.add (Alpm.strerror (errno) + ":");
unowned Alpm.List<string*> list = err_data;
while (list != null) {
......@@ -1473,21 +1472,6 @@ namespace Pamac {
case 15: //Alpm.Event.Type.LOAD_START
current_action = dgettext (null, "Loading packages files") + "...";
break;
case 17: //Alpm.Event.Type.DELTA_INTEGRITY_START
emit_action (dgettext (null, "Checking delta integrity") + "...");
break;
case 19: //Alpm.Event.Type.DELTA_PATCHES_START
emit_action (dgettext (null, "Applying deltas") + "...");
break;
case 21: //Alpm.Event.Type.DELTA_PATCH_START
emit_script_output (dgettext (null, "Generating %s with %s").printf (details[0], details[1]) + "...");
break;
case 22: //Alpm.Event.Type.DELTA_PATCH_DONE
emit_script_output (dgettext (null, "Generation succeeded") + ".");
break;
case 23: //Alpm.Event.Type.DELTA_PATCH_FAILED
emit_script_output (dgettext (null, "Generation failed") + ".");
break;
case 24: //Alpm.Event.Type.SCRIPTLET_INFO
// hooks output are also emitted as SCRIPTLET_INFO
if (current_filename != "") {
......@@ -1803,10 +1787,6 @@ void cb_event (Alpm.Event.Data data) {
break;
}
break;
case Alpm.Event.Type.DELTA_PATCH_START:
details.add (data.delta_patch_delta.to);
details.add (data.delta_patch_delta.delta);
break;
case Alpm.Event.Type.SCRIPTLET_INFO:
details.add (data.scriptlet_info_line);
break;
......
......@@ -1743,7 +1743,7 @@ namespace Pamac {
unowned Alpm.Package installed_pkg = pkgcache.data;
// check if installed_pkg is in IgnorePkg or IgnoreGroup
if (tmp_handle.should_ignore (installed_pkg) == 0) {
unowned Alpm.Package? candidate = installed_pkg.sync_newversion (tmp_handle.syncdbs);
unowned Alpm.Package? candidate = installed_pkg.get_new_version (tmp_handle.syncdbs);
if (candidate != null) {
repos_updates.append (initialise_pkg (candidate));
} else {
......
/*
* Vala bindings for libalpm
*
* Copyright (C) 2014-2016 Guillaume Benoit <guillaume@manjaro.org>
* Copyright (C) 2014-2019 Guillaume Benoit <guillaume@manjaro.org>
* Copyright (c) 2011 Rémy Oudompheng <remy@archlinux.org>
*
* This program is free software; you can redistribute it and/or modify
......@@ -162,11 +162,6 @@ namespace Alpm {
[CCode (cname = "alpm_option_remove_assumeinstalled")]
public int remove_assumeinstalled(Depend dep);
public double deltaratio {
[CCode (cname = "alpm_option_get_deltaratio")] get;
[CCode (cname = "alpm_option_set_deltaratio")] set;
}
public int checkspace {
[CCode (cname = "alpm_option_get_checkspace")] get;
[CCode (cname = "alpm_option_set_checkspace")] set;
......@@ -476,18 +471,12 @@ namespace Alpm {
public unowned Alpm.List<unowned Depend> provides {
[CCode (cname = "alpm_pkg_get_provides")] get;
}
public unowned Alpm.List<unowned string> deltas {
[CCode (cname = "alpm_pkg_get_deltas")] get;
}
public unowned Alpm.List<unowned Depend> replaces {
[CCode (cname = "alpm_pkg_get_replaces")] get;
}
public unowned FileList files {
[CCode (cname = "alpm_pkg_get_files")] get;
}
public unowned Alpm.List<unowned string> unused_deltas {
[CCode (cname = "alpm_pkg_unused_deltas")] get;
}
public unowned Alpm.List<unowned Backup> backups {
[CCode (cname = "alpm_pkg_get_backup")] get;
}
......@@ -549,8 +538,8 @@ namespace Alpm {
public Alpm.List<string> compute_requiredby();
public Alpm.List<string> compute_optionalfor();
[CCode (cname = "alpm_sync_newversion")]
public unowned Package? sync_newversion(Alpm.List<unowned DB> dbs);
[CCode (cname = "alpm_sync_get_new_version")]
public unowned Package? get_new_version(Alpm.List<unowned DB> dbs);
public int check_pgp_signature(out SigList siglist);
}
......@@ -638,24 +627,6 @@ namespace Alpm {
public unowned Alpm.List<unowned Package> packages;
}
/** Package upgrade delta */
[CCode (cname = "alpm_delta_t", has_type_id = false)]
[Compact]
public class Delta {
/** filename of the delta patch */
public string delta;
/** md5sum of the delta file */
public string delta_md5;
/** filename of the 'before' file */
public string from;
/** filename of the 'after' file */
public string to;
/** filesize of the delta file */
public uint64 delta_size;
/** download filesize of the delta file */
public uint64 download_size;
}
/** File in a package */
[CCode (cname = "alpm_file_t", has_type_id = false)]
[Compact]
......@@ -828,21 +799,6 @@ namespace Alpm {
LOAD_START,
/** Target package is finished loading. */
LOAD_DONE,
/** Target delta's integrity will be checked. */
DELTA_INTEGRITY_START,
/** Target delta's integrity was checked. */
DELTA_INTEGRITY_DONE,
/** Deltas will be applied to packages. */
DELTA_PATCHES_START,
/** Deltas were applied to packages. */
DELTA_PATCHES_DONE,
/** Delta patch will be applied to target package; See
* DeltaPatch for arguments. */
DELTA_PATCH_START,
/** Delta patch was applied to target package. */
DELTA_PATCH_DONE,
/** Delta patch failed to apply to target package. */
DELTA_PATCH_FAILED,
/** Scriptlet has printed information; See ScriptletInfo for
* arguments. */
SCRIPTLET_INFO,
......@@ -925,15 +881,6 @@ namespace Alpm {
public unowned Depend optdep;
}
[CCode (cname = "alpm_event_delta_patch_t", has_type_id = false)]
[Compact]
public class DeltaPatch {
/** Type of event. */
public Type type;
/** Delta info */
public Delta delta;
}
[CCode (cname = "alpm_event_scriptlet_info_t", has_type_id = false)]
[Compact]
public class ScriptletInfo {
......@@ -1032,9 +979,6 @@ namespace Alpm {
public unowned Package optdep_removal_pkg;
[CCode (cname = "optdep_removal.optdep")]
public unowned Depend optdep_removal_optdep;
// DeltaPatch delta_patch;
[CCode (cname = "delta_patch.delta")]
public Delta delta_patch_delta;
// ScriptletInfo scriptlet_info;
[CCode (cname = "scriptlet_info.line")]
public unowned string scriptlet_info_line;
......@@ -1295,8 +1239,7 @@ namespace Alpm {
public enum TransFlag {
/** Ignore dependency checks. */
NODEPS = 1,
/** Ignore file conflicts and overwrite files. */
FORCE = (1 << 1),
/* (1 << 1) flag can go here */
/** Delete files even if they are tagged as backup. */
NOSAVE = (1 << 2),
/** Ignore version numbers when checking dependencies. */
......@@ -1383,9 +1326,6 @@ namespace Alpm {
/* Signatures */
SIG_MISSING,
SIG_INVALID,
/* Deltas */
DLT_INVALID,
DLT_PATCHFAILED,
/* Dependencies */
UNSATISFIED_DEPS,
CONFLICTING_DEPS,
......@@ -1397,7 +1337,9 @@ namespace Alpm {
LIBARCHIVE,
LIBCURL,
EXTERNAL_DOWNLOAD,
GPGME
GPGME,
/* Missing compile-time features */
MISSING_CAPABILITY_SIGNATURES
}
[CCode (cname = "alpm_list_t", cprefix = "alpm_list_", cheader_filename = "alpm_list.h",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment