/* transaction_interface_root.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from transaction_interface_root.vala, do not modify */

/*
 *  pamac-vala
 *
 *  Copyright (C) 2018-2023 Guillaume Benoit <guillaume@manjaro.org>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a get of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib-object.h>
#include <gio/gio.h>
#include <glib.h>
#include <stdlib.h>
#include <string.h>
#include <alpm.h>
#include <float.h>
#include <math.h>
#include <glib/gi18n-lib.h>
#include "pamac.h"

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define PAMAC_TYPE_TRANSACTION_INTERFACE (pamac_transaction_interface_get_type ())
#define PAMAC_TRANSACTION_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_TRANSACTION_INTERFACE, PamacTransactionInterface))
#define PAMAC_IS_TRANSACTION_INTERFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_TRANSACTION_INTERFACE))
#define PAMAC_TRANSACTION_INTERFACE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), PAMAC_TYPE_TRANSACTION_INTERFACE, PamacTransactionInterfaceIface))

typedef struct _PamacTransactionInterface PamacTransactionInterface;
typedef struct _PamacTransactionInterfaceIface PamacTransactionInterfaceIface;

#define PAMAC_TYPE_TRANSACTION_INTERFACE_ROOT (pamac_transaction_interface_root_get_type ())
#define PAMAC_TRANSACTION_INTERFACE_ROOT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_TRANSACTION_INTERFACE_ROOT, PamacTransactionInterfaceRoot))
#define PAMAC_TRANSACTION_INTERFACE_ROOT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_TRANSACTION_INTERFACE_ROOT, PamacTransactionInterfaceRootClass))
#define PAMAC_IS_TRANSACTION_INTERFACE_ROOT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_TRANSACTION_INTERFACE_ROOT))
#define PAMAC_IS_TRANSACTION_INTERFACE_ROOT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_TRANSACTION_INTERFACE_ROOT))
#define PAMAC_TRANSACTION_INTERFACE_ROOT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_TRANSACTION_INTERFACE_ROOT, PamacTransactionInterfaceRootClass))

typedef struct _PamacTransactionInterfaceRoot PamacTransactionInterfaceRoot;
typedef struct _PamacTransactionInterfaceRootClass PamacTransactionInterfaceRootClass;
typedef struct _PamacTransactionInterfaceRootPrivate PamacTransactionInterfaceRootPrivate;

#define PAMAC_TYPE_ALPM_UTILS (pamac_alpm_utils_get_type ())
#define PAMAC_ALPM_UTILS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PAMAC_TYPE_ALPM_UTILS, PamacAlpmUtils))
#define PAMAC_ALPM_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PAMAC_TYPE_ALPM_UTILS, PamacAlpmUtilsClass))
#define PAMAC_IS_ALPM_UTILS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PAMAC_TYPE_ALPM_UTILS))
#define PAMAC_IS_ALPM_UTILS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), PAMAC_TYPE_ALPM_UTILS))
#define PAMAC_ALPM_UTILS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), PAMAC_TYPE_ALPM_UTILS, PamacAlpmUtilsClass))

typedef struct _PamacAlpmUtils PamacAlpmUtils;
typedef struct _PamacAlpmUtilsClass PamacAlpmUtilsClass;
enum  {
	PAMAC_TRANSACTION_INTERFACE_ROOT_0_PROPERTY,
	PAMAC_TRANSACTION_INTERFACE_ROOT_NUM_PROPERTIES
};
static GParamSpec* pamac_transaction_interface_root_properties[PAMAC_TRANSACTION_INTERFACE_ROOT_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
#define _g_main_context_unref0(var) ((var == NULL) ? NULL : (var = (g_main_context_unref (var), NULL)))
typedef struct _PamacTransactionInterfaceRootGetAuthorizationData PamacTransactionInterfaceRootGetAuthorizationData;
#define _g_free0(var) (var = (g_free (var), NULL))
#define _g_error_free0(var) ((var == NULL) ? NULL : (var = (g_error_free (var), NULL)))
typedef struct _PamacAlpmUtilsPrivate PamacAlpmUtilsPrivate;

#define TYPE_ALPM_CONFIG (alpm_config_get_type ())
#define ALPM_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_ALPM_CONFIG, AlpmConfig))
#define ALPM_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_ALPM_CONFIG, AlpmConfigClass))
#define IS_ALPM_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_ALPM_CONFIG))
#define IS_ALPM_CONFIG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_ALPM_CONFIG))
#define ALPM_CONFIG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_ALPM_CONFIG, AlpmConfigClass))

typedef struct _AlpmConfig AlpmConfig;
typedef struct _AlpmConfigClass AlpmConfigClass;
typedef struct _PamacTransactionInterfaceRootGenerateMirrorsListData PamacTransactionInterfaceRootGenerateMirrorsListData;
#define _g_ptr_array_unref0(var) ((var == NULL) ? NULL : (var = (g_ptr_array_unref (var), NULL)))
typedef struct _PamacTransactionInterfaceRootCleanCacheData PamacTransactionInterfaceRootCleanCacheData;
typedef struct _PamacTransactionInterfaceRootCleanBuildFilesData PamacTransactionInterfaceRootCleanBuildFilesData;
typedef struct _PamacTransactionInterfaceRootSetPkgreasonData PamacTransactionInterfaceRootSetPkgreasonData;
typedef struct _Block56Data Block56Data;
#define _g_thread_unref0(var) ((var == NULL) ? NULL : (var = (g_thread_unref (var), NULL)))
typedef struct _PamacTransactionInterfaceRootDownloadUpdatesData PamacTransactionInterfaceRootDownloadUpdatesData;
typedef struct _Block57Data Block57Data;
typedef struct _PamacTransactionInterfaceRootDownloadPkgsData PamacTransactionInterfaceRootDownloadPkgsData;
typedef struct _Block58Data Block58Data;
typedef struct _Block59Data Block59Data;
#define _g_source_unref0(var) ((var == NULL) ? NULL : (var = (g_source_unref (var), NULL)))
typedef struct _PamacTransactionInterfaceRootWaitForLockData PamacTransactionInterfaceRootWaitForLockData;
typedef struct _Block60Data Block60Data;
typedef struct _PamacTransactionInterfaceRootTransRefreshRealData PamacTransactionInterfaceRootTransRefreshRealData;
typedef struct _Block61Data Block61Data;
typedef struct _PamacTransactionInterfaceRootTransRefreshData PamacTransactionInterfaceRootTransRefreshData;
typedef struct _Block62Data Block62Data;
typedef struct _PamacTransactionInterfaceRootTransRefreshFilesRealData PamacTransactionInterfaceRootTransRefreshFilesRealData;
typedef struct _Block63Data Block63Data;
typedef struct _PamacTransactionInterfaceRootTransRefreshFilesData PamacTransactionInterfaceRootTransRefreshFilesData;
typedef struct _Block64Data Block64Data;
typedef struct _PamacTransactionInterfaceRootTransRefreshAurRealData PamacTransactionInterfaceRootTransRefreshAurRealData;
typedef struct _Block65Data Block65Data;
typedef struct _PamacTransactionInterfaceRootTransRefreshAurData PamacTransactionInterfaceRootTransRefreshAurData;
typedef struct _Block66Data Block66Data;
typedef struct _PamacTransactionInterfaceRootTransRunRealData PamacTransactionInterfaceRootTransRunRealData;
typedef struct _Block67Data Block67Data;
typedef struct _PamacTransactionInterfaceRootTransRunData PamacTransactionInterfaceRootTransRunData;
typedef struct _PamacTransactionInterfaceRootSnapTransRunData PamacTransactionInterfaceRootSnapTransRunData;
typedef struct _PamacTransactionInterfaceRootSnapSwitchChannelData PamacTransactionInterfaceRootSnapSwitchChannelData;
typedef struct _PamacTransactionInterfaceRootFlatpakTransRunData PamacTransactionInterfaceRootFlatpakTransRunData;

struct _PamacTransactionInterfaceIface {
	GTypeInterface parent_iface;
	void (*get_authorization) (PamacTransactionInterface* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*get_authorization_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*remove_authorization) (PamacTransactionInterface* self, GError** error);
	void (*generate_mirrors_list) (PamacTransactionInterface* self, const gchar* country, GAsyncReadyCallback _callback_, gpointer _user_data_);
	void (*generate_mirrors_list_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*clean_cache) (PamacTransactionInterface* self, GPtrArray* filenames, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*clean_cache_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*clean_build_files) (PamacTransactionInterface* self, const gchar* aur_build_dir, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*clean_build_files_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*set_pkgreason) (PamacTransactionInterface* self, const gchar* pkgname, guint reason, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*set_pkgreason_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*download_updates) (PamacTransactionInterface* self, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*download_updates_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*download_pkgs) (PamacTransactionInterface* self, GPtrArray* urls, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gchar** (*download_pkgs_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, gint* result_length1, GError** error);
	void (*trans_refresh) (PamacTransactionInterface* self, gboolean force, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*trans_refresh_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*trans_refresh_files) (PamacTransactionInterface* self, gboolean force, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*trans_refresh_files_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*trans_refresh_aur) (PamacTransactionInterface* self, gboolean force, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*trans_refresh_aur_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*trans_run) (PamacTransactionInterface* self, gboolean sysupgrade, gboolean enable_downgrade, gboolean simple_install, gboolean keep_built_pkgs, gint trans_flags, GPtrArray* to_install, GPtrArray* to_remove, GPtrArray* to_load_local, GPtrArray* to_load_remote, GPtrArray* to_install_as_dep, GPtrArray* ignorepkgs, GPtrArray* overwrite_files, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*trans_run_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*trans_cancel) (PamacTransactionInterface* self, GError** error);
	void (*quit_daemon) (PamacTransactionInterface* self, GError** error);
	void (*snap_trans_run) (PamacTransactionInterface* self, GPtrArray* to_install, GPtrArray* to_remove, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*snap_trans_run_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*snap_switch_channel) (PamacTransactionInterface* self, const gchar* snap_name, const gchar* channel, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*snap_switch_channel_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
	void (*flatpak_trans_run) (PamacTransactionInterface* self, GPtrArray* to_install, GPtrArray* to_remove, GPtrArray* to_upgrade, GAsyncReadyCallback _callback_, gpointer _user_data_);
	gboolean (*flatpak_trans_run_finish) (PamacTransactionInterface* self, GAsyncResult* _res_, GError** error);
};

struct _PamacTransactionInterfaceRoot {
	GObject parent_instance;
	PamacTransactionInterfaceRootPrivate * priv;
};

struct _PamacTransactionInterfaceRootClass {
	GObjectClass parent_class;
};

struct _PamacTransactionInterfaceRootPrivate {
	PamacAlpmUtils* alpm_utils;
	gboolean trans_refresh_success;
	gboolean trans_refresh_files_success;
	gboolean trans_refresh_aur_success;
	gboolean trans_run_success;
	GCancellable* trans_cancellable;
	GMainContext* context;
};

struct _PamacTransactionInterfaceRootGetAuthorizationData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean result;
};

struct _PamacAlpmUtils {
	GObject parent_instance;
	PamacAlpmUtilsPrivate * priv;
	AlpmConfig* alpm_config;
	GFile* lockfile;
	alpm_handle_t* alpm_handle;
	GCancellable* cancellable;
	gboolean downloading_updates;
	gchar* current_filename;
	gchar* current_action;
	gdouble current_progress;
	GPtrArray* unresolvables;
	guint64 total_download;
	guint64 already_downloaded;
	GHashTable* multi_progress;
	GTimer* rate_timer;
};

struct _PamacAlpmUtilsClass {
	GObjectClass parent_class;
};

struct _PamacTransactionInterfaceRootGenerateMirrorsListData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gchar* country;
	GSubprocess* process;
	gchar* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	gchar** _tmp3_;
	gchar** _tmp4_;
	gint _tmp4__length1;
	GSubprocess* _tmp5_;
	GSubprocess* _tmp6_;
	GDataInputStream* dis;
	GSubprocess* _tmp7_;
	GInputStream* _tmp8_;
	GDataInputStream* _tmp9_;
	gchar* line;
	gchar* _tmp10_;
	GDataInputStream* _tmp11_;
	gchar* _tmp12_;
	gchar* _tmp13_;
	const gchar* _tmp14_;
	const gchar* _tmp15_;
	GError* e;
	GError* _tmp16_;
	const gchar* _tmp17_;
	PamacAlpmUtils* _tmp18_;
	AlpmConfig* _tmp19_;
	GError* _inner_error0_;
};

struct _PamacTransactionInterfaceRootCleanCacheData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	GPtrArray* filenames;
	gboolean result;
	PamacAlpmUtils* _tmp0_;
	gpointer* _tmp1_;
	gint _tmp1__length1;
};

struct _PamacTransactionInterfaceRootCleanBuildFilesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gchar* aur_build_dir;
	gboolean result;
	PamacAlpmUtils* _tmp0_;
};

struct _PamacTransactionInterfaceRootSetPkgreasonData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gchar* pkgname;
	guint reason;
	gboolean result;
	gboolean success;
	PamacAlpmUtils* _tmp0_;
};

struct _Block56Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gboolean success;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootDownloadUpdatesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean result;
	Block56Data* _data56_;
	GThread* thread;
	GThread* _tmp0_;
	GThread* _tmp1_;
	GError* e;
	GError* _tmp2_;
	const gchar* _tmp3_;
	GError* _inner_error0_;
};

struct _Block57Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	GPtrArray* urls_copy;
	GPtrArray* dload_paths;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootDownloadPkgsData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	GPtrArray* urls;
	gchar** result;
	gint result_length1;
	Block57Data* _data57_;
	GPtrArray* _tmp0_;
	GPtrArray* _tmp1_;
	GThread* thread;
	GThread* _tmp2_;
	GThread* _tmp3_;
	GError* e;
	GError* _tmp4_;
	const gchar* _tmp5_;
	gpointer* _tmp6_;
	gint _tmp6__length1;
	gchar** _tmp7_;
	gint _tmp7__length1;
	gchar** _tmp8_;
	gint _tmp8__length1;
	GError* _inner_error0_;
};

struct _Block58Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gboolean success;
	gpointer _async_data_;
};

struct _Block59Data {
	int _ref_count_;
	Block58Data * _data58_;
	gint i;
};

struct _PamacTransactionInterfaceRootWaitForLockData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean result;
	Block58Data* _data58_;
	gboolean waiting;
	GCancellable* _tmp0_;
	PamacAlpmUtils* _tmp1_;
	GFile* _tmp2_;
	Block59Data* _data59_;
	gchar* _tmp3_;
	gchar* _tmp4_;
	GSource* timeout;
	GSource* _tmp5_;
	GSource* _tmp6_;
	GSource* _tmp7_;
	GMainContext* _tmp8_;
};

struct _Block60Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gboolean force;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootTransRefreshRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean force;
	Block60Data* _data60_;
	gboolean success;
	GThread* _tmp0_;
	GThread* _tmp1_;
	GError* e;
	GError* _tmp2_;
	const gchar* _tmp3_;
	GError* _inner_error0_;
};

struct _Block61Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootTransRefreshData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean force;
	gboolean result;
	Block61Data* _data61_;
	PamacAlpmUtils* _tmp0_;
	PamacAlpmUtils* _tmp1_;
	GCancellable* _tmp2_;
	GSource* timeout;
	GSource* _tmp3_;
	GSource* _tmp4_;
	GSource* _tmp5_;
	GMainContext* _tmp6_;
};

struct _Block62Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gboolean force;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootTransRefreshFilesRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean force;
	Block62Data* _data62_;
	gboolean success;
	GThread* _tmp0_;
	GThread* _tmp1_;
	GError* e;
	GError* _tmp2_;
	const gchar* _tmp3_;
	GError* _inner_error0_;
};

struct _Block63Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootTransRefreshFilesData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean force;
	gboolean result;
	Block63Data* _data63_;
	PamacAlpmUtils* _tmp0_;
	PamacAlpmUtils* _tmp1_;
	GCancellable* _tmp2_;
	GSource* timeout;
	GSource* _tmp3_;
	GSource* _tmp4_;
	GSource* _tmp5_;
	GMainContext* _tmp6_;
};

struct _Block64Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gboolean force;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootTransRefreshAurRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean force;
	Block64Data* _data64_;
	gboolean success;
	GThread* _tmp0_;
	GThread* _tmp1_;
	GError* e;
	GError* _tmp2_;
	const gchar* _tmp3_;
	GError* _inner_error0_;
};

struct _Block65Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootTransRefreshAurData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean force;
	gboolean result;
	Block65Data* _data65_;
	PamacAlpmUtils* _tmp0_;
	PamacAlpmUtils* _tmp1_;
	GCancellable* _tmp2_;
	GSource* timeout;
	GSource* _tmp3_;
	GSource* _tmp4_;
	GSource* _tmp5_;
	GMainContext* _tmp6_;
};

struct _Block66Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gboolean sysupgrade;
	gboolean enable_downgrade;
	gboolean simple_install;
	gboolean keep_built_pkgs;
	gint trans_flags;
	GPtrArray* to_install;
	GPtrArray* to_remove;
	GPtrArray* to_load_local;
	GPtrArray* to_load_remote;
	GPtrArray* to_install_as_dep;
	GPtrArray* ignorepkgs;
	GPtrArray* overwrite_files;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootTransRunRealData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean sysupgrade;
	gboolean enable_downgrade;
	gboolean simple_install;
	gboolean keep_built_pkgs;
	gint trans_flags;
	GPtrArray* to_install;
	GPtrArray* to_remove;
	GPtrArray* to_load_local;
	GPtrArray* to_load_remote;
	GPtrArray* to_install_as_dep;
	GPtrArray* ignorepkgs;
	GPtrArray* overwrite_files;
	Block66Data* _data66_;
	gboolean success;
	GThread* _tmp0_;
	GThread* _tmp1_;
	GError* e;
	GError* _tmp2_;
	const gchar* _tmp3_;
	GError* _inner_error0_;
};

struct _Block67Data {
	int _ref_count_;
	PamacTransactionInterfaceRoot* self;
	gpointer _async_data_;
};

struct _PamacTransactionInterfaceRootTransRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gboolean sysupgrade;
	gboolean enable_downgrade;
	gboolean simple_install;
	gboolean keep_built_pkgs;
	gint trans_flags;
	GPtrArray* to_install;
	GPtrArray* to_remove;
	GPtrArray* to_load_local;
	GPtrArray* to_load_remote;
	GPtrArray* to_install_as_dep;
	GPtrArray* ignorepkgs;
	GPtrArray* overwrite_files;
	gboolean result;
	Block67Data* _data67_;
	PamacAlpmUtils* _tmp0_;
	PamacAlpmUtils* _tmp1_;
	GCancellable* _tmp2_;
	GSource* timeout;
	GSource* _tmp3_;
	GSource* _tmp4_;
	GSource* _tmp5_;
	GMainContext* _tmp6_;
};

struct _PamacTransactionInterfaceRootSnapTransRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	GPtrArray* to_install;
	GPtrArray* to_remove;
	gboolean result;
};

struct _PamacTransactionInterfaceRootSnapSwitchChannelData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	gchar* snap_name;
	gchar* channel;
	gboolean result;
};

struct _PamacTransactionInterfaceRootFlatpakTransRunData {
	int _state_;
	GObject* _source_object_;
	GAsyncResult* _res_;
	GTask* _async_result;
	PamacTransactionInterfaceRoot* self;
	GPtrArray* to_install;
	GPtrArray* to_remove;
	GPtrArray* to_upgrade;
	gboolean result;
};

static gint PamacTransactionInterfaceRoot_private_offset;
static gpointer pamac_transaction_interface_root_parent_class = NULL;
static PamacTransactionInterfaceIface * pamac_transaction_interface_root_pamac_transaction_interface_parent_iface = NULL;

VALA_EXTERN GType pamac_transaction_interface_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType pamac_transaction_interface_root_get_type (void) G_GNUC_CONST ;
VALA_EXTERN GType pamac_alpm_utils_get_type (void) G_GNUC_CONST ;
VALA_EXTERN PamacTransactionInterfaceRoot* pamac_transaction_interface_root_new (PamacAlpmUtils* alpm_utils,
                                                                     GMainContext* context);
VALA_EXTERN PamacTransactionInterfaceRoot* pamac_transaction_interface_root_construct (GType object_type,
                                                                           PamacAlpmUtils* alpm_utils,
                                                                           GMainContext* context);
static void pamac_transaction_interface_root_real_get_authorization_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_get_authorization (PamacTransactionInterface* base,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_get_authorization_co (PamacTransactionInterfaceRootGetAuthorizationData* _data_);
static void pamac_transaction_interface_root_real_remove_authorization (PamacTransactionInterface* base,
                                                                 GError** error);
static void pamac_transaction_interface_root_real_generate_mirrors_list_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_generate_mirrors_list (PamacTransactionInterface* base,
                                                                  const gchar* country,
                                                                  GAsyncReadyCallback _callback_,
                                                                  gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_generate_mirrors_list_co (PamacTransactionInterfaceRootGenerateMirrorsListData* _data_);
static void pamac_transaction_interface_root_generate_mirrors_list_ready (GObject* source_object,
                                                                   GAsyncResult* _res_,
                                                                   gpointer _user_data_);
VALA_EXTERN gpointer alpm_config_ref (gpointer instance);
VALA_EXTERN void alpm_config_unref (gpointer instance);
VALA_EXTERN GParamSpec* param_spec_alpm_config (const gchar* name,
                                    const gchar* nick,
                                    const gchar* blurb,
                                    GType object_type,
                                    GParamFlags flags);
VALA_EXTERN void value_set_alpm_config (GValue* value,
                            gpointer v_object);
VALA_EXTERN void value_take_alpm_config (GValue* value,
                             gpointer v_object);
VALA_EXTERN gpointer value_get_alpm_config (const GValue* value);
VALA_EXTERN GType alpm_config_get_type (void) G_GNUC_CONST ;
VALA_EXTERN void alpm_config_reload (AlpmConfig* self);
static void pamac_transaction_interface_root_real_clean_cache_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_clean_cache (PamacTransactionInterface* base,
                                                        GPtrArray* filenames,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_clean_cache_co (PamacTransactionInterfaceRootCleanCacheData* _data_);
VALA_EXTERN gboolean pamac_alpm_utils_clean_cache (PamacAlpmUtils* self,
                                       gchar** filenames,
                                       gint filenames_length1);
static void pamac_transaction_interface_root_real_clean_build_files_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_clean_build_files (PamacTransactionInterface* base,
                                                              const gchar* aur_build_dir,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_clean_build_files_co (PamacTransactionInterfaceRootCleanBuildFilesData* _data_);
VALA_EXTERN gboolean pamac_alpm_utils_clean_build_files (PamacAlpmUtils* self,
                                             const gchar* aur_build_dir);
static void pamac_transaction_interface_root_real_set_pkgreason_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_set_pkgreason (PamacTransactionInterface* base,
                                                          const gchar* pkgname,
                                                          guint reason,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_set_pkgreason_co (PamacTransactionInterfaceRootSetPkgreasonData* _data_);
VALA_EXTERN gboolean pamac_alpm_utils_set_pkgreason (PamacAlpmUtils* self,
                                         const gchar* sender,
                                         const gchar* pkgname,
                                         guint reason);
static void pamac_transaction_interface_root_real_download_updates_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_download_updates (PamacTransactionInterface* base,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_download_updates_co (PamacTransactionInterfaceRootDownloadUpdatesData* _data_);
static Block56Data* block56_data_ref (Block56Data* _data56_);
static void block56_data_unref (void * _userdata_);
static gint ___lambda48_ (Block56Data* _data56_);
VALA_EXTERN gboolean pamac_alpm_utils_download_updates (PamacAlpmUtils* self,
                                            const gchar* sender);
static gpointer ____lambda48__gthread_func (gpointer self);
static void pamac_transaction_interface_root_real_download_pkgs_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_download_pkgs (PamacTransactionInterface* base,
                                                          GPtrArray* urls,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_download_pkgs_co (PamacTransactionInterfaceRootDownloadPkgsData* _data_);
static Block57Data* block57_data_ref (Block57Data* _data57_);
static void block57_data_unref (void * _userdata_);
static gpointer _g_strdup_gcopy_func (gconstpointer src,
                               gpointer self);
static void _g_free0_ (gpointer var);
static gint ___lambda49_ (Block57Data* _data57_);
VALA_EXTERN gboolean pamac_alpm_utils_download_pkgs (PamacAlpmUtils* self,
                                         const gchar* sender,
                                         gchar** urls,
                                         gint urls_length1,
                                         GPtrArray** dload_paths);
static gpointer ____lambda49__gthread_func (gpointer self);
static gchar** _vala_array_dup2 (gchar** self,
                          gssize length);
static void pamac_transaction_interface_root_wait_for_lock_data_free (gpointer _data);
static void pamac_transaction_interface_root_wait_for_lock (PamacTransactionInterfaceRoot* self,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_);
static gboolean pamac_transaction_interface_root_wait_for_lock_finish (PamacTransactionInterfaceRoot* self,
                                                                GAsyncResult* _res_);
static gboolean pamac_transaction_interface_root_wait_for_lock_co (PamacTransactionInterfaceRootWaitForLockData* _data_);
static Block58Data* block58_data_ref (Block58Data* _data58_);
static void block58_data_unref (void * _userdata_);
static Block59Data* block59_data_ref (Block59Data* _data59_);
static void block59_data_unref (void * _userdata_);
static gboolean ___lambda50_ (Block59Data* _data59_);
static gboolean _pamac_transaction_interface_root_wait_for_lock_co_gsource_func (gpointer self);
static gboolean ____lambda50__gsource_func (gpointer self);
static void pamac_transaction_interface_root_trans_refresh_real_data_free (gpointer _data);
static void pamac_transaction_interface_root_trans_refresh_real (PamacTransactionInterfaceRoot* self,
                                                          gboolean force,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static void pamac_transaction_interface_root_trans_refresh_real_finish (PamacTransactionInterfaceRoot* self,
                                                                 GAsyncResult* _res_);
static gboolean pamac_transaction_interface_root_trans_refresh_real_co (PamacTransactionInterfaceRootTransRefreshRealData* _data_);
static Block60Data* block60_data_ref (Block60Data* _data60_);
static void block60_data_unref (void * _userdata_);
static void pamac_transaction_interface_root_trans_refresh_real_ready (GObject* source_object,
                                                                GAsyncResult* _res_,
                                                                gpointer _user_data_);
static gint ___lambda51_ (Block60Data* _data60_);
static gint ___lambda52_ (Block60Data* _data60_);
VALA_EXTERN gboolean pamac_alpm_utils_trans_refresh (PamacAlpmUtils* self,
                                         const gchar* sender,
                                         gboolean force_refresh);
static gpointer ____lambda52__gthread_func (gpointer self);
static gboolean _pamac_transaction_interface_root_trans_refresh_real_co_gsource_func (gpointer self);
static gpointer ____lambda51__gthread_func (gpointer self);
static void pamac_transaction_interface_root_real_trans_refresh_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_trans_refresh (PamacTransactionInterface* base,
                                                          gboolean force,
                                                          GAsyncReadyCallback _callback_,
                                                          gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_trans_refresh_co (PamacTransactionInterfaceRootTransRefreshData* _data_);
static Block61Data* block61_data_ref (Block61Data* _data61_);
static void block61_data_unref (void * _userdata_);
static gboolean ___lambda53_ (Block61Data* _data61_);
VALA_EXTERN void pamac_transaction_interface_trans_refresh (PamacTransactionInterface* self,
                                                gboolean force,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_trans_refresh_finish (PamacTransactionInterface* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
static gboolean _pamac_transaction_interface_root_real_trans_refresh_co_gsource_func (gpointer self);
static gboolean ____lambda53__gsource_func (gpointer self);
static void pamac_transaction_interface_root_trans_refresh_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_);
static void pamac_transaction_interface_root_trans_refresh_files_real_data_free (gpointer _data);
static void pamac_transaction_interface_root_trans_refresh_files_real (PamacTransactionInterfaceRoot* self,
                                                                gboolean force,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_);
static void pamac_transaction_interface_root_trans_refresh_files_real_finish (PamacTransactionInterfaceRoot* self,
                                                                       GAsyncResult* _res_);
static gboolean pamac_transaction_interface_root_trans_refresh_files_real_co (PamacTransactionInterfaceRootTransRefreshFilesRealData* _data_);
static Block62Data* block62_data_ref (Block62Data* _data62_);
static void block62_data_unref (void * _userdata_);
static void pamac_transaction_interface_root_trans_refresh_files_real_ready (GObject* source_object,
                                                                      GAsyncResult* _res_,
                                                                      gpointer _user_data_);
static gint ___lambda54_ (Block62Data* _data62_);
static gint ___lambda55_ (Block62Data* _data62_);
VALA_EXTERN gboolean pamac_alpm_utils_trans_refresh_files (PamacAlpmUtils* self,
                                               const gchar* sender,
                                               gboolean force_refresh);
static gpointer ____lambda55__gthread_func (gpointer self);
static gboolean _pamac_transaction_interface_root_trans_refresh_files_real_co_gsource_func (gpointer self);
static gpointer ____lambda54__gthread_func (gpointer self);
static void pamac_transaction_interface_root_real_trans_refresh_files_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_trans_refresh_files (PamacTransactionInterface* base,
                                                                gboolean force,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_trans_refresh_files_co (PamacTransactionInterfaceRootTransRefreshFilesData* _data_);
static Block63Data* block63_data_ref (Block63Data* _data63_);
static void block63_data_unref (void * _userdata_);
static gboolean ___lambda56_ (Block63Data* _data63_);
VALA_EXTERN void pamac_transaction_interface_trans_refresh_files (PamacTransactionInterface* self,
                                                      gboolean force,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_trans_refresh_files_finish (PamacTransactionInterface* self,
                                                                 GAsyncResult* _res_,
                                                                 GError** error);
static gboolean _pamac_transaction_interface_root_real_trans_refresh_files_co_gsource_func (gpointer self);
static gboolean ____lambda56__gsource_func (gpointer self);
static void pamac_transaction_interface_root_trans_refresh_files_ready (GObject* source_object,
                                                                 GAsyncResult* _res_,
                                                                 gpointer _user_data_);
static void pamac_transaction_interface_root_trans_refresh_aur_real_data_free (gpointer _data);
static void pamac_transaction_interface_root_trans_refresh_aur_real (PamacTransactionInterfaceRoot* self,
                                                              gboolean force,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_);
static void pamac_transaction_interface_root_trans_refresh_aur_real_finish (PamacTransactionInterfaceRoot* self,
                                                                     GAsyncResult* _res_);
static gboolean pamac_transaction_interface_root_trans_refresh_aur_real_co (PamacTransactionInterfaceRootTransRefreshAurRealData* _data_);
static Block64Data* block64_data_ref (Block64Data* _data64_);
static void block64_data_unref (void * _userdata_);
static void pamac_transaction_interface_root_trans_refresh_aur_real_ready (GObject* source_object,
                                                                    GAsyncResult* _res_,
                                                                    gpointer _user_data_);
static gint ___lambda57_ (Block64Data* _data64_);
static gint ___lambda58_ (Block64Data* _data64_);
VALA_EXTERN gboolean pamac_alpm_utils_trans_refresh_aur (PamacAlpmUtils* self,
                                             const gchar* sender,
                                             gboolean force_refresh);
static gpointer ____lambda58__gthread_func (gpointer self);
static gboolean _pamac_transaction_interface_root_trans_refresh_aur_real_co_gsource_func (gpointer self);
static gpointer ____lambda57__gthread_func (gpointer self);
static void pamac_transaction_interface_root_real_trans_refresh_aur_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_trans_refresh_aur (PamacTransactionInterface* base,
                                                              gboolean force,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_trans_refresh_aur_co (PamacTransactionInterfaceRootTransRefreshAurData* _data_);
static Block65Data* block65_data_ref (Block65Data* _data65_);
static void block65_data_unref (void * _userdata_);
static gboolean ___lambda59_ (Block65Data* _data65_);
VALA_EXTERN void pamac_transaction_interface_trans_refresh_aur (PamacTransactionInterface* self,
                                                    gboolean force,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_trans_refresh_aur_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
static gboolean _pamac_transaction_interface_root_real_trans_refresh_aur_co_gsource_func (gpointer self);
static gboolean ____lambda59__gsource_func (gpointer self);
static void pamac_transaction_interface_root_trans_refresh_aur_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_data_);
static void pamac_transaction_interface_root_trans_run_real_data_free (gpointer _data);
static void pamac_transaction_interface_root_trans_run_real (PamacTransactionInterfaceRoot* self,
                                                      gboolean sysupgrade,
                                                      gboolean enable_downgrade,
                                                      gboolean simple_install,
                                                      gboolean keep_built_pkgs,
                                                      gint trans_flags,
                                                      GPtrArray* to_install,
                                                      GPtrArray* to_remove,
                                                      GPtrArray* to_load_local,
                                                      GPtrArray* to_load_remote,
                                                      GPtrArray* to_install_as_dep,
                                                      GPtrArray* ignorepkgs,
                                                      GPtrArray* overwrite_files,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
static void pamac_transaction_interface_root_trans_run_real_finish (PamacTransactionInterfaceRoot* self,
                                                             GAsyncResult* _res_);
static gboolean pamac_transaction_interface_root_trans_run_real_co (PamacTransactionInterfaceRootTransRunRealData* _data_);
static Block66Data* block66_data_ref (Block66Data* _data66_);
static void block66_data_unref (void * _userdata_);
static void pamac_transaction_interface_root_trans_run_real_ready (GObject* source_object,
                                                            GAsyncResult* _res_,
                                                            gpointer _user_data_);
static gint ___lambda60_ (Block66Data* _data66_);
static gint ___lambda61_ (Block66Data* _data66_);
VALA_EXTERN gboolean pamac_alpm_utils_trans_run (PamacAlpmUtils* self,
                                     const gchar* sender,
                                     gboolean sysupgrade,
                                     gboolean enable_downgrade,
                                     gboolean simple_install,
                                     gboolean keep_built_pkgs,
                                     gint trans_flags,
                                     gchar** to_install,
                                     gint to_install_length1,
                                     gchar** to_remove,
                                     gint to_remove_length1,
                                     gchar** to_load_local,
                                     gint to_load_local_length1,
                                     gchar** to_load_remote,
                                     gint to_load_remote_length1,
                                     gchar** to_install_as_dep,
                                     gint to_install_as_dep_length1,
                                     gchar** ignorepkgs,
                                     gint ignorepkgs_length1,
                                     gchar** overwrite_files,
                                     gint overwrite_files_length1);
static gpointer ____lambda61__gthread_func (gpointer self);
static gboolean _pamac_transaction_interface_root_trans_run_real_co_gsource_func (gpointer self);
static gpointer ____lambda60__gthread_func (gpointer self);
static void pamac_transaction_interface_root_real_trans_run_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_trans_run (PamacTransactionInterface* base,
                                                      gboolean sysupgrade,
                                                      gboolean enable_downgrade,
                                                      gboolean simple_install,
                                                      gboolean keep_built_pkgs,
                                                      gint trans_flags,
                                                      GPtrArray* to_install,
                                                      GPtrArray* to_remove,
                                                      GPtrArray* to_load_local,
                                                      GPtrArray* to_load_remote,
                                                      GPtrArray* to_install_as_dep,
                                                      GPtrArray* ignorepkgs,
                                                      GPtrArray* overwrite_files,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_trans_run_co (PamacTransactionInterfaceRootTransRunData* _data_);
static Block67Data* block67_data_ref (Block67Data* _data67_);
static void block67_data_unref (void * _userdata_);
static gboolean ___lambda62_ (Block67Data* _data67_);
VALA_EXTERN void pamac_transaction_interface_trans_run (PamacTransactionInterface* self,
                                            gboolean sysupgrade,
                                            gboolean enable_downgrade,
                                            gboolean simple_install,
                                            gboolean keep_built_pkgs,
                                            gint trans_flags,
                                            GPtrArray* to_install,
                                            GPtrArray* to_remove,
                                            GPtrArray* to_load_local,
                                            GPtrArray* to_load_remote,
                                            GPtrArray* to_install_as_dep,
                                            GPtrArray* ignorepkgs,
                                            GPtrArray* overwrite_files,
                                            GAsyncReadyCallback _callback_,
                                            gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_trans_run_finish (PamacTransactionInterface* self,
                                                       GAsyncResult* _res_,
                                                       GError** error);
static gboolean _pamac_transaction_interface_root_real_trans_run_co_gsource_func (gpointer self);
static gboolean ____lambda62__gsource_func (gpointer self);
static void pamac_transaction_interface_root_trans_run_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_);
static void pamac_transaction_interface_root_real_snap_trans_run_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_snap_trans_run (PamacTransactionInterface* base,
                                                           GPtrArray* to_install,
                                                           GPtrArray* to_remove,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_snap_trans_run_co (PamacTransactionInterfaceRootSnapTransRunData* _data_);
static void pamac_transaction_interface_root_real_snap_switch_channel_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_snap_switch_channel (PamacTransactionInterface* base,
                                                                const gchar* snap_name,
                                                                const gchar* channel,
                                                                GAsyncReadyCallback _callback_,
                                                                gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_snap_switch_channel_co (PamacTransactionInterfaceRootSnapSwitchChannelData* _data_);
static void pamac_transaction_interface_root_real_flatpak_trans_run_data_free (gpointer _data);
static void pamac_transaction_interface_root_real_flatpak_trans_run (PamacTransactionInterface* base,
                                                              GPtrArray* to_install,
                                                              GPtrArray* to_remove,
                                                              GPtrArray* to_upgrade,
                                                              GAsyncReadyCallback _callback_,
                                                              gpointer _user_data_);
static gboolean pamac_transaction_interface_root_real_flatpak_trans_run_co (PamacTransactionInterfaceRootFlatpakTransRunData* _data_);
static void pamac_transaction_interface_root_real_trans_cancel (PamacTransactionInterface* base,
                                                         GError** error);
VALA_EXTERN void pamac_alpm_utils_trans_cancel (PamacAlpmUtils* self,
                                    const gchar* sender);
static void pamac_transaction_interface_root_real_quit_daemon (PamacTransactionInterface* base,
                                                        GError** error);
VALA_EXTERN void pamac_transaction_interface_get_authorization (PamacTransactionInterface* self,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_get_authorization_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_remove_authorization (PamacTransactionInterface* self,
                                                       GError** error);
VALA_EXTERN void pamac_transaction_interface_generate_mirrors_list (PamacTransactionInterface* self,
                                                        const gchar* country,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_);
VALA_EXTERN void pamac_transaction_interface_generate_mirrors_list_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_clean_cache (PamacTransactionInterface* self,
                                              GPtrArray* filenames,
                                              GAsyncReadyCallback _callback_,
                                              gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_clean_cache_finish (PamacTransactionInterface* self,
                                                         GAsyncResult* _res_,
                                                         GError** error);
VALA_EXTERN void pamac_transaction_interface_clean_build_files (PamacTransactionInterface* self,
                                                    const gchar* aur_build_dir,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_clean_build_files_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_set_pkgreason (PamacTransactionInterface* self,
                                                const gchar* pkgname,
                                                guint reason,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_set_pkgreason_finish (PamacTransactionInterface* self,
                                                           GAsyncResult* _res_,
                                                           GError** error);
VALA_EXTERN void pamac_transaction_interface_download_updates (PamacTransactionInterface* self,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_download_updates_finish (PamacTransactionInterface* self,
                                                              GAsyncResult* _res_,
                                                              GError** error);
VALA_EXTERN void pamac_transaction_interface_download_pkgs (PamacTransactionInterface* self,
                                                GPtrArray* urls,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_);
VALA_EXTERN gchar** pamac_transaction_interface_download_pkgs_finish (PamacTransactionInterface* self,
                                                          GAsyncResult* _res_,
                                                          gint* result_length1,
                                                          GError** error);
VALA_EXTERN void pamac_transaction_interface_snap_trans_run (PamacTransactionInterface* self,
                                                 GPtrArray* to_install,
                                                 GPtrArray* to_remove,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_snap_trans_run_finish (PamacTransactionInterface* self,
                                                            GAsyncResult* _res_,
                                                            GError** error);
VALA_EXTERN void pamac_transaction_interface_snap_switch_channel (PamacTransactionInterface* self,
                                                      const gchar* snap_name,
                                                      const gchar* channel,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_snap_switch_channel_finish (PamacTransactionInterface* self,
                                                                 GAsyncResult* _res_,
                                                                 GError** error);
VALA_EXTERN void pamac_transaction_interface_flatpak_trans_run (PamacTransactionInterface* self,
                                                    GPtrArray* to_install,
                                                    GPtrArray* to_remove,
                                                    GPtrArray* to_upgrade,
                                                    GAsyncReadyCallback _callback_,
                                                    gpointer _user_data_);
VALA_EXTERN gboolean pamac_transaction_interface_flatpak_trans_run_finish (PamacTransactionInterface* self,
                                                               GAsyncResult* _res_,
                                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_trans_cancel (PamacTransactionInterface* self,
                                               GError** error);
VALA_EXTERN void pamac_transaction_interface_quit_daemon (PamacTransactionInterface* self,
                                              GError** error);
static void pamac_transaction_interface_root_finalize (GObject * obj);
static GType pamac_transaction_interface_root_get_type_once (void);
static void _vala_array_destroy (gpointer array,
                          gssize array_length,
                          GDestroyNotify destroy_func);
static void _vala_array_free (gpointer array,
                       gssize array_length,
                       GDestroyNotify destroy_func);

static inline gpointer
pamac_transaction_interface_root_get_instance_private (PamacTransactionInterfaceRoot* self)
{
	return G_STRUCT_MEMBER_P (self, PamacTransactionInterfaceRoot_private_offset);
}

static gpointer
_g_main_context_ref0 (gpointer self)
{
	return self ? g_main_context_ref (self) : NULL;
}

PamacTransactionInterfaceRoot*
pamac_transaction_interface_root_construct (GType object_type,
                                            PamacAlpmUtils* alpm_utils,
                                            GMainContext* context)
{
	PamacTransactionInterfaceRoot * self = NULL;
	GMainContext* _tmp0_;
	GCancellable* _tmp1_;
	g_return_val_if_fail (alpm_utils != NULL, NULL);
	g_return_val_if_fail (context != NULL, NULL);
	self = (PamacTransactionInterfaceRoot*) g_object_new (object_type, NULL);
	self->priv->alpm_utils = alpm_utils;
	_tmp0_ = _g_main_context_ref0 (context);
	_g_main_context_unref0 (self->priv->context);
	self->priv->context = _tmp0_;
	_tmp1_ = g_cancellable_new ();
	_g_object_unref0 (self->priv->trans_cancellable);
	self->priv->trans_cancellable = _tmp1_;
	return self;
}

PamacTransactionInterfaceRoot*
pamac_transaction_interface_root_new (PamacAlpmUtils* alpm_utils,
                                      GMainContext* context)
{
	return pamac_transaction_interface_root_construct (PAMAC_TYPE_TRANSACTION_INTERFACE_ROOT, alpm_utils, context);
}

static void
pamac_transaction_interface_root_real_get_authorization_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootGetAuthorizationData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootGetAuthorizationData, _data_);
}

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

static void
pamac_transaction_interface_root_real_get_authorization (PamacTransactionInterface* base,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootGetAuthorizationData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootGetAuthorizationData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_get_authorization_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	pamac_transaction_interface_root_real_get_authorization_co (_data_);
}

static gboolean
pamac_transaction_interface_root_get_authorization_finish (PamacTransactionInterface* base,
                                                           GAsyncResult* _res_,
                                                           GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootGetAuthorizationData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
pamac_transaction_interface_root_real_get_authorization_co (PamacTransactionInterfaceRootGetAuthorizationData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = TRUE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_remove_authorization (PamacTransactionInterface* base,
                                                            GError** error)
{
	PamacTransactionInterfaceRoot * self;
	self = (PamacTransactionInterfaceRoot*) base;
}

static void
pamac_transaction_interface_root_real_generate_mirrors_list_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootGenerateMirrorsListData* _data_;
	_data_ = _data;
	_g_free0 (_data_->country);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootGenerateMirrorsListData, _data_);
}

static void
pamac_transaction_interface_root_real_generate_mirrors_list (PamacTransactionInterface* base,
                                                             const gchar* country,
                                                             GAsyncReadyCallback _callback_,
                                                             gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootGenerateMirrorsListData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (country != NULL);
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootGenerateMirrorsListData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_generate_mirrors_list_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (country);
	_g_free0 (_data_->country);
	_data_->country = _tmp1_;
	pamac_transaction_interface_root_real_generate_mirrors_list_co (_data_);
}

static void
pamac_transaction_interface_root_generate_mirrors_list_finish (PamacTransactionInterface* base,
                                                               GAsyncResult* _res_,
                                                               GError** error)
{
	PamacTransactionInterfaceRootGenerateMirrorsListData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static void
pamac_transaction_interface_root_generate_mirrors_list_ready (GObject* source_object,
                                                              GAsyncResult* _res_,
                                                              gpointer _user_data_)
{
	PamacTransactionInterfaceRootGenerateMirrorsListData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_interface_root_real_generate_mirrors_list_co (_data_);
}

static gboolean
pamac_transaction_interface_root_real_generate_mirrors_list_co (PamacTransactionInterfaceRootGenerateMirrorsListData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	{
		_data_->_tmp0_ = g_strdup ("pacman-mirrors");
		_data_->_tmp1_ = g_strdup ("-c");
		_data_->_tmp2_ = g_strdup (_data_->country);
		_data_->_tmp3_ = g_new0 (gchar*, 3 + 1);
		_data_->_tmp3_[0] = _data_->_tmp0_;
		_data_->_tmp3_[1] = _data_->_tmp1_;
		_data_->_tmp3_[2] = _data_->_tmp2_;
		_data_->_tmp4_ = _data_->_tmp3_;
		_data_->_tmp4__length1 = 3;
		_data_->_tmp5_ = g_subprocess_newv (_data_->_tmp4_, G_SUBPROCESS_FLAGS_STDOUT_PIPE | G_SUBPROCESS_FLAGS_STDERR_MERGE, &_data_->_inner_error0_);
		_data_->_tmp6_ = _data_->_tmp5_;
		_data_->_tmp4_ = (_vala_array_free (_data_->_tmp4_, _data_->_tmp4__length1, (GDestroyNotify) g_free), NULL);
		_data_->process = _data_->_tmp6_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp7_ = _data_->process;
		_data_->_tmp8_ = g_subprocess_get_stdout_pipe (_data_->_tmp7_);
		_data_->_tmp9_ = g_data_input_stream_new (_data_->_tmp8_);
		_data_->dis = _data_->_tmp9_;
		while (TRUE) {
			_data_->_tmp11_ = _data_->dis;
			_data_->_state_ = 1;
			g_data_input_stream_read_line_async (_data_->_tmp11_, G_PRIORITY_DEFAULT, NULL, pamac_transaction_interface_root_generate_mirrors_list_ready, _data_);
			return FALSE;
			_state_1:
			_data_->_tmp12_ = g_data_input_stream_read_line_finish (_data_->_tmp11_, _data_->_res_, NULL, &_data_->_inner_error0_);
			_data_->_tmp10_ = _data_->_tmp12_;
			if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
				_g_free0 (_data_->line);
				_g_object_unref0 (_data_->dis);
				_g_object_unref0 (_data_->process);
				goto __catch0_g_error;
			}
			_data_->_tmp13_ = _data_->_tmp10_;
			_data_->_tmp10_ = NULL;
			_g_free0 (_data_->line);
			_data_->line = _data_->_tmp13_;
			_data_->_tmp14_ = _data_->line;
			if (!(_data_->_tmp14_ != NULL)) {
				_g_free0 (_data_->_tmp10_);
				break;
			}
			_data_->_tmp15_ = _data_->line;
			g_signal_emit_by_name ((PamacTransactionInterface*) _data_->self, "generate-mirrors-list-data", _data_->_tmp15_);
			_g_free0 (_data_->_tmp10_);
		}
		_g_free0 (_data_->line);
		_g_object_unref0 (_data_->dis);
		_g_object_unref0 (_data_->process);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp16_ = _data_->e;
		_data_->_tmp17_ = _data_->_tmp16_->message;
		g_warning ("transaction_interface_root.vala:56: %s", _data_->_tmp17_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp18_ = _data_->self->priv->alpm_utils;
	_data_->_tmp19_ = _data_->_tmp18_->alpm_config;
	alpm_config_reload (_data_->_tmp19_);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_clean_cache_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootCleanCacheData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->filenames);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootCleanCacheData, _data_);
}

static gpointer
_g_ptr_array_ref0 (gpointer self)
{
	return self ? g_ptr_array_ref (self) : NULL;
}

static void
pamac_transaction_interface_root_real_clean_cache (PamacTransactionInterface* base,
                                                   GPtrArray* filenames,
                                                   GAsyncReadyCallback _callback_,
                                                   gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootCleanCacheData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	GPtrArray* _tmp1_;
	g_return_if_fail (filenames != NULL);
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootCleanCacheData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_clean_cache_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_ptr_array_ref0 (filenames);
	_g_ptr_array_unref0 (_data_->filenames);
	_data_->filenames = _tmp1_;
	pamac_transaction_interface_root_real_clean_cache_co (_data_);
}

static gboolean
pamac_transaction_interface_root_clean_cache_finish (PamacTransactionInterface* base,
                                                     GAsyncResult* _res_,
                                                     GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootCleanCacheData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
pamac_transaction_interface_root_real_clean_cache_co (PamacTransactionInterfaceRootCleanCacheData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->alpm_utils;
	_data_->_tmp1_ = _data_->filenames->pdata;
	_data_->_tmp1__length1 = _data_->filenames->len;
	_data_->result = pamac_alpm_utils_clean_cache (_data_->_tmp0_, _data_->_tmp1_, (gint) _data_->_tmp1__length1);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_clean_build_files_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootCleanBuildFilesData* _data_;
	_data_ = _data;
	_g_free0 (_data_->aur_build_dir);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootCleanBuildFilesData, _data_);
}

static void
pamac_transaction_interface_root_real_clean_build_files (PamacTransactionInterface* base,
                                                         const gchar* aur_build_dir,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootCleanBuildFilesData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (aur_build_dir != NULL);
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootCleanBuildFilesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_clean_build_files_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (aur_build_dir);
	_g_free0 (_data_->aur_build_dir);
	_data_->aur_build_dir = _tmp1_;
	pamac_transaction_interface_root_real_clean_build_files_co (_data_);
}

static gboolean
pamac_transaction_interface_root_clean_build_files_finish (PamacTransactionInterface* base,
                                                           GAsyncResult* _res_,
                                                           GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootCleanBuildFilesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
pamac_transaction_interface_root_real_clean_build_files_co (PamacTransactionInterfaceRootCleanBuildFilesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->alpm_utils;
	_data_->result = pamac_alpm_utils_clean_build_files (_data_->_tmp0_, _data_->aur_build_dir);
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_set_pkgreason_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootSetPkgreasonData* _data_;
	_data_ = _data;
	_g_free0 (_data_->pkgname);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootSetPkgreasonData, _data_);
}

static void
pamac_transaction_interface_root_real_set_pkgreason (PamacTransactionInterface* base,
                                                     const gchar* pkgname,
                                                     guint reason,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootSetPkgreasonData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	gchar* _tmp1_;
	g_return_if_fail (pkgname != NULL);
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootSetPkgreasonData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_set_pkgreason_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (pkgname);
	_g_free0 (_data_->pkgname);
	_data_->pkgname = _tmp1_;
	_data_->reason = reason;
	pamac_transaction_interface_root_real_set_pkgreason_co (_data_);
}

static gboolean
pamac_transaction_interface_root_set_pkgreason_finish (PamacTransactionInterface* base,
                                                       GAsyncResult* _res_,
                                                       GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootSetPkgreasonData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
pamac_transaction_interface_root_real_set_pkgreason_co (PamacTransactionInterfaceRootSetPkgreasonData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_tmp0_ = _data_->self->priv->alpm_utils;
	_data_->success = pamac_alpm_utils_set_pkgreason (_data_->_tmp0_, "root", _data_->pkgname, _data_->reason);
	_data_->result = _data_->success;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_download_updates_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootDownloadUpdatesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootDownloadUpdatesData, _data_);
}

static void
pamac_transaction_interface_root_real_download_updates (PamacTransactionInterface* base,
                                                        GAsyncReadyCallback _callback_,
                                                        gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootDownloadUpdatesData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootDownloadUpdatesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_download_updates_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	pamac_transaction_interface_root_real_download_updates_co (_data_);
}

static gboolean
pamac_transaction_interface_root_download_updates_finish (PamacTransactionInterface* base,
                                                          GAsyncResult* _res_,
                                                          GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootDownloadUpdatesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static Block56Data*
block56_data_ref (Block56Data* _data56_)
{
	g_atomic_int_inc (&_data56_->_ref_count_);
	return _data56_;
}

static void
block56_data_unref (void * _userdata_)
{
	Block56Data* _data56_;
	_data56_ = (Block56Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data56_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data56_->self;
		_g_object_unref0 (self);
		g_slice_free (Block56Data, _data56_);
	}
}

static gint
___lambda48_ (Block56Data* _data56_)
{
	PamacTransactionInterfaceRoot* self;
	PamacAlpmUtils* _tmp0_;
	gint result;
	self = _data56_->self;
	_tmp0_ = self->priv->alpm_utils;
	_data56_->success = pamac_alpm_utils_download_updates (_tmp0_, "root");
	result = 0;
	return result;
}

static gpointer
____lambda48__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda48_ (self));
	block56_data_unref (self);
	return result;
}

static gboolean
pamac_transaction_interface_root_real_download_updates_co (PamacTransactionInterfaceRootDownloadUpdatesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data56_ = g_slice_new0 (Block56Data);
	_data_->_data56_->_ref_count_ = 1;
	_data_->_data56_->self = g_object_ref (_data_->self);
	_data_->_data56_->_async_data_ = _data_;
	_data_->_data56_->success = FALSE;
	{
		_data_->_tmp0_ = g_thread_try_new ("download_updates", ____lambda48__gthread_func, block56_data_ref (_data_->_data56_), &_data_->_inner_error0_);
		_data_->thread = _data_->_tmp0_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp1_ = _data_->thread;
		_data_->thread = NULL;
		g_thread_join (_data_->_tmp1_);
		_g_thread_unref0 (_data_->thread);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp2_ = _data_->e;
		_data_->_tmp3_ = _data_->_tmp2_->message;
		g_warning ("transaction_interface_root.vala:84: %s", _data_->_tmp3_);
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		block56_data_unref (_data_->_data56_);
		_data_->_data56_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->result = _data_->_data56_->success;
	block56_data_unref (_data_->_data56_);
	_data_->_data56_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_download_pkgs_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootDownloadPkgsData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->urls);
	_data_->result = (_vala_array_free (_data_->result, _data_->result_length1, (GDestroyNotify) g_free), NULL);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootDownloadPkgsData, _data_);
}

static void
pamac_transaction_interface_root_real_download_pkgs (PamacTransactionInterface* base,
                                                     GPtrArray* urls,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootDownloadPkgsData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	GPtrArray* _tmp1_;
	g_return_if_fail (urls != NULL);
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootDownloadPkgsData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_download_pkgs_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_ptr_array_ref0 (urls);
	_g_ptr_array_unref0 (_data_->urls);
	_data_->urls = _tmp1_;
	pamac_transaction_interface_root_real_download_pkgs_co (_data_);
}

static gchar**
pamac_transaction_interface_root_download_pkgs_finish (PamacTransactionInterface* base,
                                                       GAsyncResult* _res_,
                                                       gint* result_length1,
                                                       GError** error)
{
	gchar** result;
	PamacTransactionInterfaceRootDownloadPkgsData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), error);
	if (NULL == _data_) {
		return NULL;
	}
	result = _data_->result;
	*result_length1 = _data_->result_length1;
	_data_->result = NULL;
	return result;
}

static Block57Data*
block57_data_ref (Block57Data* _data57_)
{
	g_atomic_int_inc (&_data57_->_ref_count_);
	return _data57_;
}

static void
block57_data_unref (void * _userdata_)
{
	Block57Data* _data57_;
	_data57_ = (Block57Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data57_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data57_->self;
		_g_ptr_array_unref0 (_data57_->dload_paths);
		_g_ptr_array_unref0 (_data57_->urls_copy);
		_g_object_unref0 (self);
		g_slice_free (Block57Data, _data57_);
	}
}

static gpointer
_g_strdup_gcopy_func (gconstpointer src,
                      gpointer self)
{
	gpointer result;
	result = g_strdup ((const gchar*) src);
	return result;
}

static void
_g_free0_ (gpointer var)
{
	var = (g_free (var), NULL);
}

static gint
___lambda49_ (Block57Data* _data57_)
{
	PamacTransactionInterfaceRoot* self;
	PamacAlpmUtils* _tmp0_;
	gpointer* _tmp1_;
	gint _tmp1__length1;
	gint result;
	self = _data57_->self;
	_tmp0_ = self->priv->alpm_utils;
	_tmp1_ = _data57_->urls_copy->pdata;
	_tmp1__length1 = _data57_->urls_copy->len;
	pamac_alpm_utils_download_pkgs (_tmp0_, "root", _tmp1_, (gint) _tmp1__length1, &_data57_->dload_paths);
	result = 0;
	return result;
}

static gpointer
____lambda49__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda49_ (self));
	block57_data_unref (self);
	return result;
}

static gchar**
_vala_array_dup2 (gchar** self,
                  gssize length)
{
	if (length >= 0) {
		gchar** result;
		gssize i;
		result = g_new0 (gchar*, length + 1);
		for (i = 0; i < length; i++) {
			gchar* _tmp0_;
			_tmp0_ = g_strdup (self[i]);
			result[i] = _tmp0_;
		}
		return result;
	}
	return NULL;
}

static gboolean
pamac_transaction_interface_root_real_download_pkgs_co (PamacTransactionInterfaceRootDownloadPkgsData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data57_ = g_slice_new0 (Block57Data);
	_data_->_data57_->_ref_count_ = 1;
	_data_->_data57_->self = g_object_ref (_data_->self);
	_data_->_data57_->_async_data_ = _data_;
	_data_->_tmp0_ = g_ptr_array_copy (_data_->urls, _g_strdup_gcopy_func, NULL);
	_data_->_data57_->urls_copy = _data_->_tmp0_;
	_data_->_tmp1_ = g_ptr_array_new_full ((guint) 0, _g_free0_);
	_data_->_data57_->dload_paths = _data_->_tmp1_;
	{
		_data_->_tmp2_ = g_thread_try_new ("download_pkgs", ____lambda49__gthread_func, block57_data_ref (_data_->_data57_), &_data_->_inner_error0_);
		_data_->thread = _data_->_tmp2_;
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_tmp3_ = _data_->thread;
		_data_->thread = NULL;
		g_thread_join (_data_->_tmp3_);
		_g_thread_unref0 (_data_->thread);
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp4_ = _data_->e;
		_data_->_tmp5_ = _data_->_tmp4_->message;
		g_warning ("transaction_interface_root.vala:100: %s", _data_->_tmp5_);
		_data_->self->priv->trans_refresh_success = FALSE;
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		g_task_return_error (_data_->_async_result, _data_->_inner_error0_);
		block57_data_unref (_data_->_data57_);
		_data_->_data57_ = NULL;
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	_data_->_tmp6_ = _data_->_data57_->dload_paths->pdata;
	_data_->_tmp6__length1 = _data_->_data57_->dload_paths->len;
	_data_->_tmp7_ = (_data_->_tmp6_ != NULL) ? _vala_array_dup2 (_data_->_tmp6_, _data_->_tmp6__length1) : _data_->_tmp6_;
	_data_->_tmp7__length1 = _data_->_tmp6__length1;
	_data_->_tmp8_ = _data_->_tmp7_;
	_data_->_tmp8__length1 = _data_->_tmp7__length1;
	_data_->result_length1 = _data_->_tmp8__length1;
	_data_->result = _data_->_tmp8_;
	block57_data_unref (_data_->_data57_);
	_data_->_data57_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_wait_for_lock_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootWaitForLockData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootWaitForLockData, _data_);
}

static void
pamac_transaction_interface_root_wait_for_lock (PamacTransactionInterfaceRoot* self,
                                                GAsyncReadyCallback _callback_,
                                                gpointer _user_data_)
{
	PamacTransactionInterfaceRootWaitForLockData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootWaitForLockData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_wait_for_lock_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	pamac_transaction_interface_root_wait_for_lock_co (_data_);
}

static gboolean
pamac_transaction_interface_root_wait_for_lock_finish (PamacTransactionInterfaceRoot* self,
                                                       GAsyncResult* _res_)
{
	gboolean result;
	PamacTransactionInterfaceRootWaitForLockData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static Block58Data*
block58_data_ref (Block58Data* _data58_)
{
	g_atomic_int_inc (&_data58_->_ref_count_);
	return _data58_;
}

static void
block58_data_unref (void * _userdata_)
{
	Block58Data* _data58_;
	_data58_ = (Block58Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data58_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data58_->self;
		_g_object_unref0 (self);
		g_slice_free (Block58Data, _data58_);
	}
}

static Block59Data*
block59_data_ref (Block59Data* _data59_)
{
	g_atomic_int_inc (&_data59_->_ref_count_);
	return _data59_;
}

static void
block59_data_unref (void * _userdata_)
{
	Block59Data* _data59_;
	_data59_ = (Block59Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data59_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data59_->_data58_->self;
		block58_data_unref (_data59_->_data58_);
		_data59_->_data58_ = NULL;
		g_slice_free (Block59Data, _data59_);
	}
}

static gboolean
_pamac_transaction_interface_root_wait_for_lock_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_interface_root_wait_for_lock_co (self);
	return result;
}

static gboolean
___lambda50_ (Block59Data* _data59_)
{
	Block58Data* _data58_;
	PamacTransactionInterfaceRoot* self;
	gboolean _tmp0_ = FALSE;
	PamacAlpmUtils* _tmp1_;
	GFile* _tmp2_;
	gint _tmp5_;
	gboolean result;
	_data58_ = _data59_->_data58_;
	self = _data58_->self;
	_tmp1_ = self->priv->alpm_utils;
	_tmp2_ = _tmp1_->lockfile;
	if (!g_file_query_exists (_tmp2_, NULL)) {
		_tmp0_ = TRUE;
	} else {
		GCancellable* _tmp3_;
		_tmp3_ = self->priv->trans_cancellable;
		_tmp0_ = g_cancellable_is_cancelled (_tmp3_);
	}
	if (_tmp0_) {
		GMainContext* _tmp4_;
		_tmp4_ = self->priv->context;
		g_main_context_invoke_full (_tmp4_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_wait_for_lock_co_gsource_func, _data58_->_async_data_, NULL);
		_data58_->success = TRUE;
		result = FALSE;
		return result;
	}
	_tmp5_ = _data59_->i;
	_data59_->i = _tmp5_ + 1;
	if (_data59_->i == 1500) {
		gchar* _tmp6_;
		gchar* _tmp7_;
		GCancellable* _tmp8_;
		GMainContext* _tmp9_;
		_tmp6_ = g_strdup_printf ("%s: %s.", g_dgettext (NULL, "Transaction cancelled"), g_dgettext (NULL, "Timeout expired"));
		_tmp7_ = _tmp6_;
		g_signal_emit_by_name ((PamacTransactionInterface*) self, "emit-action", _tmp7_);
		_g_free0 (_tmp7_);
		_tmp8_ = self->priv->trans_cancellable;
		g_cancellable_cancel (_tmp8_);
		_tmp9_ = self->priv->context;
		g_main_context_invoke_full (_tmp9_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_wait_for_lock_co_gsource_func, _data58_->_async_data_, NULL);
		result = FALSE;
		return result;
	}
	result = TRUE;
	return result;
}

static gboolean
____lambda50__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda50_ (self);
	return result;
}

static gboolean
pamac_transaction_interface_root_wait_for_lock_co (PamacTransactionInterfaceRootWaitForLockData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data58_ = g_slice_new0 (Block58Data);
	_data_->_data58_->_ref_count_ = 1;
	_data_->_data58_->self = g_object_ref (_data_->self);
	_data_->_data58_->_async_data_ = _data_;
	_data_->waiting = FALSE;
	_data_->_data58_->success = FALSE;
	_data_->_tmp0_ = _data_->self->priv->trans_cancellable;
	g_cancellable_reset (_data_->_tmp0_);
	_data_->_tmp1_ = _data_->self->priv->alpm_utils;
	_data_->_tmp2_ = _data_->_tmp1_->lockfile;
	if (g_file_query_exists (_data_->_tmp2_, NULL)) {
		_data_->_data59_ = g_slice_new0 (Block59Data);
		_data_->_data59_->_ref_count_ = 1;
		_data_->_data59_->_data58_ = block58_data_ref (_data_->_data58_);
		_data_->waiting = TRUE;
		g_signal_emit_by_name ((PamacTransactionInterface*) _data_->self, "start-waiting");
		_data_->_tmp3_ = g_strconcat (g_dgettext (NULL, "Waiting for another package manager to quit"), "...", NULL);
		_data_->_tmp4_ = _data_->_tmp3_;
		g_signal_emit_by_name ((PamacTransactionInterface*) _data_->self, "emit-action", _data_->_tmp4_);
		_g_free0 (_data_->_tmp4_);
		_data_->_data59_->i = 0;
		_data_->_tmp5_ = g_timeout_source_new ((guint) 200);
		_data_->timeout = _data_->_tmp5_;
		_data_->_tmp6_ = _data_->timeout;
		g_source_set_callback (_data_->_tmp6_, ____lambda50__gsource_func, block59_data_ref (_data_->_data59_), block59_data_unref);
		_data_->_tmp7_ = _data_->timeout;
		_data_->_tmp8_ = _data_->self->priv->context;
		g_source_attach (_data_->_tmp7_, _data_->_tmp8_);
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
		_g_source_unref0 (_data_->timeout);
		block59_data_unref (_data_->_data59_);
		_data_->_data59_ = NULL;
	} else {
		_data_->_data58_->success = TRUE;
	}
	if (_data_->waiting) {
		g_signal_emit_by_name ((PamacTransactionInterface*) _data_->self, "stop-waiting");
	}
	_data_->result = _data_->_data58_->success;
	block58_data_unref (_data_->_data58_);
	_data_->_data58_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_trans_refresh_real_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootTransRefreshRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootTransRefreshRealData, _data_);
}

static void
pamac_transaction_interface_root_trans_refresh_real (PamacTransactionInterfaceRoot* self,
                                                     gboolean force,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRefreshRealData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootTransRefreshRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_trans_refresh_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->force = force;
	pamac_transaction_interface_root_trans_refresh_real_co (_data_);
}

static void
pamac_transaction_interface_root_trans_refresh_real_finish (PamacTransactionInterfaceRoot* self,
                                                            GAsyncResult* _res_)
{
	PamacTransactionInterfaceRootTransRefreshRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block60Data*
block60_data_ref (Block60Data* _data60_)
{
	g_atomic_int_inc (&_data60_->_ref_count_);
	return _data60_;
}

static void
block60_data_unref (void * _userdata_)
{
	Block60Data* _data60_;
	_data60_ = (Block60Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data60_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data60_->self;
		_g_object_unref0 (self);
		g_slice_free (Block60Data, _data60_);
	}
}

static void
pamac_transaction_interface_root_trans_refresh_real_ready (GObject* source_object,
                                                           GAsyncResult* _res_,
                                                           gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRefreshRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_interface_root_trans_refresh_real_co (_data_);
}

static gint
___lambda52_ (Block60Data* _data60_)
{
	PamacTransactionInterfaceRoot* self;
	PamacAlpmUtils* _tmp0_;
	gint result;
	self = _data60_->self;
	_tmp0_ = self->priv->alpm_utils;
	self->priv->trans_refresh_success = pamac_alpm_utils_trans_refresh (_tmp0_, "root", _data60_->force);
	result = 0;
	return result;
}

static gpointer
____lambda52__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda52_ (self));
	block60_data_unref (self);
	return result;
}

static gboolean
_pamac_transaction_interface_root_trans_refresh_real_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_interface_root_trans_refresh_real_co (self);
	return result;
}

static gint
___lambda51_ (Block60Data* _data60_)
{
	PamacTransactionInterfaceRoot* self;
	GMainContext* _tmp5_;
	GError* _inner_error0_ = NULL;
	gint result;
	self = _data60_->self;
	{
		GThread* thread = NULL;
		GThread* _tmp0_;
		GThread* _tmp1_;
		_tmp0_ = g_thread_try_new ("trans_refresh", ____lambda52__gthread_func, block60_data_ref (_data60_), &_inner_error0_);
		thread = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = thread;
		thread = NULL;
		g_thread_join (_tmp1_);
		_g_thread_unref0 (thread);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		g_warning ("transaction_interface_root.vala:160: %s", _tmp3_);
		self->priv->trans_refresh_success = FALSE;
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp4_ = -1;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp4_;
	}
	_tmp5_ = self->priv->context;
	g_main_context_invoke_full (_tmp5_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_trans_refresh_real_co_gsource_func, _data60_->_async_data_, NULL);
	result = 0;
	return result;
}

static gpointer
____lambda51__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda51_ (self));
	block60_data_unref (self);
	return result;
}

static gboolean
pamac_transaction_interface_root_trans_refresh_real_co (PamacTransactionInterfaceRootTransRefreshRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data60_ = g_slice_new0 (Block60Data);
	_data_->_data60_->_ref_count_ = 1;
	_data_->_data60_->self = g_object_ref (_data_->self);
	_data_->_data60_->force = _data_->force;
	_data_->_data60_->_async_data_ = _data_;
	_data_->_state_ = 1;
	pamac_transaction_interface_root_wait_for_lock (_data_->self, pamac_transaction_interface_root_trans_refresh_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->success = pamac_transaction_interface_root_wait_for_lock_finish (_data_->self, _data_->_res_);
	if (!_data_->success) {
		_data_->self->priv->trans_refresh_success = FALSE;
		block60_data_unref (_data_->_data60_);
		_data_->_data60_ = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp0_ = g_thread_try_new ("trans_refresh_real", ____lambda51__gthread_func, block60_data_ref (_data_->_data60_), &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp0_;
		_g_thread_unref0 (_data_->_tmp1_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_state_ = 2;
		return FALSE;
		_state_2:
		;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp2_ = _data_->e;
		_data_->_tmp3_ = _data_->_tmp2_->message;
		g_warning ("transaction_interface_root.vala:168: %s", _data_->_tmp3_);
		_data_->self->priv->trans_refresh_success = FALSE;
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		block60_data_unref (_data_->_data60_);
		_data_->_data60_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	block60_data_unref (_data_->_data60_);
	_data_->_data60_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_trans_refresh_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootTransRefreshData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootTransRefreshData, _data_);
}

static void
pamac_transaction_interface_root_real_trans_refresh (PamacTransactionInterface* base,
                                                     gboolean force,
                                                     GAsyncReadyCallback _callback_,
                                                     gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootTransRefreshData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootTransRefreshData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_trans_refresh_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->force = force;
	pamac_transaction_interface_root_real_trans_refresh_co (_data_);
}

static gboolean
pamac_transaction_interface_root_trans_refresh_finish (PamacTransactionInterface* base,
                                                       GAsyncResult* _res_,
                                                       GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootTransRefreshData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static Block61Data*
block61_data_ref (Block61Data* _data61_)
{
	g_atomic_int_inc (&_data61_->_ref_count_);
	return _data61_;
}

static void
block61_data_unref (void * _userdata_)
{
	Block61Data* _data61_;
	_data61_ = (Block61Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data61_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data61_->self;
		_g_object_unref0 (self);
		g_slice_free (Block61Data, _data61_);
	}
}

static gboolean
_pamac_transaction_interface_root_real_trans_refresh_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_interface_root_real_trans_refresh_co (self);
	return result;
}

static gboolean
___lambda53_ (Block61Data* _data61_)
{
	PamacTransactionInterfaceRoot* self;
	GMainContext* _tmp0_;
	gboolean result;
	self = _data61_->self;
	_tmp0_ = self->priv->context;
	g_main_context_invoke_full (_tmp0_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_real_trans_refresh_co_gsource_func, _data61_->_async_data_, NULL);
	result = FALSE;
	return result;
}

static gboolean
____lambda53__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda53_ (self);
	return result;
}

static void
pamac_transaction_interface_root_trans_refresh_ready (GObject* source_object,
                                                      GAsyncResult* _res_,
                                                      gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRefreshData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_interface_root_real_trans_refresh_co (_data_);
}

static gboolean
pamac_transaction_interface_root_real_trans_refresh_co (PamacTransactionInterfaceRootTransRefreshData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data61_ = g_slice_new0 (Block61Data);
	_data_->_data61_->_ref_count_ = 1;
	_data_->_data61_->self = g_object_ref (_data_->self);
	_data_->_data61_->_async_data_ = _data_;
	_data_->_tmp0_ = _data_->self->priv->alpm_utils;
	if (_data_->_tmp0_->downloading_updates) {
		_data_->_tmp1_ = _data_->self->priv->alpm_utils;
		_data_->_tmp2_ = _data_->_tmp1_->cancellable;
		g_cancellable_cancel (_data_->_tmp2_);
		_data_->_tmp3_ = g_timeout_source_new ((guint) 1000);
		_data_->timeout = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->timeout;
		g_source_set_callback (_data_->_tmp4_, ____lambda53__gsource_func, block61_data_ref (_data_->_data61_), block61_data_unref);
		_data_->_tmp5_ = _data_->timeout;
		_data_->_tmp6_ = _data_->self->priv->context;
		g_source_attach (_data_->_tmp5_, _data_->_tmp6_);
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
		_g_source_unref0 (_data_->timeout);
	}
	_data_->_state_ = 2;
	pamac_transaction_interface_root_trans_refresh_real (_data_->self, _data_->force, pamac_transaction_interface_root_trans_refresh_ready, _data_);
	return FALSE;
	_state_2:
	pamac_transaction_interface_root_trans_refresh_real_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->self->priv->trans_refresh_success;
	block61_data_unref (_data_->_data61_);
	_data_->_data61_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_trans_refresh_files_real_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootTransRefreshFilesRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootTransRefreshFilesRealData, _data_);
}

static void
pamac_transaction_interface_root_trans_refresh_files_real (PamacTransactionInterfaceRoot* self,
                                                           gboolean force,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRefreshFilesRealData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootTransRefreshFilesRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_trans_refresh_files_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->force = force;
	pamac_transaction_interface_root_trans_refresh_files_real_co (_data_);
}

static void
pamac_transaction_interface_root_trans_refresh_files_real_finish (PamacTransactionInterfaceRoot* self,
                                                                  GAsyncResult* _res_)
{
	PamacTransactionInterfaceRootTransRefreshFilesRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block62Data*
block62_data_ref (Block62Data* _data62_)
{
	g_atomic_int_inc (&_data62_->_ref_count_);
	return _data62_;
}

static void
block62_data_unref (void * _userdata_)
{
	Block62Data* _data62_;
	_data62_ = (Block62Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data62_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data62_->self;
		_g_object_unref0 (self);
		g_slice_free (Block62Data, _data62_);
	}
}

static void
pamac_transaction_interface_root_trans_refresh_files_real_ready (GObject* source_object,
                                                                 GAsyncResult* _res_,
                                                                 gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRefreshFilesRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_interface_root_trans_refresh_files_real_co (_data_);
}

static gint
___lambda55_ (Block62Data* _data62_)
{
	PamacTransactionInterfaceRoot* self;
	PamacAlpmUtils* _tmp0_;
	gint result;
	self = _data62_->self;
	_tmp0_ = self->priv->alpm_utils;
	self->priv->trans_refresh_success = pamac_alpm_utils_trans_refresh_files (_tmp0_, "root", _data62_->force);
	result = 0;
	return result;
}

static gpointer
____lambda55__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda55_ (self));
	block62_data_unref (self);
	return result;
}

static gboolean
_pamac_transaction_interface_root_trans_refresh_files_real_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_interface_root_trans_refresh_files_real_co (self);
	return result;
}

static gint
___lambda54_ (Block62Data* _data62_)
{
	PamacTransactionInterfaceRoot* self;
	GMainContext* _tmp5_;
	GError* _inner_error0_ = NULL;
	gint result;
	self = _data62_->self;
	{
		GThread* thread = NULL;
		GThread* _tmp0_;
		GThread* _tmp1_;
		_tmp0_ = g_thread_try_new ("trans_refresh_files", ____lambda55__gthread_func, block62_data_ref (_data62_), &_inner_error0_);
		thread = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = thread;
		thread = NULL;
		g_thread_join (_tmp1_);
		_g_thread_unref0 (thread);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		g_warning ("transaction_interface_root.vala:206: %s", _tmp3_);
		self->priv->trans_refresh_files_success = FALSE;
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp4_ = -1;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp4_;
	}
	_tmp5_ = self->priv->context;
	g_main_context_invoke_full (_tmp5_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_trans_refresh_files_real_co_gsource_func, _data62_->_async_data_, NULL);
	result = 0;
	return result;
}

static gpointer
____lambda54__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda54_ (self));
	block62_data_unref (self);
	return result;
}

static gboolean
pamac_transaction_interface_root_trans_refresh_files_real_co (PamacTransactionInterfaceRootTransRefreshFilesRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data62_ = g_slice_new0 (Block62Data);
	_data_->_data62_->_ref_count_ = 1;
	_data_->_data62_->self = g_object_ref (_data_->self);
	_data_->_data62_->force = _data_->force;
	_data_->_data62_->_async_data_ = _data_;
	_data_->_state_ = 1;
	pamac_transaction_interface_root_wait_for_lock (_data_->self, pamac_transaction_interface_root_trans_refresh_files_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->success = pamac_transaction_interface_root_wait_for_lock_finish (_data_->self, _data_->_res_);
	if (!_data_->success) {
		_data_->self->priv->trans_refresh_files_success = FALSE;
		block62_data_unref (_data_->_data62_);
		_data_->_data62_ = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp0_ = g_thread_try_new ("trans_refresh_files_real", ____lambda54__gthread_func, block62_data_ref (_data_->_data62_), &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp0_;
		_g_thread_unref0 (_data_->_tmp1_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_state_ = 2;
		return FALSE;
		_state_2:
		;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp2_ = _data_->e;
		_data_->_tmp3_ = _data_->_tmp2_->message;
		g_warning ("transaction_interface_root.vala:214: %s", _data_->_tmp3_);
		_data_->self->priv->trans_refresh_files_success = FALSE;
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		block62_data_unref (_data_->_data62_);
		_data_->_data62_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	block62_data_unref (_data_->_data62_);
	_data_->_data62_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_trans_refresh_files_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootTransRefreshFilesData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootTransRefreshFilesData, _data_);
}

static void
pamac_transaction_interface_root_real_trans_refresh_files (PamacTransactionInterface* base,
                                                           gboolean force,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootTransRefreshFilesData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootTransRefreshFilesData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_trans_refresh_files_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->force = force;
	pamac_transaction_interface_root_real_trans_refresh_files_co (_data_);
}

static gboolean
pamac_transaction_interface_root_trans_refresh_files_finish (PamacTransactionInterface* base,
                                                             GAsyncResult* _res_,
                                                             GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootTransRefreshFilesData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static Block63Data*
block63_data_ref (Block63Data* _data63_)
{
	g_atomic_int_inc (&_data63_->_ref_count_);
	return _data63_;
}

static void
block63_data_unref (void * _userdata_)
{
	Block63Data* _data63_;
	_data63_ = (Block63Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data63_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data63_->self;
		_g_object_unref0 (self);
		g_slice_free (Block63Data, _data63_);
	}
}

static gboolean
_pamac_transaction_interface_root_real_trans_refresh_files_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_interface_root_real_trans_refresh_files_co (self);
	return result;
}

static gboolean
___lambda56_ (Block63Data* _data63_)
{
	PamacTransactionInterfaceRoot* self;
	GMainContext* _tmp0_;
	gboolean result;
	self = _data63_->self;
	_tmp0_ = self->priv->context;
	g_main_context_invoke_full (_tmp0_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_real_trans_refresh_files_co_gsource_func, _data63_->_async_data_, NULL);
	result = FALSE;
	return result;
}

static gboolean
____lambda56__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda56_ (self);
	return result;
}

static void
pamac_transaction_interface_root_trans_refresh_files_ready (GObject* source_object,
                                                            GAsyncResult* _res_,
                                                            gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRefreshFilesData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_interface_root_real_trans_refresh_files_co (_data_);
}

static gboolean
pamac_transaction_interface_root_real_trans_refresh_files_co (PamacTransactionInterfaceRootTransRefreshFilesData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data63_ = g_slice_new0 (Block63Data);
	_data_->_data63_->_ref_count_ = 1;
	_data_->_data63_->self = g_object_ref (_data_->self);
	_data_->_data63_->_async_data_ = _data_;
	_data_->_tmp0_ = _data_->self->priv->alpm_utils;
	if (_data_->_tmp0_->downloading_updates) {
		_data_->_tmp1_ = _data_->self->priv->alpm_utils;
		_data_->_tmp2_ = _data_->_tmp1_->cancellable;
		g_cancellable_cancel (_data_->_tmp2_);
		_data_->_tmp3_ = g_timeout_source_new ((guint) 1000);
		_data_->timeout = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->timeout;
		g_source_set_callback (_data_->_tmp4_, ____lambda56__gsource_func, block63_data_ref (_data_->_data63_), block63_data_unref);
		_data_->_tmp5_ = _data_->timeout;
		_data_->_tmp6_ = _data_->self->priv->context;
		g_source_attach (_data_->_tmp5_, _data_->_tmp6_);
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
		_g_source_unref0 (_data_->timeout);
	}
	_data_->_state_ = 2;
	pamac_transaction_interface_root_trans_refresh_files_real (_data_->self, _data_->force, pamac_transaction_interface_root_trans_refresh_files_ready, _data_);
	return FALSE;
	_state_2:
	pamac_transaction_interface_root_trans_refresh_files_real_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->self->priv->trans_refresh_files_success;
	block63_data_unref (_data_->_data63_);
	_data_->_data63_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_trans_refresh_aur_real_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootTransRefreshAurRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootTransRefreshAurRealData, _data_);
}

static void
pamac_transaction_interface_root_trans_refresh_aur_real (PamacTransactionInterfaceRoot* self,
                                                         gboolean force,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRefreshAurRealData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	g_return_if_fail (self != NULL);
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootTransRefreshAurRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_trans_refresh_aur_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->force = force;
	pamac_transaction_interface_root_trans_refresh_aur_real_co (_data_);
}

static void
pamac_transaction_interface_root_trans_refresh_aur_real_finish (PamacTransactionInterfaceRoot* self,
                                                                GAsyncResult* _res_)
{
	PamacTransactionInterfaceRootTransRefreshAurRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block64Data*
block64_data_ref (Block64Data* _data64_)
{
	g_atomic_int_inc (&_data64_->_ref_count_);
	return _data64_;
}

static void
block64_data_unref (void * _userdata_)
{
	Block64Data* _data64_;
	_data64_ = (Block64Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data64_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data64_->self;
		_g_object_unref0 (self);
		g_slice_free (Block64Data, _data64_);
	}
}

static void
pamac_transaction_interface_root_trans_refresh_aur_real_ready (GObject* source_object,
                                                               GAsyncResult* _res_,
                                                               gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRefreshAurRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_interface_root_trans_refresh_aur_real_co (_data_);
}

static gint
___lambda58_ (Block64Data* _data64_)
{
	PamacTransactionInterfaceRoot* self;
	PamacAlpmUtils* _tmp0_;
	gint result;
	self = _data64_->self;
	_tmp0_ = self->priv->alpm_utils;
	self->priv->trans_refresh_success = pamac_alpm_utils_trans_refresh_aur (_tmp0_, "root", _data64_->force);
	result = 0;
	return result;
}

static gpointer
____lambda58__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda58_ (self));
	block64_data_unref (self);
	return result;
}

static gboolean
_pamac_transaction_interface_root_trans_refresh_aur_real_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_interface_root_trans_refresh_aur_real_co (self);
	return result;
}

static gint
___lambda57_ (Block64Data* _data64_)
{
	PamacTransactionInterfaceRoot* self;
	GMainContext* _tmp5_;
	GError* _inner_error0_ = NULL;
	gint result;
	self = _data64_->self;
	{
		GThread* thread = NULL;
		GThread* _tmp0_;
		GThread* _tmp1_;
		_tmp0_ = g_thread_try_new ("trans_refresh_aur", ____lambda58__gthread_func, block64_data_ref (_data64_), &_inner_error0_);
		thread = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = thread;
		thread = NULL;
		g_thread_join (_tmp1_);
		_g_thread_unref0 (thread);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		g_warning ("transaction_interface_root.vala:252: %s", _tmp3_);
		self->priv->trans_refresh_aur_success = FALSE;
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp4_ = -1;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp4_;
	}
	_tmp5_ = self->priv->context;
	g_main_context_invoke_full (_tmp5_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_trans_refresh_aur_real_co_gsource_func, _data64_->_async_data_, NULL);
	result = 0;
	return result;
}

static gpointer
____lambda57__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda57_ (self));
	block64_data_unref (self);
	return result;
}

static gboolean
pamac_transaction_interface_root_trans_refresh_aur_real_co (PamacTransactionInterfaceRootTransRefreshAurRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data64_ = g_slice_new0 (Block64Data);
	_data_->_data64_->_ref_count_ = 1;
	_data_->_data64_->self = g_object_ref (_data_->self);
	_data_->_data64_->force = _data_->force;
	_data_->_data64_->_async_data_ = _data_;
	_data_->_state_ = 1;
	pamac_transaction_interface_root_wait_for_lock (_data_->self, pamac_transaction_interface_root_trans_refresh_aur_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->success = pamac_transaction_interface_root_wait_for_lock_finish (_data_->self, _data_->_res_);
	if (!_data_->success) {
		_data_->self->priv->trans_refresh_aur_success = FALSE;
		block64_data_unref (_data_->_data64_);
		_data_->_data64_ = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp0_ = g_thread_try_new ("trans_refresh_aur_real", ____lambda57__gthread_func, block64_data_ref (_data_->_data64_), &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp0_;
		_g_thread_unref0 (_data_->_tmp1_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_state_ = 2;
		return FALSE;
		_state_2:
		;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp2_ = _data_->e;
		_data_->_tmp3_ = _data_->_tmp2_->message;
		g_warning ("transaction_interface_root.vala:260: %s", _data_->_tmp3_);
		_data_->self->priv->trans_refresh_aur_success = FALSE;
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		block64_data_unref (_data_->_data64_);
		_data_->_data64_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	block64_data_unref (_data_->_data64_);
	_data_->_data64_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_trans_refresh_aur_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootTransRefreshAurData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootTransRefreshAurData, _data_);
}

static void
pamac_transaction_interface_root_real_trans_refresh_aur (PamacTransactionInterface* base,
                                                         gboolean force,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootTransRefreshAurData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootTransRefreshAurData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_trans_refresh_aur_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->force = force;
	pamac_transaction_interface_root_real_trans_refresh_aur_co (_data_);
}

static gboolean
pamac_transaction_interface_root_trans_refresh_aur_finish (PamacTransactionInterface* base,
                                                           GAsyncResult* _res_,
                                                           GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootTransRefreshAurData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static Block65Data*
block65_data_ref (Block65Data* _data65_)
{
	g_atomic_int_inc (&_data65_->_ref_count_);
	return _data65_;
}

static void
block65_data_unref (void * _userdata_)
{
	Block65Data* _data65_;
	_data65_ = (Block65Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data65_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data65_->self;
		_g_object_unref0 (self);
		g_slice_free (Block65Data, _data65_);
	}
}

static gboolean
_pamac_transaction_interface_root_real_trans_refresh_aur_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_interface_root_real_trans_refresh_aur_co (self);
	return result;
}

static gboolean
___lambda59_ (Block65Data* _data65_)
{
	PamacTransactionInterfaceRoot* self;
	GMainContext* _tmp0_;
	gboolean result;
	self = _data65_->self;
	_tmp0_ = self->priv->context;
	g_main_context_invoke_full (_tmp0_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_real_trans_refresh_aur_co_gsource_func, _data65_->_async_data_, NULL);
	result = FALSE;
	return result;
}

static gboolean
____lambda59__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda59_ (self);
	return result;
}

static void
pamac_transaction_interface_root_trans_refresh_aur_ready (GObject* source_object,
                                                          GAsyncResult* _res_,
                                                          gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRefreshAurData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_interface_root_real_trans_refresh_aur_co (_data_);
}

static gboolean
pamac_transaction_interface_root_real_trans_refresh_aur_co (PamacTransactionInterfaceRootTransRefreshAurData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data65_ = g_slice_new0 (Block65Data);
	_data_->_data65_->_ref_count_ = 1;
	_data_->_data65_->self = g_object_ref (_data_->self);
	_data_->_data65_->_async_data_ = _data_;
	_data_->_tmp0_ = _data_->self->priv->alpm_utils;
	if (_data_->_tmp0_->downloading_updates) {
		_data_->_tmp1_ = _data_->self->priv->alpm_utils;
		_data_->_tmp2_ = _data_->_tmp1_->cancellable;
		g_cancellable_cancel (_data_->_tmp2_);
		_data_->_tmp3_ = g_timeout_source_new ((guint) 1000);
		_data_->timeout = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->timeout;
		g_source_set_callback (_data_->_tmp4_, ____lambda59__gsource_func, block65_data_ref (_data_->_data65_), block65_data_unref);
		_data_->_tmp5_ = _data_->timeout;
		_data_->_tmp6_ = _data_->self->priv->context;
		g_source_attach (_data_->_tmp5_, _data_->_tmp6_);
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
		_g_source_unref0 (_data_->timeout);
	}
	_data_->_state_ = 2;
	pamac_transaction_interface_root_trans_refresh_aur_real (_data_->self, _data_->force, pamac_transaction_interface_root_trans_refresh_aur_ready, _data_);
	return FALSE;
	_state_2:
	pamac_transaction_interface_root_trans_refresh_aur_real_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->self->priv->trans_refresh_aur_success;
	block65_data_unref (_data_->_data65_);
	_data_->_data65_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_trans_run_real_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootTransRunRealData* _data_;
	_data_ = _data;
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootTransRunRealData, _data_);
}

static void
pamac_transaction_interface_root_trans_run_real (PamacTransactionInterfaceRoot* self,
                                                 gboolean sysupgrade,
                                                 gboolean enable_downgrade,
                                                 gboolean simple_install,
                                                 gboolean keep_built_pkgs,
                                                 gint trans_flags,
                                                 GPtrArray* to_install,
                                                 GPtrArray* to_remove,
                                                 GPtrArray* to_load_local,
                                                 GPtrArray* to_load_remote,
                                                 GPtrArray* to_install_as_dep,
                                                 GPtrArray* ignorepkgs,
                                                 GPtrArray* overwrite_files,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRunRealData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	GPtrArray* _tmp3_;
	GPtrArray* _tmp4_;
	GPtrArray* _tmp5_;
	GPtrArray* _tmp6_;
	GPtrArray* _tmp7_;
	g_return_if_fail (self != NULL);
	g_return_if_fail (to_install != NULL);
	g_return_if_fail (to_remove != NULL);
	g_return_if_fail (to_load_local != NULL);
	g_return_if_fail (to_load_remote != NULL);
	g_return_if_fail (to_install_as_dep != NULL);
	g_return_if_fail (ignorepkgs != NULL);
	g_return_if_fail (overwrite_files != NULL);
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootTransRunRealData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_trans_run_real_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->sysupgrade = sysupgrade;
	_data_->enable_downgrade = enable_downgrade;
	_data_->simple_install = simple_install;
	_data_->keep_built_pkgs = keep_built_pkgs;
	_data_->trans_flags = trans_flags;
	_tmp1_ = _g_ptr_array_ref0 (to_install);
	_g_ptr_array_unref0 (_data_->to_install);
	_data_->to_install = _tmp1_;
	_tmp2_ = _g_ptr_array_ref0 (to_remove);
	_g_ptr_array_unref0 (_data_->to_remove);
	_data_->to_remove = _tmp2_;
	_tmp3_ = _g_ptr_array_ref0 (to_load_local);
	_g_ptr_array_unref0 (_data_->to_load_local);
	_data_->to_load_local = _tmp3_;
	_tmp4_ = _g_ptr_array_ref0 (to_load_remote);
	_g_ptr_array_unref0 (_data_->to_load_remote);
	_data_->to_load_remote = _tmp4_;
	_tmp5_ = _g_ptr_array_ref0 (to_install_as_dep);
	_g_ptr_array_unref0 (_data_->to_install_as_dep);
	_data_->to_install_as_dep = _tmp5_;
	_tmp6_ = _g_ptr_array_ref0 (ignorepkgs);
	_g_ptr_array_unref0 (_data_->ignorepkgs);
	_data_->ignorepkgs = _tmp6_;
	_tmp7_ = _g_ptr_array_ref0 (overwrite_files);
	_g_ptr_array_unref0 (_data_->overwrite_files);
	_data_->overwrite_files = _tmp7_;
	pamac_transaction_interface_root_trans_run_real_co (_data_);
}

static void
pamac_transaction_interface_root_trans_run_real_finish (PamacTransactionInterfaceRoot* self,
                                                        GAsyncResult* _res_)
{
	PamacTransactionInterfaceRootTransRunRealData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
}

static Block66Data*
block66_data_ref (Block66Data* _data66_)
{
	g_atomic_int_inc (&_data66_->_ref_count_);
	return _data66_;
}

static void
block66_data_unref (void * _userdata_)
{
	Block66Data* _data66_;
	_data66_ = (Block66Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data66_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data66_->self;
		_g_ptr_array_unref0 (_data66_->to_install);
		_g_ptr_array_unref0 (_data66_->to_remove);
		_g_ptr_array_unref0 (_data66_->to_load_local);
		_g_ptr_array_unref0 (_data66_->to_load_remote);
		_g_ptr_array_unref0 (_data66_->to_install_as_dep);
		_g_ptr_array_unref0 (_data66_->ignorepkgs);
		_g_ptr_array_unref0 (_data66_->overwrite_files);
		_g_object_unref0 (self);
		g_slice_free (Block66Data, _data66_);
	}
}

static void
pamac_transaction_interface_root_trans_run_real_ready (GObject* source_object,
                                                       GAsyncResult* _res_,
                                                       gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRunRealData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_interface_root_trans_run_real_co (_data_);
}

static gint
___lambda61_ (Block66Data* _data66_)
{
	PamacTransactionInterfaceRoot* self;
	PamacAlpmUtils* _tmp0_;
	gpointer* _tmp1_;
	gint _tmp1__length1;
	gpointer* _tmp2_;
	gint _tmp2__length1;
	gpointer* _tmp3_;
	gint _tmp3__length1;
	gpointer* _tmp4_;
	gint _tmp4__length1;
	gpointer* _tmp5_;
	gint _tmp5__length1;
	gpointer* _tmp6_;
	gint _tmp6__length1;
	gpointer* _tmp7_;
	gint _tmp7__length1;
	gint result;
	self = _data66_->self;
	_tmp0_ = self->priv->alpm_utils;
	_tmp1_ = _data66_->to_install->pdata;
	_tmp1__length1 = _data66_->to_install->len;
	_tmp2_ = _data66_->to_remove->pdata;
	_tmp2__length1 = _data66_->to_remove->len;
	_tmp3_ = _data66_->to_load_local->pdata;
	_tmp3__length1 = _data66_->to_load_local->len;
	_tmp4_ = _data66_->to_load_remote->pdata;
	_tmp4__length1 = _data66_->to_load_remote->len;
	_tmp5_ = _data66_->to_install_as_dep->pdata;
	_tmp5__length1 = _data66_->to_install_as_dep->len;
	_tmp6_ = _data66_->ignorepkgs->pdata;
	_tmp6__length1 = _data66_->ignorepkgs->len;
	_tmp7_ = _data66_->overwrite_files->pdata;
	_tmp7__length1 = _data66_->overwrite_files->len;
	self->priv->trans_run_success = pamac_alpm_utils_trans_run (_tmp0_, "root", _data66_->sysupgrade, _data66_->enable_downgrade, _data66_->simple_install, _data66_->keep_built_pkgs, _data66_->trans_flags, _tmp1_, (gint) _tmp1__length1, _tmp2_, (gint) _tmp2__length1, _tmp3_, (gint) _tmp3__length1, _tmp4_, (gint) _tmp4__length1, _tmp5_, (gint) _tmp5__length1, _tmp6_, (gint) _tmp6__length1, _tmp7_, (gint) _tmp7__length1);
	result = 0;
	return result;
}

static gpointer
____lambda61__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda61_ (self));
	block66_data_unref (self);
	return result;
}

static gboolean
_pamac_transaction_interface_root_trans_run_real_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_interface_root_trans_run_real_co (self);
	return result;
}

static gint
___lambda60_ (Block66Data* _data66_)
{
	PamacTransactionInterfaceRoot* self;
	GMainContext* _tmp5_;
	GError* _inner_error0_ = NULL;
	gint result;
	self = _data66_->self;
	{
		GThread* thread = NULL;
		GThread* _tmp0_;
		GThread* _tmp1_;
		_tmp0_ = g_thread_try_new ("trans_run", ____lambda61__gthread_func, block66_data_ref (_data66_), &_inner_error0_);
		thread = _tmp0_;
		if (G_UNLIKELY (_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_tmp1_ = thread;
		thread = NULL;
		g_thread_join (_tmp1_);
		_g_thread_unref0 (thread);
	}
	goto __finally0;
	__catch0_g_error:
	{
		GError* e = NULL;
		GError* _tmp2_;
		const gchar* _tmp3_;
		e = _inner_error0_;
		_inner_error0_ = NULL;
		_tmp2_ = e;
		_tmp3_ = _tmp2_->message;
		g_warning ("transaction_interface_root.vala:321: %s", _tmp3_);
		self->priv->trans_run_success = FALSE;
		_g_error_free0 (e);
	}
	__finally0:
	if (G_UNLIKELY (_inner_error0_ != NULL)) {
		gint _tmp4_ = -1;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _inner_error0_->message, g_quark_to_string (_inner_error0_->domain), _inner_error0_->code);
		g_clear_error (&_inner_error0_);
		return _tmp4_;
	}
	_tmp5_ = self->priv->context;
	g_main_context_invoke_full (_tmp5_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_trans_run_real_co_gsource_func, _data66_->_async_data_, NULL);
	result = 0;
	return result;
}

static gpointer
____lambda60__gthread_func (gpointer self)
{
	gpointer result;
	result = (gpointer) ((gintptr) ___lambda60_ (self));
	block66_data_unref (self);
	return result;
}

static gboolean
pamac_transaction_interface_root_trans_run_real_co (PamacTransactionInterfaceRootTransRunRealData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data66_ = g_slice_new0 (Block66Data);
	_data_->_data66_->_ref_count_ = 1;
	_data_->_data66_->self = g_object_ref (_data_->self);
	_data_->_data66_->sysupgrade = _data_->sysupgrade;
	_data_->_data66_->enable_downgrade = _data_->enable_downgrade;
	_data_->_data66_->simple_install = _data_->simple_install;
	_data_->_data66_->keep_built_pkgs = _data_->keep_built_pkgs;
	_data_->_data66_->trans_flags = _data_->trans_flags;
	_g_ptr_array_unref0 (_data_->_data66_->to_install);
	_data_->_data66_->to_install = _data_->to_install;
	_g_ptr_array_unref0 (_data_->_data66_->to_remove);
	_data_->_data66_->to_remove = _data_->to_remove;
	_g_ptr_array_unref0 (_data_->_data66_->to_load_local);
	_data_->_data66_->to_load_local = _data_->to_load_local;
	_g_ptr_array_unref0 (_data_->_data66_->to_load_remote);
	_data_->_data66_->to_load_remote = _data_->to_load_remote;
	_g_ptr_array_unref0 (_data_->_data66_->to_install_as_dep);
	_data_->_data66_->to_install_as_dep = _data_->to_install_as_dep;
	_g_ptr_array_unref0 (_data_->_data66_->ignorepkgs);
	_data_->_data66_->ignorepkgs = _data_->ignorepkgs;
	_g_ptr_array_unref0 (_data_->_data66_->overwrite_files);
	_data_->_data66_->overwrite_files = _data_->overwrite_files;
	_data_->_data66_->_async_data_ = _data_;
	_data_->_state_ = 1;
	pamac_transaction_interface_root_wait_for_lock (_data_->self, pamac_transaction_interface_root_trans_run_real_ready, _data_);
	return FALSE;
	_state_1:
	_data_->success = pamac_transaction_interface_root_wait_for_lock_finish (_data_->self, _data_->_res_);
	if (!_data_->success) {
		_data_->self->priv->trans_run_success = FALSE;
		block66_data_unref (_data_->_data66_);
		_data_->_data66_ = NULL;
		g_task_return_pointer (_data_->_async_result, _data_, NULL);
		if (_data_->_state_ != 0) {
			while (!g_task_get_completed (_data_->_async_result)) {
				g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
			}
		}
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	{
		_data_->_tmp0_ = g_thread_try_new ("trans_run_real", ____lambda60__gthread_func, block66_data_ref (_data_->_data66_), &_data_->_inner_error0_);
		_data_->_tmp1_ = _data_->_tmp0_;
		_g_thread_unref0 (_data_->_tmp1_);
		if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
			goto __catch0_g_error;
		}
		_data_->_state_ = 2;
		return FALSE;
		_state_2:
		;
	}
	goto __finally0;
	__catch0_g_error:
	{
		_data_->e = _data_->_inner_error0_;
		_data_->_inner_error0_ = NULL;
		_data_->_tmp2_ = _data_->e;
		_data_->_tmp3_ = _data_->_tmp2_->message;
		g_warning ("transaction_interface_root.vala:329: %s", _data_->_tmp3_);
		_data_->self->priv->trans_run_success = FALSE;
		_g_error_free0 (_data_->e);
	}
	__finally0:
	if (G_UNLIKELY (_data_->_inner_error0_ != NULL)) {
		block66_data_unref (_data_->_data66_);
		_data_->_data66_ = NULL;
		g_critical ("file %s: line %d: uncaught error: %s (%s, %d)", __FILE__, __LINE__, _data_->_inner_error0_->message, g_quark_to_string (_data_->_inner_error0_->domain), _data_->_inner_error0_->code);
		g_clear_error (&_data_->_inner_error0_);
		g_object_unref (_data_->_async_result);
		return FALSE;
	}
	block66_data_unref (_data_->_data66_);
	_data_->_data66_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_trans_run_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootTransRunData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->to_install);
	_g_ptr_array_unref0 (_data_->to_remove);
	_g_ptr_array_unref0 (_data_->to_load_local);
	_g_ptr_array_unref0 (_data_->to_load_remote);
	_g_ptr_array_unref0 (_data_->to_install_as_dep);
	_g_ptr_array_unref0 (_data_->ignorepkgs);
	_g_ptr_array_unref0 (_data_->overwrite_files);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootTransRunData, _data_);
}

static void
pamac_transaction_interface_root_real_trans_run (PamacTransactionInterface* base,
                                                 gboolean sysupgrade,
                                                 gboolean enable_downgrade,
                                                 gboolean simple_install,
                                                 gboolean keep_built_pkgs,
                                                 gint trans_flags,
                                                 GPtrArray* to_install,
                                                 GPtrArray* to_remove,
                                                 GPtrArray* to_load_local,
                                                 GPtrArray* to_load_remote,
                                                 GPtrArray* to_install_as_dep,
                                                 GPtrArray* ignorepkgs,
                                                 GPtrArray* overwrite_files,
                                                 GAsyncReadyCallback _callback_,
                                                 gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootTransRunData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	GPtrArray* _tmp3_;
	GPtrArray* _tmp4_;
	GPtrArray* _tmp5_;
	GPtrArray* _tmp6_;
	GPtrArray* _tmp7_;
	g_return_if_fail (to_install != NULL);
	g_return_if_fail (to_remove != NULL);
	g_return_if_fail (to_load_local != NULL);
	g_return_if_fail (to_load_remote != NULL);
	g_return_if_fail (to_install_as_dep != NULL);
	g_return_if_fail (ignorepkgs != NULL);
	g_return_if_fail (overwrite_files != NULL);
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootTransRunData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_trans_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_data_->sysupgrade = sysupgrade;
	_data_->enable_downgrade = enable_downgrade;
	_data_->simple_install = simple_install;
	_data_->keep_built_pkgs = keep_built_pkgs;
	_data_->trans_flags = trans_flags;
	_tmp1_ = _g_ptr_array_ref0 (to_install);
	_g_ptr_array_unref0 (_data_->to_install);
	_data_->to_install = _tmp1_;
	_tmp2_ = _g_ptr_array_ref0 (to_remove);
	_g_ptr_array_unref0 (_data_->to_remove);
	_data_->to_remove = _tmp2_;
	_tmp3_ = _g_ptr_array_ref0 (to_load_local);
	_g_ptr_array_unref0 (_data_->to_load_local);
	_data_->to_load_local = _tmp3_;
	_tmp4_ = _g_ptr_array_ref0 (to_load_remote);
	_g_ptr_array_unref0 (_data_->to_load_remote);
	_data_->to_load_remote = _tmp4_;
	_tmp5_ = _g_ptr_array_ref0 (to_install_as_dep);
	_g_ptr_array_unref0 (_data_->to_install_as_dep);
	_data_->to_install_as_dep = _tmp5_;
	_tmp6_ = _g_ptr_array_ref0 (ignorepkgs);
	_g_ptr_array_unref0 (_data_->ignorepkgs);
	_data_->ignorepkgs = _tmp6_;
	_tmp7_ = _g_ptr_array_ref0 (overwrite_files);
	_g_ptr_array_unref0 (_data_->overwrite_files);
	_data_->overwrite_files = _tmp7_;
	pamac_transaction_interface_root_real_trans_run_co (_data_);
}

static gboolean
pamac_transaction_interface_root_trans_run_finish (PamacTransactionInterface* base,
                                                   GAsyncResult* _res_,
                                                   GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootTransRunData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static Block67Data*
block67_data_ref (Block67Data* _data67_)
{
	g_atomic_int_inc (&_data67_->_ref_count_);
	return _data67_;
}

static void
block67_data_unref (void * _userdata_)
{
	Block67Data* _data67_;
	_data67_ = (Block67Data*) _userdata_;
	if (g_atomic_int_dec_and_test (&_data67_->_ref_count_)) {
		PamacTransactionInterfaceRoot* self;
		self = _data67_->self;
		_g_object_unref0 (self);
		g_slice_free (Block67Data, _data67_);
	}
}

static gboolean
_pamac_transaction_interface_root_real_trans_run_co_gsource_func (gpointer self)
{
	gboolean result;
	result = pamac_transaction_interface_root_real_trans_run_co (self);
	return result;
}

static gboolean
___lambda62_ (Block67Data* _data67_)
{
	PamacTransactionInterfaceRoot* self;
	GMainContext* _tmp0_;
	gboolean result;
	self = _data67_->self;
	_tmp0_ = self->priv->context;
	g_main_context_invoke_full (_tmp0_, G_PRIORITY_DEFAULT, _pamac_transaction_interface_root_real_trans_run_co_gsource_func, _data67_->_async_data_, NULL);
	result = FALSE;
	return result;
}

static gboolean
____lambda62__gsource_func (gpointer self)
{
	gboolean result;
	result = ___lambda62_ (self);
	return result;
}

static void
pamac_transaction_interface_root_trans_run_ready (GObject* source_object,
                                                  GAsyncResult* _res_,
                                                  gpointer _user_data_)
{
	PamacTransactionInterfaceRootTransRunData* _data_;
	_data_ = _user_data_;
	_data_->_source_object_ = source_object;
	_data_->_res_ = _res_;
	pamac_transaction_interface_root_real_trans_run_co (_data_);
}

static gboolean
pamac_transaction_interface_root_real_trans_run_co (PamacTransactionInterfaceRootTransRunData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		case 1:
		goto _state_1;
		case 2:
		goto _state_2;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->_data67_ = g_slice_new0 (Block67Data);
	_data_->_data67_->_ref_count_ = 1;
	_data_->_data67_->self = g_object_ref (_data_->self);
	_data_->_data67_->_async_data_ = _data_;
	_data_->_tmp0_ = _data_->self->priv->alpm_utils;
	if (_data_->_tmp0_->downloading_updates) {
		_data_->_tmp1_ = _data_->self->priv->alpm_utils;
		_data_->_tmp2_ = _data_->_tmp1_->cancellable;
		g_cancellable_cancel (_data_->_tmp2_);
		_data_->_tmp3_ = g_timeout_source_new ((guint) 1000);
		_data_->timeout = _data_->_tmp3_;
		_data_->_tmp4_ = _data_->timeout;
		g_source_set_callback (_data_->_tmp4_, ____lambda62__gsource_func, block67_data_ref (_data_->_data67_), block67_data_unref);
		_data_->_tmp5_ = _data_->timeout;
		_data_->_tmp6_ = _data_->self->priv->context;
		g_source_attach (_data_->_tmp5_, _data_->_tmp6_);
		_data_->_state_ = 1;
		return FALSE;
		_state_1:
		;
		_g_source_unref0 (_data_->timeout);
	}
	_data_->_state_ = 2;
	pamac_transaction_interface_root_trans_run_real (_data_->self, _data_->sysupgrade, _data_->enable_downgrade, _data_->simple_install, _data_->keep_built_pkgs, _data_->trans_flags, _data_->to_install, _data_->to_remove, _data_->to_load_local, _data_->to_load_remote, _data_->to_install_as_dep, _data_->ignorepkgs, _data_->overwrite_files, pamac_transaction_interface_root_trans_run_ready, _data_);
	return FALSE;
	_state_2:
	pamac_transaction_interface_root_trans_run_real_finish (_data_->self, _data_->_res_);
	_data_->result = _data_->self->priv->trans_run_success;
	block67_data_unref (_data_->_data67_);
	_data_->_data67_ = NULL;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_snap_trans_run_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootSnapTransRunData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->to_install);
	_g_ptr_array_unref0 (_data_->to_remove);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootSnapTransRunData, _data_);
}

static void
pamac_transaction_interface_root_real_snap_trans_run (PamacTransactionInterface* base,
                                                      GPtrArray* to_install,
                                                      GPtrArray* to_remove,
                                                      GAsyncReadyCallback _callback_,
                                                      gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootSnapTransRunData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	g_return_if_fail (to_install != NULL);
	g_return_if_fail (to_remove != NULL);
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootSnapTransRunData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_snap_trans_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_ptr_array_ref0 (to_install);
	_g_ptr_array_unref0 (_data_->to_install);
	_data_->to_install = _tmp1_;
	_tmp2_ = _g_ptr_array_ref0 (to_remove);
	_g_ptr_array_unref0 (_data_->to_remove);
	_data_->to_remove = _tmp2_;
	pamac_transaction_interface_root_real_snap_trans_run_co (_data_);
}

static gboolean
pamac_transaction_interface_root_snap_trans_run_finish (PamacTransactionInterface* base,
                                                        GAsyncResult* _res_,
                                                        GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootSnapTransRunData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
pamac_transaction_interface_root_real_snap_trans_run_co (PamacTransactionInterfaceRootSnapTransRunData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = FALSE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_snap_switch_channel_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootSnapSwitchChannelData* _data_;
	_data_ = _data;
	_g_free0 (_data_->snap_name);
	_g_free0 (_data_->channel);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootSnapSwitchChannelData, _data_);
}

static void
pamac_transaction_interface_root_real_snap_switch_channel (PamacTransactionInterface* base,
                                                           const gchar* snap_name,
                                                           const gchar* channel,
                                                           GAsyncReadyCallback _callback_,
                                                           gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootSnapSwitchChannelData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	gchar* _tmp1_;
	gchar* _tmp2_;
	g_return_if_fail (snap_name != NULL);
	g_return_if_fail (channel != NULL);
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootSnapSwitchChannelData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_snap_switch_channel_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = g_strdup (snap_name);
	_g_free0 (_data_->snap_name);
	_data_->snap_name = _tmp1_;
	_tmp2_ = g_strdup (channel);
	_g_free0 (_data_->channel);
	_data_->channel = _tmp2_;
	pamac_transaction_interface_root_real_snap_switch_channel_co (_data_);
}

static gboolean
pamac_transaction_interface_root_snap_switch_channel_finish (PamacTransactionInterface* base,
                                                             GAsyncResult* _res_,
                                                             GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootSnapSwitchChannelData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
pamac_transaction_interface_root_real_snap_switch_channel_co (PamacTransactionInterfaceRootSnapSwitchChannelData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = FALSE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_flatpak_trans_run_data_free (gpointer _data)
{
	PamacTransactionInterfaceRootFlatpakTransRunData* _data_;
	_data_ = _data;
	_g_ptr_array_unref0 (_data_->to_install);
	_g_ptr_array_unref0 (_data_->to_remove);
	_g_ptr_array_unref0 (_data_->to_upgrade);
	_g_object_unref0 (_data_->self);
	g_slice_free (PamacTransactionInterfaceRootFlatpakTransRunData, _data_);
}

static void
pamac_transaction_interface_root_real_flatpak_trans_run (PamacTransactionInterface* base,
                                                         GPtrArray* to_install,
                                                         GPtrArray* to_remove,
                                                         GPtrArray* to_upgrade,
                                                         GAsyncReadyCallback _callback_,
                                                         gpointer _user_data_)
{
	PamacTransactionInterfaceRoot * self;
	PamacTransactionInterfaceRootFlatpakTransRunData* _data_;
	PamacTransactionInterfaceRoot* _tmp0_;
	GPtrArray* _tmp1_;
	GPtrArray* _tmp2_;
	GPtrArray* _tmp3_;
	g_return_if_fail (to_install != NULL);
	g_return_if_fail (to_remove != NULL);
	g_return_if_fail (to_upgrade != NULL);
	self = (PamacTransactionInterfaceRoot*) base;
	_data_ = g_slice_new0 (PamacTransactionInterfaceRootFlatpakTransRunData);
	_data_->_async_result = g_task_new (G_OBJECT (self), NULL, _callback_, _user_data_);
	g_task_set_task_data (_data_->_async_result, _data_, pamac_transaction_interface_root_real_flatpak_trans_run_data_free);
	_tmp0_ = _g_object_ref0 (self);
	_data_->self = _tmp0_;
	_tmp1_ = _g_ptr_array_ref0 (to_install);
	_g_ptr_array_unref0 (_data_->to_install);
	_data_->to_install = _tmp1_;
	_tmp2_ = _g_ptr_array_ref0 (to_remove);
	_g_ptr_array_unref0 (_data_->to_remove);
	_data_->to_remove = _tmp2_;
	_tmp3_ = _g_ptr_array_ref0 (to_upgrade);
	_g_ptr_array_unref0 (_data_->to_upgrade);
	_data_->to_upgrade = _tmp3_;
	pamac_transaction_interface_root_real_flatpak_trans_run_co (_data_);
}

static gboolean
pamac_transaction_interface_root_flatpak_trans_run_finish (PamacTransactionInterface* base,
                                                           GAsyncResult* _res_,
                                                           GError** error)
{
	gboolean result;
	PamacTransactionInterfaceRootFlatpakTransRunData* _data_;
	_data_ = g_task_propagate_pointer (G_TASK (_res_), NULL);
	result = _data_->result;
	return result;
}

static gboolean
pamac_transaction_interface_root_real_flatpak_trans_run_co (PamacTransactionInterfaceRootFlatpakTransRunData* _data_)
{
	switch (_data_->_state_) {
		case 0:
		goto _state_0;
		default:
		g_assert_not_reached ();
	}
	_state_0:
	_data_->result = FALSE;
	g_task_return_pointer (_data_->_async_result, _data_, NULL);
	if (_data_->_state_ != 0) {
		while (!g_task_get_completed (_data_->_async_result)) {
			g_main_context_iteration (g_task_get_context (_data_->_async_result), TRUE);
		}
	}
	g_object_unref (_data_->_async_result);
	return FALSE;
}

static void
pamac_transaction_interface_root_real_trans_cancel (PamacTransactionInterface* base,
                                                    GError** error)
{
	PamacTransactionInterfaceRoot * self;
	GCancellable* _tmp0_;
	PamacAlpmUtils* _tmp1_;
	self = (PamacTransactionInterfaceRoot*) base;
	_tmp0_ = self->priv->trans_cancellable;
	g_cancellable_cancel (_tmp0_);
	_tmp1_ = self->priv->alpm_utils;
	pamac_alpm_utils_trans_cancel (_tmp1_, "root");
}

static void
pamac_transaction_interface_root_real_quit_daemon (PamacTransactionInterface* base,
                                                   GError** error)
{
	PamacTransactionInterfaceRoot * self;
	self = (PamacTransactionInterfaceRoot*) base;
}

static void
pamac_transaction_interface_root_class_init (PamacTransactionInterfaceRootClass * klass,
                                             gpointer klass_data)
{
	pamac_transaction_interface_root_parent_class = g_type_class_peek_parent (klass);
	g_type_class_adjust_private_offset (klass, &PamacTransactionInterfaceRoot_private_offset);
	G_OBJECT_CLASS (klass)->finalize = pamac_transaction_interface_root_finalize;
}

static void
pamac_transaction_interface_root_pamac_transaction_interface_interface_init (PamacTransactionInterfaceIface * iface,
                                                                             gpointer iface_data)
{
	pamac_transaction_interface_root_pamac_transaction_interface_parent_iface = g_type_interface_peek_parent (iface);
	iface->get_authorization = (void (*) (PamacTransactionInterface*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_get_authorization;
	iface->get_authorization_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_get_authorization_finish;
	iface->remove_authorization = (void (*) (PamacTransactionInterface*, GError**)) pamac_transaction_interface_root_real_remove_authorization;
	iface->generate_mirrors_list = (void (*) (PamacTransactionInterface*, const gchar*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_generate_mirrors_list;
	iface->generate_mirrors_list_finish = (void (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_generate_mirrors_list_finish;
	iface->clean_cache = (void (*) (PamacTransactionInterface*, GPtrArray*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_clean_cache;
	iface->clean_cache_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_clean_cache_finish;
	iface->clean_build_files = (void (*) (PamacTransactionInterface*, const gchar*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_clean_build_files;
	iface->clean_build_files_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_clean_build_files_finish;
	iface->set_pkgreason = (void (*) (PamacTransactionInterface*, const gchar*, guint, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_set_pkgreason;
	iface->set_pkgreason_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_set_pkgreason_finish;
	iface->download_updates = (void (*) (PamacTransactionInterface*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_download_updates;
	iface->download_updates_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_download_updates_finish;
	iface->download_pkgs = (void (*) (PamacTransactionInterface*, GPtrArray*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_download_pkgs;
	iface->download_pkgs_finish = (gchar** (*) (PamacTransactionInterface*, GAsyncResult*, gint*, GError**)) pamac_transaction_interface_root_download_pkgs_finish;
	iface->trans_refresh = (void (*) (PamacTransactionInterface*, gboolean, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_trans_refresh;
	iface->trans_refresh_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_trans_refresh_finish;
	iface->trans_refresh_files = (void (*) (PamacTransactionInterface*, gboolean, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_trans_refresh_files;
	iface->trans_refresh_files_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_trans_refresh_files_finish;
	iface->trans_refresh_aur = (void (*) (PamacTransactionInterface*, gboolean, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_trans_refresh_aur;
	iface->trans_refresh_aur_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_trans_refresh_aur_finish;
	iface->trans_run = (void (*) (PamacTransactionInterface*, gboolean, gboolean, gboolean, gboolean, gint, GPtrArray*, GPtrArray*, GPtrArray*, GPtrArray*, GPtrArray*, GPtrArray*, GPtrArray*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_trans_run;
	iface->trans_run_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_trans_run_finish;
	iface->snap_trans_run = (void (*) (PamacTransactionInterface*, GPtrArray*, GPtrArray*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_snap_trans_run;
	iface->snap_trans_run_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_snap_trans_run_finish;
	iface->snap_switch_channel = (void (*) (PamacTransactionInterface*, const gchar*, const gchar*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_snap_switch_channel;
	iface->snap_switch_channel_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_snap_switch_channel_finish;
	iface->flatpak_trans_run = (void (*) (PamacTransactionInterface*, GPtrArray*, GPtrArray*, GPtrArray*, GAsyncReadyCallback, gpointer)) pamac_transaction_interface_root_real_flatpak_trans_run;
	iface->flatpak_trans_run_finish = (gboolean (*) (PamacTransactionInterface*, GAsyncResult*, GError**)) pamac_transaction_interface_root_flatpak_trans_run_finish;
	iface->trans_cancel = (void (*) (PamacTransactionInterface*, GError**)) pamac_transaction_interface_root_real_trans_cancel;
	iface->quit_daemon = (void (*) (PamacTransactionInterface*, GError**)) pamac_transaction_interface_root_real_quit_daemon;
}

static void
pamac_transaction_interface_root_instance_init (PamacTransactionInterfaceRoot * self,
                                                gpointer klass)
{
	self->priv = pamac_transaction_interface_root_get_instance_private (self);
}

static void
pamac_transaction_interface_root_finalize (GObject * obj)
{
	PamacTransactionInterfaceRoot * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, PAMAC_TYPE_TRANSACTION_INTERFACE_ROOT, PamacTransactionInterfaceRoot);
	_g_object_unref0 (self->priv->trans_cancellable);
	_g_main_context_unref0 (self->priv->context);
	G_OBJECT_CLASS (pamac_transaction_interface_root_parent_class)->finalize (obj);
}

static GType
pamac_transaction_interface_root_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (PamacTransactionInterfaceRootClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) pamac_transaction_interface_root_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (PamacTransactionInterfaceRoot), 0, (GInstanceInitFunc) pamac_transaction_interface_root_instance_init, NULL };
	static const GInterfaceInfo pamac_transaction_interface_info = { (GInterfaceInitFunc) pamac_transaction_interface_root_pamac_transaction_interface_interface_init, (GInterfaceFinalizeFunc) NULL, NULL};
	GType pamac_transaction_interface_root_type_id;
	pamac_transaction_interface_root_type_id = g_type_register_static (G_TYPE_OBJECT, "PamacTransactionInterfaceRoot", &g_define_type_info, 0);
	g_type_add_interface_static (pamac_transaction_interface_root_type_id, PAMAC_TYPE_TRANSACTION_INTERFACE, &pamac_transaction_interface_info);
	PamacTransactionInterfaceRoot_private_offset = g_type_add_instance_private (pamac_transaction_interface_root_type_id, sizeof (PamacTransactionInterfaceRootPrivate));
	return pamac_transaction_interface_root_type_id;
}

GType
pamac_transaction_interface_root_get_type (void)
{
	static volatile gsize pamac_transaction_interface_root_type_id__once = 0;
	if (g_once_init_enter (&pamac_transaction_interface_root_type_id__once)) {
		GType pamac_transaction_interface_root_type_id;
		pamac_transaction_interface_root_type_id = pamac_transaction_interface_root_get_type_once ();
		g_once_init_leave (&pamac_transaction_interface_root_type_id__once, pamac_transaction_interface_root_type_id);
	}
	return pamac_transaction_interface_root_type_id__once;
}

static void
_vala_array_destroy (gpointer array,
                     gssize array_length,
                     GDestroyNotify destroy_func)
{
	if ((array != NULL) && (destroy_func != NULL)) {
		gssize i;
		for (i = 0; i < array_length; i = i + 1) {
			if (((gpointer*) array)[i] != NULL) {
				destroy_func (((gpointer*) array)[i]);
			}
		}
	}
}

static void
_vala_array_free (gpointer array,
                  gssize array_length,
                  GDestroyNotify destroy_func)
{
	_vala_array_destroy (array, array_length, destroy_func);
	g_free (array);
}

