[pacman-dev] [PATCH 03/13] Add files option to handle
Allan McRae
allan at archlinux.org
Sat Jun 20 07:42:16 UTC 2015
This option will be used to determine if the .files database should be used
for reading sync information.
Signed-off-by: Allan McRae <allan at archlinux.org>
---
lib/libalpm/alpm.h | 3 +++
lib/libalpm/handle.c | 13 +++++++++++++
lib/libalpm/handle.h | 1 +
3 files changed, 17 insertions(+)
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index 06e080b..b6b9175 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -859,6 +859,9 @@ int alpm_option_set_deltaratio(alpm_handle_t *handle, double ratio);
int alpm_option_get_checkspace(alpm_handle_t *handle);
int alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace);
+int alpm_option_get_files(alpm_handle_t *handle);
+int alpm_option_set_files(alpm_handle_t *handle, int files);
+
alpm_siglevel_t alpm_option_get_default_siglevel(alpm_handle_t *handle);
int alpm_option_set_default_siglevel(alpm_handle_t *handle, alpm_siglevel_t level);
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 4915d0b..ead1e98 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -284,6 +284,12 @@ int SYMEXPORT alpm_option_get_checkspace(alpm_handle_t *handle)
return handle->checkspace;
}
+int SYMEXPORT alpm_option_get_files(alpm_handle_t *handle)
+{
+ CHECK_HANDLE(handle, return -1);
+ return handle->files;
+}
+
int SYMEXPORT alpm_option_set_logcb(alpm_handle_t *handle, alpm_cb_log cb)
{
CHECK_HANDLE(handle, return -1);
@@ -664,6 +670,13 @@ int SYMEXPORT alpm_option_set_checkspace(alpm_handle_t *handle, int checkspace)
return 0;
}
+int SYMEXPORT alpm_option_set_files(alpm_handle_t *handle, int files)
+{
+ CHECK_HANDLE(handle, return -1);
+ handle->files = files;
+ return 0;
+}
+
int SYMEXPORT alpm_option_set_default_siglevel(alpm_handle_t *handle,
alpm_siglevel_t level)
{
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index 5893139..3914822 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -95,6 +95,7 @@ struct __alpm_handle_t {
double deltaratio; /* Download deltas if possible; a ratio value */
int usesyslog; /* Use syslog instead of logfile? */ /* TODO move to frontend */
int checkspace; /* Check disk space before installing */
+ int files; /* Load package information from .files database */
alpm_siglevel_t siglevel; /* Default signature verification level */
alpm_siglevel_t localfilesiglevel; /* Signature verification level for local file
upgrade operations */
--
2.4.4
More information about the pacman-dev
mailing list