summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-06 13:37:18 -0500
committerDan McGee <dan@archlinux.org>2011-07-14 15:59:57 -0500
commit8f72ffbc4521008897fff0819cae4c80f8405391 (patch)
tree0e9f73c51695acce2ac477f927d0f890ba1f9c18 /lib/libalpm/alpm.h
parent0fe93bc34c4f463fbaeaa8be7a00e10bc0bc8b4d (diff)
downloadpacman-8f72ffbc4521008897fff0819cae4c80f8405391.tar.xz
Make alpm_db_set_pkgreason() arguments more sane
This can only ever operate on the local database, and a local package at that. Change the function signature to take a handle and package object, add the relevant asserts, and ensure the frontend can detect the package not found condition when finding packages to pass to this method. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index c7cab043..6e1e4bc4 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -476,12 +476,13 @@ alpm_list_t *alpm_db_get_groupcache(alpm_db_t *db);
alpm_list_t *alpm_db_search(alpm_db_t *db, const alpm_list_t* needles);
/** Set install reason for a package in db.
- * @param db pointer to the package database
- * @param name the name of the package
+ * @param handle the context handle
+ * @param pkg the package to update
* @param reason the new install reason
* @return 0 on success, -1 on error (pm_errno is set accordingly)
*/
-int alpm_db_set_pkgreason(alpm_db_t *db, const char *name, alpm_pkgreason_t reason);
+int alpm_db_set_pkgreason(alpm_handle_t *handle, alpm_pkg_t *pkg,
+ alpm_pkgreason_t reason);
/** @} */