diff options
author | noreply@github.com <noreply@github.com> | 2020-01-28 16:26:47 +0000 |
---|---|---|
committer | noreply@github.com <noreply@github.com> | 2020-01-28 16:26:47 +0000 |
commit | 607fd03b7e579e75d5e40cff95e9e0b3f9b661bd (patch) | |
tree | 2855ada7883756775ddc8d45e8fe11d1fa99953a | |
parent | e82b03438a2a627f8cb7860d161c32e951e11d60 (diff) | |
parent | 598398b78fb7e24d2dc237bead839f32a2d22c95 (diff) | |
download | cpt-607fd03b7e579e75d5e40cff95e9e0b3f9b661bd.tar.gz |
Merge pull request #96 from kisslinux/choices
kiss: Do auto alts if < 10
FossilOrigin-Name: 4d39ff7b0d3c2f3876889a5aea48ccfcdd930c53eedb81c92840f21067576fe3
-rwxr-xr-x | kiss | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -778,10 +778,14 @@ pkg_conflicts() { [ -s "$cac_dir/$pid-m" ] || return 0 + # Count the total conflicts to determine when to + # automatically enable the alternatives feature. + con_total=$("$grep" -Fxf "$cac_dir/$pid-m" -- "$@" | wc -l) + # Use 'grep' to list matching lines between the to # be installed package's manifest and the above filtered # list. - if [ "$KISS_CHOICE" ]; then + if [ "$KISS_CHOICE" ] || [ "$con_total" -le 10 ]; then "$grep" -Fxf "$cac_dir/$pid-m" -- "$@" | # This is a novel way of offering an "alternatives" system. |