summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-13 21:06:42 -0600
committerDan McGee <dan@archlinux.org>2010-12-13 21:25:14 -0600
commita5e43b16052b5db0de285cb4abfbcd5dff58f7ad (patch)
tree066c9b0f7b7aa52f5aafa293228d25d902ff1f5f
parent580fe21065896a1cc239db72e66107f7997b3039 (diff)
Correctly force load of package reason
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/db.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 1e7d3a2b..137f8d04 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -345,11 +345,7 @@ int SYMEXPORT alpm_db_set_pkgreason(pmdb_t *db, const char *name, pmpkgreason_t
}
_alpm_log(PM_LOG_DEBUG, "setting install reason %u for %s/%s\n", reason, db->treename, name);
- /* read DESC */
- if(_alpm_local_db_read(db, pkg, INFRQ_DESC)) {
- return(-1);
- }
- if(pkg->reason == reason) {
+ if(alpm_pkg_get_reason(pkg) == reason) {
/* we are done */
return(0);
}