cpt

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

commit f4ea3cf3821b869aee1c75b2f6deeca031bc672c
parent 32518710436cfafd14a01130f9a1b6d56c8dfaae
Author: Dylan Araps <dylan.araps@gmail.com>
Date:   Thu, 21 Nov 2019 00:45:52 +0000

kiss: Possible fix for conflict bug

Diffstat:
Mkiss | 20++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/kiss b/kiss @@ -575,27 +575,27 @@ pkg_conflicts() { set +ef - # Extract manifest from tarball and only print files which - # exist in the filesystem. It's pointless to check for conflicts - # with files which don't presently exist. + # Filter the tarball's manifest and select only files + # and any files they resolve to on the filesystem \ + # (/bin/ls -> /usr/bin/ls). tar xf "$1" -O "./$pkg_db/$2/manifest" | while read -r file; do - [ -f "$KISS_ROOT/$file" ] && { - printf '%s\n' "$file" + case $file in */) continue; esac - (cd "$KISS_ROOT/"; readlink -f "./$file") - } + printf '%s\n' "$file" + + (cd "$KISS_ROOT/" && readlink -f "./$file") ||: done | # Filter the existing file list through the manifest of the # presently installed version of the package (if it exists). - grep -svFxf "$sys_db/$2/manifest" - 2>/dev/null > "$cac_dir/$pid-m" + grep -svFxf "$KISS_ROOT/$sys_db/$2/manifest" - \ + 2>/dev/null > "$cac_dir/$pid-m" # If the generated manifest contains matches, check the # contents for conflicts. - if [ -s "$cac_dir/$pid-m" ]; then + [ -s "$cac_dir/$pid-m" ] && grep -Fxf "$cac_dir/$pid-m" -- "$sys_db"/*/manifest && die "Package '$2' conflicts with another package" - fi set -ef }