summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/handle.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/handle.c')
-rw-r--r--lib/libalpm/handle.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 819b9742..012d4121 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -79,6 +79,7 @@ void _alpm_handle_free(pmhandle_t *handle)
FREELIST(handle->cachedirs);
FREE(handle->logfile);
FREE(handle->lockfile);
+ FREE(handle->arch);
FREELIST(handle->dbs_sync);
FREELIST(handle->noupgrade);
FREELIST(handle->noextract);
@@ -213,6 +214,15 @@ alpm_list_t SYMEXPORT *alpm_option_get_ignoregrps()
return handle->ignoregrp;
}
+const char SYMEXPORT *alpm_option_get_arch()
+{
+ if (handle == NULL) {
+ pm_errno = PM_ERR_HANDLE_NULL;
+ return NULL;
+ }
+ return handle->arch;
+}
+
pmdb_t SYMEXPORT *alpm_option_get_localdb()
{
if (handle == NULL) {
@@ -520,6 +530,12 @@ int SYMEXPORT alpm_option_remove_ignoregrp(const char *grp)
return(0);
}
+void SYMEXPORT alpm_option_set_arch(const char *arch)
+{
+ if(handle->arch) FREE(handle->arch);
+ if(arch) handle->arch = strdup(arch);
+}
+
void SYMEXPORT alpm_option_set_usedelta(unsigned short usedelta)
{
handle->usedelta = usedelta;