From 5055ae35c777fe7c3e0126ddb180797d0e815a2f Mon Sep 17 00:00:00 2001 From: merakor Date: Fri, 12 Mar 2021 07:55:45 +0000 Subject: pkg_remove(): Fix reverse dependency resolving on sbase grep sbase utilities don't accept flags after arguments begin, meaning that the '--' is accepted as an argument instead of the "end flag", which causes the utility to fail because it looks for a file named '--'. FossilOrigin-Name: 29dc20b69d0e93cc8a4a52601745135911e7f396d25bf5653728efc88025f775 --- src/cpt-lib.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 8a5783a..b137994 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -1470,7 +1470,7 @@ pkg_remove() { [ "$CPT_FORCE" = 1 ] || { log "$1" "Checking for reverse dependencies" - (cd "$sys_db"; set +f; grep -lFx "$1" -- */depends) && + (cd "$sys_db"; set +f; grep -lFx -- "$1" */depends) && die "$1" "Can't remove package, others depend on it" } # Block being able to abort the script with 'Ctrl+C' during removal. -- cgit v1.2.3