summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorNathan Jones <nathanj@insightbb.com>2007-11-10 02:13:28 +0100
committerDan McGee <dan@archlinux.org>2007-11-11 16:44:26 +0100
commit5c58b3d500d0971747af9a0c978ff6cfac668882 (patch)
tree07e424646e1e528ae94d5e9740980344746f2d98 /src
parent5cd6ffda722c79cf4689e559f214bcc27561fa5c (diff)
downloadpacman-5c58b3d500d0971747af9a0c978ff6cfac668882.tar.gz
pacman-5c58b3d500d0971747af9a0c978ff6cfac668882.tar.xz
Add IgnoreGroup and --ignoregroup option.
This will be used in the next commit. Signed-off-by: Nathan Jones <nathanj@insightbb.com> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/pacman.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c
index 9c650f21..2f916e2d 100644
--- a/src/pacman/pacman.c
+++ b/src/pacman/pacman.c
@@ -309,6 +309,7 @@ static int parseargs(int argc, char *argv[])
{"cachedir", required_argument, 0, 1007},
{"asdeps", no_argument, 0, 1008},
{"logfile", required_argument, 0, 1009},
+ {"ignoregroup", required_argument, 0, 1010},
{0, 0, 0, 0}
};
@@ -369,6 +370,7 @@ static int parseargs(int argc, char *argv[])
}
config->have_logfile = 1;
break;
+ case 1010: alpm_option_add_ignoregrp(strdup(optarg)); break;
case 'A': config->op = (config->op != PM_OP_MAIN ? 0 : PM_OP_ADD); break;
case 'F':
config->op = (config->op != PM_OP_MAIN ? 0 : PM_OP_UPGRADE);
@@ -627,6 +629,19 @@ static int _parseconfig(const char *file, const char *givensection,
}
alpm_option_add_ignorepkg(p);
pm_printf(PM_LOG_DEBUG, "config: ignorepkg: %s\n", p);
+ } else if(strcmp(key, "IgnoreGroup") == 0 || strcmp(upperkey, "IGNOREGROUP") == 0) {
+ char *p = ptr;
+ char *q;
+
+ while((q = strchr(p, ' '))) {
+ *q = '\0';
+ alpm_option_add_ignoregrp(p);
+ pm_printf(PM_LOG_DEBUG, "config: ignoregroup: %s", p);
+ p = q;
+ p++;
+ }
+ alpm_option_add_ignoregrp(p);
+ pm_printf(PM_LOG_DEBUG, "config: ignoregroup: %s\n", p);
} else if(strcmp(key, "HoldPkg") == 0 || strcmp(upperkey, "HOLDPKG") == 0) {
char *p = ptr;
char *q;