diff --git a/.gitignore b/.gitignore index 5e32468..18409d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,13 @@ pkgbuild +resources/*~ resources/*.c +src/*.c src/pamac-daemon src/pamac-tray src/pamac-manager src/pamac-install src/pamac-updater +src/pamac-refresh data/polkit/org.manjaro.pamac.policy po/*.mo po/*~ diff --git a/src/alpm_config.vala b/src/alpm_config.vala index 4808823..b52bdff 100644 --- a/src/alpm_config.vala +++ b/src/alpm_config.vala @@ -42,12 +42,12 @@ namespace Alpm { double deltaratio; int usesyslog; public int checkspace; - Alpm.List cachedirs; - Alpm.List ignoregroups; + Alpm.List *cachedirs; + Alpm.List *ignoregroups; public string ignorepkg; - Alpm.List ignorepkgs; - Alpm.List noextracts; - Alpm.List noupgrades; + Alpm.List *ignorepkgs; + Alpm.List *noextracts; + Alpm.List *noupgrades; public GLib.List holdpkgs; public GLib.List syncfirsts; public string syncfirst; @@ -69,12 +69,18 @@ namespace Alpm { dbpath = "/var/lib/pacman"; gpgdir = "/etc/pacman.d/gnupg/"; logfile = "/var/log/pacman.log"; + string default_cachedir = "/var/cache/pacman/pkg/"; arch = Posix.utsname().machine; holdpkgs = new GLib.List (); syncfirsts = new GLib.List (); syncfirst = ""; + Alpm.List.free_all (cachedirs); + Alpm.List.free_all (ignoregroups); + Alpm.List.free_all (ignorepkgs); + Alpm.List.free_all (noextracts); + Alpm.List.free_all (noupgrades); cachedirs = new Alpm.List (); - cachedirs.add ("/var/cache/pacman/pkg/"); + cachedirs->add_str (default_cachedir); ignoregroups = new Alpm.List (); ignorepkgs = new Alpm.List (); ignorepkg = ""; @@ -194,20 +200,20 @@ namespace Alpm { syncfirsts.append (name); } else if (_key == "CacheDir") { foreach (string dir in _value.split (" ")) - cachedirs.add_str (dir); + cachedirs->add_str (dir); } else if (_key == "IgnoreGroup") { foreach (string name in _value.split (" ")) - ignoregroups.add_str (name); + ignoregroups->add_str (name); } else if (_key == "IgnorePkg") { ignorepkg = _value; foreach (string name in _value.split (" ")) - ignorepkgs.add_str (name); + ignorepkgs->add_str (name); } else if (_key == "Noextract") { foreach (string name in _value.split (" ")) - noextracts.add_str (name); + noextracts->add_str (name); } else if (_key == "NoUpgrade") { foreach (string name in _value.split (" ")) - noupgrades.add_str (name); + noupgrades->add_str (name); } } else { foreach (var repo in repo_order) { diff --git a/src/manager_window.vala b/src/manager_window.vala index 6efd1bf..a4a5849 100644 --- a/src/manager_window.vala +++ b/src/manager_window.vala @@ -451,7 +451,7 @@ namespace Pamac { } public async Alpm.List search_pkgs (string search_string, out Json.Array aur_pkgs) { - Alpm.List needles = null; + var needles = new Alpm.List (); string[] splitted = search_string.split (" "); foreach (unowned string part in splitted) needles.add (part); diff --git a/src/pamac-refresh b/src/pamac-refresh deleted file mode 100755 index df914a5..0000000 Binary files a/src/pamac-refresh and /dev/null differ