160
160
AptTransaction* self = APT_TRANSACTION(user_data);
161
161
AptState current_state = DONT_KNOW;
163
if (g_strcmp0(signal_name, "PropertyChanged") == 0 && self->type == SIMULATION)
163
if (g_strcmp0(signal_name, "PropertyChanged") == 0)
165
165
gchar* prop_name= NULL;
166
166
GVariant* value = NULL;
204
204
current_state = UP_TO_DATE;
207
if (self->type == REAL)
209
GVariant* role = g_dbus_proxy_get_cached_property (self->proxy,
211
if (g_variant_is_of_type (role, G_VARIANT_TYPE_STRING) == TRUE){
212
gchar* current_role = NULL;
213
g_variant_get (role, "s", ¤t_role);
214
//g_debug ("Current transaction role = %s", current_role);
215
if (g_strcmp0 (current_role, "role-commit-packages") == 0 ||
216
g_strcmp0 (current_role, "role-upgrade-system") == 0){
217
g_debug ("UPGRADE IN PROGRESS");
218
current_state = UPGRADE_IN_PROGRESS;
208
else if (g_strcmp0(signal_name, "PropertyChanged") == 0 &&
211
GVariant* role = g_dbus_proxy_get_cached_property (self->proxy,
213
if (g_variant_is_of_type (role, G_VARIANT_TYPE_STRING) == TRUE){
214
gchar* current_role = NULL;
215
g_variant_get (role, "s", ¤t_role);
216
//g_debug ("Current transaction role = %s", current_role);
217
if (g_strcmp0 (current_role, "role-commit-packages") == 0 ||
218
g_strcmp0 (current_role, "role-upgrade-system") == 0){
219
g_debug ("UPGRADE IN PROGRESS");
220
current_state = UPGRADE_IN_PROGRESS;
224
223
else if (g_strcmp0(signal_name, "Finished") == 0)
226
225
g_debug ("TRANSACTION Finished");