summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/handle.c
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 /lib/libalpm/handle.c
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 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index af549498..78ac1171 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -100,6 +100,7 @@ void _alpm_handle_free(pmhandle_t *handle)
FREELIST(handle->noextract);
FREELIST(handle->ignorepkg);
FREELIST(handle->holdpkg);
+ FREELIST(handle->ignoregrp);
FREE(handle);
}
@@ -211,6 +212,15 @@ alpm_list_t SYMEXPORT *alpm_option_get_holdpkgs()
return handle->holdpkg;
}
+alpm_list_t SYMEXPORT *alpm_option_get_ignoregrps()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->ignoregrp;
+}
+
time_t SYMEXPORT alpm_option_get_upgradedelay()
{
if (handle == NULL) {
@@ -461,6 +471,17 @@ void SYMEXPORT alpm_option_set_holdpkgs(alpm_list_t *holdpkgs)
if(holdpkgs) handle->holdpkg = holdpkgs;
}
+void SYMEXPORT alpm_option_add_ignoregrp(const char *grp)
+{
+ handle->ignoregrp = alpm_list_add(handle->ignoregrp, strdup(grp));
+}
+
+void alpm_option_set_ignoregrps(alpm_list_t *ignoregrps)
+{
+ if(handle->ignoregrp) FREELIST(handle->ignoregrp);
+ if(ignoregrps) handle->ignoregrp = ignoregrps;
+}
+
void SYMEXPORT alpm_option_set_upgradedelay(time_t delay)
{
handle->upgradedelay = delay;