Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/add.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r--lib/libalpm/add.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libalpm/add.c b/lib/libalpm/add.c
index 8a50be4c..a91ada24 100644
--- a/lib/libalpm/add.c
+++ b/lib/libalpm/add.c
@@ -332,8 +332,12 @@ int _alpm_add_commit(pmtrans_t *trans, pmdb_t *db)
RET_ERR(PM_ERR_MEMORY, -1);
}
- /* copy over the install reason */
- newpkg->reason = alpm_pkg_get_reason(local);
+ /* copy over the install reason (unless alldeps is set) */
+ if(trans->flags & PM_TRANS_FLAG_ALLDEPS) {
+ newpkg->reason = PM_PKG_REASON_DEPEND;
+ } else {
+ newpkg->reason = alpm_pkg_get_reason(local);
+ }
/* pre_upgrade scriptlet */
if(alpm_pkg_has_scriptlet(newpkg) && !(trans->flags & PM_TRANS_FLAG_NOSCRIPTLET)) {