From b6144a7164ce05e46d880cbec7dacf4e581c4a3e Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Wed, 23 Oct 2019 14:41:05 -0300 Subject: [PATCH] update to work with libalpm 5.2 --- pamac.avprj | 16 ++--- po/pamac.pot | 2 +- src/alpm_config.vala | 5 -- src/meson.build | 6 +- src/pamac-clean-cache/meson.build | 2 +- src/pamac-install/meson.build | 2 +- src/pamac-manager/meson.build | 2 +- src/pamac-system-daemon/meson.build | 2 +- src/pamac-system-daemon/system_daemon.vala | 9 +-- src/pamac-tray/meson.build | 2 +- src/pamac-user-daemon/meson.build | 2 +- src/pamac-user-daemon/user_daemon.vala | 2 +- src/vapis/libalpm.vapi | 72 +++------------------- 13 files changed, 28 insertions(+), 96 deletions(-) diff --git a/pamac.avprj b/pamac.avprj index 35dfab7..f7144b0 100644 --- a/pamac.avprj +++ b/pamac.avprj @@ -1,7 +1,7 @@ ### AutoVala Project ### autovala_version: 30 project_name: pamac -project_version: 7.0.2 +project_version: 7.1.0 vala_version: 0.44 custom: data/systemd/pamac-system.service /usr/lib/systemd/system @@ -22,7 +22,7 @@ define: KDE_TRAY vapidir: src/vapis vala_binary: src/pamac-clean-cache/pamac-clean-cache -*version: 7.0.2 +*version: 7.1.0 vala_local_package: Pamac vala_vapi: ../vapis/libalpm.vapi vala_package: posix @@ -32,7 +32,7 @@ vala_check_package: json-glib-1.0 *vala_source: clean_cache.vala vala_binary: src/pamac-install/pamac-install -*version: 7.0.2 +*version: 7.1.0 use_gresource: pamac_installer_gresource_xml vala_local_package: Pamac vala_vapi: ../vapis/libalpm.vapi @@ -45,7 +45,7 @@ vala_check_package: json-glib-1.0 *vala_source: progress_dialog.vala vala_binary: src/pamac-manager/pamac-manager -*version: 7.0.2 +*version: 7.1.0 alias: pamac-updater use_gresource: pamac_manager_gresource_xml vala_local_package: Pamac @@ -60,7 +60,7 @@ vala_check_package: json-glib-1.0 *vala_source: manager_window.vala vala_binary: src/pamac-system-daemon/pamac-system-daemon -*version: 7.0.2 +*version: 7.1.0 vala_local_package: Pamac vala_package: posix vala_check_package: gtk+-3.0 @@ -75,7 +75,7 @@ vala_check_package: polkit-gobject-1 *vala_source: system_daemon.vala vala_binary: src/pamac-tray/pamac-tray -*version: 7.0.2 +*version: 7.1.0 vala_local_package: Pamac vala_package: posix vala_check_package: json-glib-1.0 @@ -97,7 +97,7 @@ end *vala_source: tray.vala vala_binary: src/pamac-user-daemon/pamac-user-daemon -*version: 7.0.2 +*version: 7.1.0 vala_local_package: Pamac vala_package: posix vala_check_package: gtk+-3.0 @@ -111,7 +111,7 @@ vala_check_package: libsoup-2.4 vala_library: src/pamac -*version: 7.0.2 +*version: 7.1.0 *namespace: Pamac use_gresource: pamac_transaction_gresource_xml *vala_package: posix diff --git a/po/pamac.pot b/po/pamac.pot index bb191d5..4b48156 100644 --- a/po/pamac.pot +++ b/po/pamac.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: Pamac\n" "Report-Msgid-Bugs-To: cromer@cromnix.org\n" -"POT-Creation-Date: 2019-09-17 19:17-0300\n" +"POT-Creation-Date: 2019-10-23 14:37-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/src/alpm_config.vala b/src/alpm_config.vala index 7310556..a280c28 100644 --- a/src/alpm_config.vala +++ b/src/alpm_config.vala @@ -52,7 +52,6 @@ public class AlpmConfig { string? logfile; string? gpgdir; string? arch; - double deltaratio; int usesyslog; public int checkspace; GLib.List cachedirs; @@ -96,7 +95,6 @@ public class AlpmConfig { syncfirsts = new GLib.List (); usesyslog = 0; checkspace = 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; @@ -174,7 +172,6 @@ public class AlpmConfig { } handle.gpgdir = gpgdir; handle.arch = arch; - handle.deltaratio = deltaratio; handle.usesyslog = usesyslog; handle.checkspace = checkspace; handle.defaultsiglevel = siglevel; @@ -280,8 +277,6 @@ public class AlpmConfig { } else { arch = val; } - } else if (key == "UseDelta") { - deltaratio = double.parse (val); } else if (key == "UseSysLog") { usesyslog = 1; } else if (key == "CheckSpace") { diff --git a/src/meson.build b/src/meson.build index 7ddd673..c81bd16 100644 --- a/src/meson.build +++ b/src/meson.build @@ -4,7 +4,7 @@ cfg_pamac.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir' cfg_pamac.set('GETTEXT_PACKAGE', 'pamac') cfg_pamac.set('RELEASE_NAME', 'pamac') cfg_pamac.set('PREFIX', get_option('prefix')) -cfg_pamac.set('VERSION', '7.0.2') +cfg_pamac.set('VERSION', '7.1.0') cfg_pamac.set('TESTSRCDIR', meson.source_root()) cfgfile_1 = configure_file( @@ -69,7 +69,7 @@ Pamac_library = shared_library('Pamac', pamac_sources, vala_args: pamac_vala_args, c_args: pamac_c_args, link_args: pamac_link_args, - version: '7.0.2', + version: '7.1.0', soversion: '7', install: true, install_dir: [true, true, true, true]) @@ -98,7 +98,7 @@ pamac_requires += ['vte-2.91'] pamac_requires += ['x11'] pkg_mod = import('pkgconfig') pkg_mod.generate(libraries : Pamac_library, - version : '7.0.2', + version : '7.1.0', name : 'Pamac', filebase : 'Pamac', description : 'Pamac', diff --git a/src/pamac-clean-cache/meson.build b/src/pamac-clean-cache/meson.build index 61471d2..7ed7631 100644 --- a/src/pamac-clean-cache/meson.build +++ b/src/pamac-clean-cache/meson.build @@ -4,7 +4,7 @@ cfg_pamac_clean_cache.set('PKGDATADIR', join_paths(get_option('prefix'),get_opti cfg_pamac_clean_cache.set('GETTEXT_PACKAGE', 'pamac') cfg_pamac_clean_cache.set('RELEASE_NAME', 'pamac') cfg_pamac_clean_cache.set('PREFIX', get_option('prefix')) -cfg_pamac_clean_cache.set('VERSION', '7.0.2') +cfg_pamac_clean_cache.set('VERSION', '7.1.0') cfg_pamac_clean_cache.set('TESTSRCDIR', meson.source_root()) cfgfile_4 = configure_file( diff --git a/src/pamac-install/meson.build b/src/pamac-install/meson.build index 26debe1..974cebd 100644 --- a/src/pamac-install/meson.build +++ b/src/pamac-install/meson.build @@ -4,7 +4,7 @@ cfg_pamac_install.set('PKGDATADIR', join_paths(get_option('prefix'),get_option(' cfg_pamac_install.set('GETTEXT_PACKAGE', 'pamac') cfg_pamac_install.set('RELEASE_NAME', 'pamac') cfg_pamac_install.set('PREFIX', get_option('prefix')) -cfg_pamac_install.set('VERSION', '7.0.2') +cfg_pamac_install.set('VERSION', '7.1.0') cfg_pamac_install.set('TESTSRCDIR', meson.source_root()) cfgfile_5 = configure_file( diff --git a/src/pamac-manager/meson.build b/src/pamac-manager/meson.build index 8408f49..7296abb 100644 --- a/src/pamac-manager/meson.build +++ b/src/pamac-manager/meson.build @@ -4,7 +4,7 @@ cfg_pamac_manager.set('PKGDATADIR', join_paths(get_option('prefix'),get_option(' cfg_pamac_manager.set('GETTEXT_PACKAGE', 'pamac') cfg_pamac_manager.set('RELEASE_NAME', 'pamac') cfg_pamac_manager.set('PREFIX', get_option('prefix')) -cfg_pamac_manager.set('VERSION', '7.0.2') +cfg_pamac_manager.set('VERSION', '7.1.0') cfg_pamac_manager.set('TESTSRCDIR', meson.source_root()) cfgfile_6 = configure_file( diff --git a/src/pamac-system-daemon/meson.build b/src/pamac-system-daemon/meson.build index ac03eaf..374408b 100644 --- a/src/pamac-system-daemon/meson.build +++ b/src/pamac-system-daemon/meson.build @@ -4,7 +4,7 @@ cfg_pamac_system_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_op cfg_pamac_system_daemon.set('GETTEXT_PACKAGE', 'pamac') cfg_pamac_system_daemon.set('RELEASE_NAME', 'pamac') cfg_pamac_system_daemon.set('PREFIX', get_option('prefix')) -cfg_pamac_system_daemon.set('VERSION', '7.0.2') +cfg_pamac_system_daemon.set('VERSION', '7.1.0') cfg_pamac_system_daemon.set('TESTSRCDIR', meson.source_root()) cfgfile_7 = configure_file( diff --git a/src/pamac-system-daemon/system_daemon.vala b/src/pamac-system-daemon/system_daemon.vala index 72fa466..a59a0e4 100644 --- a/src/pamac-system-daemon/system_daemon.vala +++ b/src/pamac-system-daemon/system_daemon.vala @@ -780,7 +780,7 @@ namespace Pamac { foreach (unowned string name in alpm_config.get_syncfirsts ()) { pkg = Alpm.find_satisfier (alpm_handle.localdb.pkgcache, name); if (pkg != null) { - candidate = pkg.sync_newversion (alpm_handle.syncdbs); + candidate = pkg.get_new_version (alpm_handle.syncdbs); if (candidate != null) { var infos = initialise_pkg_struct (candidate); infos.installed_version = pkg.version; @@ -809,7 +809,7 @@ namespace Pamac { unowned Alpm.Package installed_pkg = pkgcache.data; // check if installed_pkg is in IgnorePkg or IgnoreGroup if (alpm_handle.should_ignore (installed_pkg) == 0) { - candidate = installed_pkg.sync_newversion (alpm_handle.syncdbs); + candidate = installed_pkg.get_new_version (alpm_handle.syncdbs); if (candidate != null) { var infos = initialise_pkg_struct (candidate); infos.installed_version = installed_pkg.version; @@ -1616,7 +1616,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: string[] details = {}; details += Alpm.strerror (errno) + ":"; unowned Alpm.List list = err_data; @@ -1776,10 +1775,6 @@ private void cb_event (Alpm.Event.Data data) { break; } break; - case Alpm.Event.Type.DELTA_PATCH_START: - details += data.delta_patch_delta.to; - details += data.delta_patch_delta.delta; - break; case Alpm.Event.Type.SCRIPTLET_INFO: details += data.scriptlet_info_line; break; diff --git a/src/pamac-tray/meson.build b/src/pamac-tray/meson.build index 7c0abd4..fc8c248 100644 --- a/src/pamac-tray/meson.build +++ b/src/pamac-tray/meson.build @@ -4,7 +4,7 @@ cfg_pamac_tray.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('dat cfg_pamac_tray.set('GETTEXT_PACKAGE', 'pamac') cfg_pamac_tray.set('RELEASE_NAME', 'pamac') cfg_pamac_tray.set('PREFIX', get_option('prefix')) -cfg_pamac_tray.set('VERSION', '7.0.2') +cfg_pamac_tray.set('VERSION', '7.1.0') cfg_pamac_tray.set('TESTSRCDIR', meson.source_root()) cfgfile_3 = configure_file( diff --git a/src/pamac-user-daemon/meson.build b/src/pamac-user-daemon/meson.build index fbd20f0..940f6a8 100644 --- a/src/pamac-user-daemon/meson.build +++ b/src/pamac-user-daemon/meson.build @@ -4,7 +4,7 @@ cfg_pamac_user_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_opti cfg_pamac_user_daemon.set('GETTEXT_PACKAGE', 'pamac') cfg_pamac_user_daemon.set('RELEASE_NAME', 'pamac') cfg_pamac_user_daemon.set('PREFIX', get_option('prefix')) -cfg_pamac_user_daemon.set('VERSION', '7.0.2') +cfg_pamac_user_daemon.set('VERSION', '7.1.0') cfg_pamac_user_daemon.set('TESTSRCDIR', meson.source_root()) cfgfile_2 = configure_file( diff --git a/src/pamac-user-daemon/user_daemon.vala b/src/pamac-user-daemon/user_daemon.vala index 70cef58..a895492 100644 --- a/src/pamac-user-daemon/user_daemon.vala +++ b/src/pamac-user-daemon/user_daemon.vala @@ -861,7 +861,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) { - candidate = installed_pkg.sync_newversion (tmp_handle.syncdbs); + candidate = installed_pkg.get_new_version (tmp_handle.syncdbs); if (candidate != null) { var infos = initialise_pkg_struct (candidate); infos.installed_version = installed_pkg.version; diff --git a/src/vapis/libalpm.vapi b/src/vapis/libalpm.vapi index 422c2b5..30c25dc 100644 --- a/src/vapis/libalpm.vapi +++ b/src/vapis/libalpm.vapi @@ -1,7 +1,7 @@ /* * Vala bindings for libalpm * - * Copyright (C) 2014-2016 Guillaume Benoit + * Copyright (C) 2014-2019 Guillaume Benoit * Copyright (c) 2011 Rémy Oudompheng * * 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 provides { [CCode (cname = "alpm_pkg_get_provides")] get; } - public unowned Alpm.List deltas { - [CCode (cname = "alpm_pkg_get_deltas")] get; - } public unowned Alpm.List replaces { [CCode (cname = "alpm_pkg_get_replaces")] get; } public unowned FileList files { [CCode (cname = "alpm_pkg_get_files")] get; } - public unowned Alpm.List unused_deltas { - [CCode (cname = "alpm_pkg_unused_deltas")] get; - } public unowned Alpm.List backups { [CCode (cname = "alpm_pkg_get_backup")] get; } @@ -549,8 +538,8 @@ namespace Alpm { public Alpm.List compute_requiredby(); public Alpm.List compute_optionalfor(); - [CCode (cname = "alpm_sync_newversion")] - public unowned Package? sync_newversion(Alpm.List dbs); + [CCode (cname = "alpm_sync_get_new_version")] + public unowned Package? get_new_version(Alpm.List dbs); public int check_pgp_signature(out SigList siglist); } @@ -638,24 +627,6 @@ namespace Alpm { public unowned Alpm.List 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",