diff options
author | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-01-28 16:23:41 +0000 |
---|---|---|
committer | dylan.araps@gmail.com <dylan.araps@gmail.com> | 2020-01-28 16:23:41 +0000 |
commit | 598398b78fb7e24d2dc237bead839f32a2d22c95 (patch) | |
tree | 2855ada7883756775ddc8d45e8fe11d1fa99953a /kiss | |
parent | 6396c883a3fbb518450a5d9116774253bbc87eca (diff) | |
download | cpt-598398b78fb7e24d2dc237bead839f32a2d22c95.tar.gz |
kiss: Do auto alts if < 10
FossilOrigin-Name: c038cd6a0c17caffd374aba4c2781716cf957d0d60de1a2cdab4f2327901d892
Diffstat (limited to 'kiss')
-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. |