summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/db.c')
-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);
}