mirror of
https://codeberg.org/kiss-community/kiss
synced 2024-11-04 22:15:36 -07:00
kiss: clean up pkg_conflicts()
This commit is contained in:
parent
a747565ef4
commit
c154233aa4
10
kiss
10
kiss
@ -781,14 +781,10 @@ pkg_conflicts() {
|
||||
|
||||
# Filter the tarball's manifest and select only files. Resolve all
|
||||
# symlinks in file paths as well.
|
||||
while read -r file; do
|
||||
while read -r file; do file=$KISS_ROOT/${file#/}
|
||||
# Skip all directories.
|
||||
case $file in */) continue; esac
|
||||
|
||||
# False positive.
|
||||
# shellcheck disable=2031
|
||||
old_PWD=$PWD file=$KISS_ROOT/${file#/}
|
||||
|
||||
# Attempt to resolve symlinks by using 'cd'.
|
||||
# If this fails, fallback to the file's parent
|
||||
# directory.
|
||||
@ -797,8 +793,6 @@ pkg_conflicts() {
|
||||
# Print the file with all symlinks in its path
|
||||
# resolved to their real locations.
|
||||
printf '%s\n' "${PWD#$KISS_ROOT}/${file##*/}"
|
||||
|
||||
cd "$old_PWD"
|
||||
done < "$tar_dir/$1/$pkg_db/$1/manifest" > "$mak_dir/$pid-m"
|
||||
|
||||
p_name=$1
|
||||
@ -875,6 +869,8 @@ pkg_conflicts() {
|
||||
}
|
||||
done < "$mak_dir/$pid-c"
|
||||
|
||||
log "$p_name" "Converted all conflicts to choices (kiss a)"
|
||||
|
||||
# Rewrite the package's manifest to update its location
|
||||
# to its new spot (and name) in the choices directory.
|
||||
pkg_manifest "$p_name" "$tar_dir" 2>/dev/null
|
||||
|
Loading…
Reference in New Issue
Block a user