From c22e381a8b86412b6c181446128affe32ab1d71e Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Tue, 21 Aug 2007 21:28:05 -0400 Subject: Post trial install changes, round one A bunch of changes related to my first "real" install of pacman-git into /usr/local and trying to use it. * Shift some uses of free -> FREE in libalpm. * Move stat and sanity checks of config paths into libalpm from the config and argument parsing in pacman.c. * Fix issue where dbpath still was not defined early enough due to its requirement for being used in alpm_db_register. This should be rewritten so it doesn't have this dependency, but this will work for now. Signed-off-by: Dan McGee --- lib/libalpm/alpm.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'lib/libalpm/alpm.h') diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h index beb06c01..844d9bf2 100644 --- a/lib/libalpm/alpm.h +++ b/lib/libalpm/alpm.h @@ -93,17 +93,17 @@ alpm_cb_download alpm_option_get_dlcb(); void alpm_option_set_dlcb(alpm_cb_download cb); const char *alpm_option_get_root(); -void alpm_option_set_root(const char *root); +int alpm_option_set_root(const char *root); const char *alpm_option_get_dbpath(); -void alpm_option_set_dbpath(const char *dbpath); +int alpm_option_set_dbpath(const char *dbpath); alpm_list_t *alpm_option_get_cachedirs(); -void alpm_option_add_cachedir(const char *cachedir); +int alpm_option_add_cachedir(const char *cachedir); void alpm_option_set_cachedirs(alpm_list_t *cachedirs); const char *alpm_option_get_logfile(); -void alpm_option_set_logfile(const char *logfile); +int alpm_option_set_logfile(const char *logfile); const char *alpm_option_get_lockfile(); /* no set_lockfile, path is determined from dbpath */ @@ -145,7 +145,7 @@ alpm_list_t *alpm_option_get_syncdbs(); pmdb_t *alpm_db_register(const char *treename); int alpm_db_unregister(pmdb_t *db); -int alpm_db_unregister_all(); +int alpm_db_unregister_all(void); const char *alpm_db_get_name(const pmdb_t *db); const char *alpm_db_get_url(const pmdb_t *db); @@ -163,7 +163,7 @@ alpm_list_t *alpm_db_getgrpcache(pmdb_t *db); alpm_list_t *alpm_db_test(pmdb_t *db); alpm_list_t *alpm_db_search(pmdb_t *db, const alpm_list_t* needles); -alpm_list_t *alpm_db_get_upgrades(); +alpm_list_t *alpm_db_get_upgrades(void); /* * Packages @@ -389,6 +389,7 @@ enum _pmerrno_t { PM_ERR_SYSTEM, PM_ERR_BADPERMS, PM_ERR_NOT_A_FILE, + PM_ERR_NOT_A_DIR, PM_ERR_WRONG_ARGS, /* Interface */ PM_ERR_HANDLE_NULL, -- cgit v1.2.3-54-g00ecf