FS#20360 - IgnorePkg, IgnoreGroup: match wildcards
Attached to Project:
Pacman
Opened by Matthew (piezoelectric) - Wednesday, 04 August 2010, 01:59 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 13 November 2011, 19:46 GMT
Opened by Matthew (piezoelectric) - Wednesday, 04 August 2010, 01:59 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 13 November 2011, 19:46 GMT
|
Details
Wild cards would be nice for IgnorePkg (and IgnoreGroup I
guess).
IgnorePkg = texlive-* for example |
This task depends upon
Closed by Dave Reisner (falconindy)
Sunday, 13 November 2011, 19:46 GMT
Reason for closing: Implemented
Additional comments about closing: see comments
Sunday, 13 November 2011, 19:46 GMT
Reason for closing: Implemented
Additional comments about closing: see comments
2. The casts are ugly- if you have to write a function anyway, make its declaration match the alpm_list_fn_cmp spec and drop the cast, please, doing them inside the function instead (something like _alpm_pkg_cmp).
3. Bonus- perhaps we should invert the groups loop so we only need one fnmatch comparator. So instead:
for(groups = alpm_pkg_get_groups(pkg); groups; groups = alpm_list_next(groups)) {
const char *group = alpm_list_getdata(groups);
if(alpm_list_find(handle->ignoregrp, group, fnmatch_cmp)) {
return(1);
}
}
const char *pat = pattern;
const char *str = string;
The second patch is the same as the other one + the same idea applied to HoldPkg. I don't know, whether there's any need for wildcards in HoldPkg or not, but it wouldn't hurt either, i guess.
0001-Match-wildcards-in-Ignor... (3.8 KiB)
http://projects.archlinux.org/pacman.git/commit/?id=902305f1633298ff0ef7cd2bfbed0e91aae91646
http://projects.archlinux.org/pacman.git/commit/?id=10241a6d766fcebb3dbc930facb3c1b2c6ab4992