Commit ab96e646 authored by guinux's avatar guinux

try to fix #534

parent 5a400dda
...@@ -1649,12 +1649,13 @@ namespace Pamac { ...@@ -1649,12 +1649,13 @@ namespace Pamac {
} }
public async Updates get_updates () { public async Updates get_updates () {
SourceFunc callback = get_updates.callback;
// be sure we have the good updates // be sure we have the good updates
alpm_config = new AlpmConfig ("/etc/pacman.conf"); alpm_config = new AlpmConfig ("/etc/pacman.conf");
string[] local_pkgs = {}; string[] local_pkgs = {};
string[] vcs_local_pkgs = {}; string[] vcs_local_pkgs = {};
var repos_updates = new List<Package> (); var repos_updates = new List<Package> ();
new Thread<int> ("get_updates", () => { ThreadFunc<int> run = () => {
var tmp_handle = alpm_config.get_handle (false, true); var tmp_handle = alpm_config.get_handle (false, true);
// refresh tmp dbs // refresh tmp dbs
// count this step as 90% of the total // count this step as 90% of the total
...@@ -1699,9 +1700,10 @@ namespace Pamac { ...@@ -1699,9 +1700,10 @@ namespace Pamac {
} }
pkgcache.next (); pkgcache.next ();
} }
Idle.add (get_updates.callback); Idle.add ((owned) callback);
return 0; return 0;
}); };
new Thread<int> ("get_updates", run);
yield; yield;
get_updates_progress (95); get_updates_progress (95);
if (config.check_aur_updates) { if (config.check_aur_updates) {
......
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