[mirrors_config] try it differently

This commit is contained in:
Philip 2017-05-27 12:10:56 +02:00
parent 83aa5fc839
commit 6d3a9d4a55

View File

@ -19,9 +19,6 @@
namespace Pamac { namespace Pamac {
class MirrorsConfig { class MirrorsConfig {
Transaction transaction;
this.transaction = transaction;
AlpmPackage pkg = transaction.find_installed_satisfier ("pacman-mirrors");
string conf_path; string conf_path;
GLib.List<string> _countries ; GLib.List<string> _countries ;
@ -31,7 +28,8 @@ namespace Pamac {
public unowned GLib.List<string> countries { public unowned GLib.List<string> countries {
get { get {
try { try {
if (pkg != "") { var file = File.new_for_path ("/usr/bin/pacman-mirrors");
if (file.query_exists ()) {
string countries_str; string countries_str;
int status; int status;
Process.spawn_command_line_sync ("pacman-mirrors -l", Process.spawn_command_line_sync ("pacman-mirrors -l",