This commit is contained in:
guinux 2015-01-03 17:26:47 +01:00
parent cff0edab60
commit 0dc000f8f4
5 changed files with 20 additions and 8 deletions

View File

@ -43,7 +43,7 @@ namespace Alpm {
int usesyslog;
public int checkspace;
Alpm.List<string> cachedirs;
Alpm.List<string> ignoregrps;
Alpm.List<string> ignoregroups;
public string ignorepkg;
Alpm.List<string> ignorepkgs;
Alpm.List<string> noextracts;
@ -75,7 +75,7 @@ namespace Alpm {
syncfirst = "";
cachedirs = new Alpm.List<string> ();
cachedirs.add ("/var/cache/pacman/pkg/");
ignoregrps = new Alpm.List<string> ();
ignoregroups = new Alpm.List<string> ();
ignorepkgs = new Alpm.List<string> ();
ignorepkg = "";
noextracts = new Alpm.List<string> ();
@ -114,7 +114,7 @@ namespace Alpm {
handle.localfilesiglevel = localfilesiglevel;
handle.remotefilesiglevel = remotefilesiglevel;
handle.cachedirs = cachedirs;
handle.ignoregroups = ignoregrps;
handle.ignoregroups = ignoregroups;
handle.ignorepkgs = ignorepkgs;
handle.noextracts = noextracts;
handle.noupgrades = noupgrades;
@ -194,20 +194,20 @@ namespace Alpm {
syncfirsts.append (name);
} else if (_key == "CacheDir") {
foreach (string dir in _value.split (" "))
cachedirs.add (dir);
cachedirs.add_str (dir);
} else if (_key == "IgnoreGroup") {
foreach (string name in _value.split (" "))
ignoregrps.add (name);
ignoregroups.add_str (name);
} else if (_key == "IgnorePkg") {
ignorepkg = _value;
foreach (string name in _value.split (" "))
ignorepkgs.add (name);
ignorepkgs.add_str (name);
} else if (_key == "Noextract") {
foreach (string name in _value.split (" "))
noextracts.add (name);
noextracts.add_str (name);
} else if (_key == "NoUpgrade") {
foreach (string name in _value.split (" "))
noupgrades.add (name);
noupgrades.add_str (name);
}
} else {
foreach (var repo in repo_order) {

View File

@ -673,6 +673,7 @@ namespace Pamac {
if (pamac_changes) {
write_pamac_config (new_pamac_conf);
pamac_config.reload ();
check_aur = pamac_config.enable_aur;
}
bool alpm_changes = (new_alpm_conf.size () != 0);
if (alpm_changes) {

View File

@ -1,3 +1,4 @@
#include <string.h>
#include "alpm-util.h"
alpm_pkg_t* alpm_pkg_load_file (alpm_handle_t *handle, const char *filename, int full, alpm_siglevel_t level) {
@ -29,6 +30,12 @@ void* alpm_list_nth_data (alpm_list_t *list, size_t n) {
return alpm_list_nth (list, n)->data;
}
alpm_list_t* alpm_list_add_str (alpm_list_t *list, const char *str) {
char *dup = strdup (str);
list = alpm_list_add (list, dup);
return list;
}
alpm_list_t* alpm_list_remove_data (alpm_list_t *list, const void *needle, alpm_list_fn_cmp fn) {
void *data = NULL;
list = alpm_list_remove (list, needle, fn, data);

View File

@ -9,6 +9,7 @@ typedef struct __alpm_list_iterator_t {
void* alpm_list_get_data (alpm_list_t *list);
void* alpm_list_nth_data (alpm_list_t *list, size_t n);
alpm_list_t* alpm_list_add_str (alpm_list_t *list, const char *str);
alpm_list_t *alpm_list_remove_data (alpm_list_t *list, const void *needle, alpm_list_fn_cmp fn);
alpm_list_t *alpm_list_sort_data (alpm_list_t *list, alpm_list_fn_cmp fn);
alpm_list_t *alpm_list_new ();

View File

@ -1319,6 +1319,9 @@ namespace Alpm {
[ReturnsModifiedPointer ()]
public unowned void add(G data);
[ReturnsModifiedPointer ()]
public unowned void add_str(string str);
[ReturnsModifiedPointer ()]
public unowned void join(List<G> list);