diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-12 09:59:21 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2008-06-12 09:59:21 +0200 |
commit | 8d9b64bd55067cd002d39f674c497cdca9e3e096 (patch) | |
tree | 8e0062f6533504ba183b1a3972050f1550031b0d /bin | |
parent | b1ca518185a2233bcb63cb2441f70f735d5bd3dc (diff) |
Added package conflicts (not tested yet, though)
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/pkg | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -150,6 +150,24 @@ check_deps () { } } +check_conflicts () { + [ -r $PDIR/$1/conflicts ] || return 0 + CONFLICTS=($(cat $PDIR/$1/conflicts)) + REMOVE=() + for conflict in $CONFLICTS; { + if ([ -d $PDIR/$conflict ]) { + if (confirm_no "$1 conflicts with $conflict. Remove $conflict?") { + REMOVE+="$conflict" + } + } + } + if ([ -n "$REMOVE" ]) { + for pkg in $REMOVE; { + pkg_remove "$pkg" + } + } +} + # Write a packages' files to .collected # Currently, this is only documentation populate_collected () { @@ -224,6 +242,7 @@ pkg_add () { . $PDIR/$1/hooks/post-add } check_deps "$1" + check_conflicts "$1" cd $PDIR/$1 checklinks $CL_OPTIONS populate_collected "$1" |