kiss: Possible fix for conflict bug
This commit is contained in:
parent
3251871043
commit
f4ea3cf382
18
kiss
18
kiss
|
@ -575,27 +575,27 @@ pkg_conflicts() {
|
||||||
|
|
||||||
set +ef
|
set +ef
|
||||||
|
|
||||||
# Extract manifest from tarball and only print files which
|
# Filter the tarball's manifest and select only files
|
||||||
# exist in the filesystem. It's pointless to check for conflicts
|
# and any files they resolve to on the filesystem \
|
||||||
# with files which don't presently exist.
|
# (/bin/ls -> /usr/bin/ls).
|
||||||
tar xf "$1" -O "./$pkg_db/$2/manifest" | while read -r file; do
|
tar xf "$1" -O "./$pkg_db/$2/manifest" | while read -r file; do
|
||||||
[ -f "$KISS_ROOT/$file" ] && {
|
case $file in */) continue; esac
|
||||||
|
|
||||||
printf '%s\n' "$file"
|
printf '%s\n' "$file"
|
||||||
|
|
||||||
(cd "$KISS_ROOT/"; readlink -f "./$file")
|
(cd "$KISS_ROOT/" && readlink -f "./$file") ||:
|
||||||
}
|
|
||||||
done |
|
done |
|
||||||
|
|
||||||
# Filter the existing file list through the manifest of the
|
# Filter the existing file list through the manifest of the
|
||||||
# presently installed version of the package (if it exists).
|
# 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
|
# If the generated manifest contains matches, check the
|
||||||
# contents for conflicts.
|
# contents for conflicts.
|
||||||
if [ -s "$cac_dir/$pid-m" ]; then
|
[ -s "$cac_dir/$pid-m" ] &&
|
||||||
grep -Fxf "$cac_dir/$pid-m" -- "$sys_db"/*/manifest &&
|
grep -Fxf "$cac_dir/$pid-m" -- "$sys_db"/*/manifest &&
|
||||||
die "Package '$2' conflicts with another package"
|
die "Package '$2' conflicts with another package"
|
||||||
fi
|
|
||||||
|
|
||||||
set -ef
|
set -ef
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue