cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 72804023d3fc030735d42d484fa86685361078a4
parent 2e8d07220056e01e7cade59694aa5d7c0a0cd47a
Author: Cem Keylan <cem@ckyln.com>
Date:   Sat,  2 May 2020 03:28:32 +0300

kiss: fix pkg_conflicts for rare cases

This fixes pkg_conflicts where there are no packages or only one
packages in the system

Diffstat:
Mkiss | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/kiss b/kiss @@ -743,6 +743,17 @@ pkg_conflicts() { [ -s "$cac_dir/$pid-m" ] || return 0 + # In rare cases where the system only has one package installed + # and you are reinstalling that package, grep will try to read from + # standard input if we continue here. + # + # Also, if we don't have any packages installed grep will give an + # error. This will not cause the installation to fail, but we don't + # need to check for conflicts if that's the case anyway. If we have + # only zero packages or one package, just stop wasting time and continue + # with the installation. + [ "$1" ] && [ -f "$1" ] || return 0 + # Enable alternatives automatically if it is safe to do so. # This checks to see that the package that is about to be installed # doesn't overwrite anything it shouldn't in '/var/db/kiss/installed'.