diff options
author | Dan McGee <dan@archlinux.org> | 2007-07-15 18:44:18 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2007-07-15 18:46:02 +0200 |
commit | a1e57cbec8209b64ee40fdae5990e870c8203cd7 (patch) | |
tree | 02b07ea6756c6694b367ad24b39e2457cd44a35a /lib/libalpm/add.c | |
parent | c2920033d078768db08c338f4908033503abfc08 (diff) | |
download | pacman-a1e57cbec8209b64ee40fdae5990e870c8203cd7.tar.gz pacman-a1e57cbec8209b64ee40fdae5990e870c8203cd7.tar.xz |
Add --asdeps option to pacman
This replaces the former -D operation that was undocumented and rather
hacky. It can be used with add, upgrade, or sync transactions and will affect
all packages installed. Should close FS #7193.
Also tell makepkg to use this new flag.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/add.c')
-rw-r--r-- | lib/libalpm/add.c | 8 |
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)) { |