Commit 648156cb authored by guinux's avatar guinux

fixes

parent 0904be3b
......@@ -270,14 +270,8 @@ namespace Pamac {
}
internal bool clean_build_files (string aur_build_dir) {
string real_aur_build_dir;
if (aur_build_dir == "/var/tmp") {
real_aur_build_dir = Path.build_path ("/", aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()));
} else {
real_aur_build_dir = Path.build_path ("/", aur_build_dir, "pamac-build");
}
try {
Process.spawn_command_line_sync ("rm -rf %s".printf (real_aur_build_dir));
Process.spawn_command_line_sync ("rm -rf %s".printf (aur_build_dir));
return true;
} catch (SpawnError e) {
critical ("SpawnError: %s\n", e.message);
......
......@@ -672,9 +672,6 @@ namespace Pamac {
init_transaction ();
if (keep > 0) {
database.config.clean_keep_num_pkgs = keep;
} else {
display_clean_help ();
return;
}
if (uninstalled) {
database.config.clean_rm_only_uninstalled = true;
......@@ -1983,7 +1980,11 @@ namespace Pamac {
}
stdout.printf ("\n");
}
stdout.printf ("%s: %s (%s)\n".printf (dgettext (null, "To delete"), dngettext (null, "%u file", "%u files", files_nb).printf (files_nb), format_size (total_size)));
if (files_nb == 0) {
stdout.printf ("%s: %s\n".printf (dgettext (null, "To delete"), dngettext (null, "%u file", "%u files", files_nb).printf (files_nb)));
} else {
stdout.printf ("%s: %s (%s)\n".printf (dgettext (null, "To delete"), dngettext (null, "%u file", "%u files", files_nb).printf (files_nb), format_size (total_size)));
}
if (files_nb == 0 || dry_run) {
return;
}
......@@ -2011,7 +2012,11 @@ namespace Pamac {
}
stdout.printf ("\n");
}
stdout.printf ("%s: %s (%s)\n".printf (dgettext (null, "To delete"), dngettext (null, "%u file", "%u files", files_nb).printf (files_nb), format_size (total_size)));
if (files_nb == 0) {
stdout.printf ("%s: %s\n".printf (dgettext (null, "To delete"), dngettext (null, "%u file", "%u files", files_nb).printf (files_nb)));
} else {
stdout.printf ("%s: %s (%s)\n".printf (dgettext (null, "To delete"), dngettext (null, "%u file", "%u files", files_nb).printf (files_nb), format_size (total_size)));
}
if (files_nb == 0 || dry_run) {
return;
}
......
......@@ -3221,6 +3221,9 @@ namespace Pamac {
[GtkCallback]
void on_preferences_button_clicked () {
this.get_window ().set_cursor (new Gdk.Cursor.for_display (Gdk.Display.get_default (), Gdk.CursorType.WATCH));
while (Gtk.events_pending ()) {
Gtk.main_iteration ();
}
bool authorized = transaction.get_authorization ();
if (authorized) {
var preferences_dialog = new PreferencesDialog (transaction);
......
......@@ -241,8 +241,14 @@ namespace Pamac {
}
public void clean_build_files () {
string real_aur_build_dir;
if (database.config.aur_build_dir == "/var/tmp") {
real_aur_build_dir = Path.build_path ("/", database.config.aur_build_dir, "pamac-build-%s".printf (Environment.get_user_name ()));
} else {
real_aur_build_dir = Path.build_path ("/", database.config.aur_build_dir, "pamac-build");
}
try {
transaction_interface.clean_build_files (database.config.aur_build_dir);
transaction_interface.clean_build_files (real_aur_build_dir);
} catch (Error e) {
emit_error ("Daemon Error", {"clean_build_files: %s".printf (e.message)});
}
......@@ -709,7 +715,6 @@ namespace Pamac {
}
sysupgrading = false;
force_refresh = false;
trans_flags = 0;
to_install.remove_all ();
to_remove.remove_all ();
to_load.remove_all ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment