kiss: Use install for installation
This commit is contained in:
parent
6ce01392bd
commit
8a4c642d4b
28
kiss
28
kiss
|
@ -814,10 +814,6 @@ pkg_swap() {
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_install_files() {
|
pkg_install_files() {
|
||||||
# Store the total lines in the manifest file for use in the
|
|
||||||
# installation counter output.
|
|
||||||
man_tot=$(wc -l < "$2/$pkg_db/${2##*/}/manifest")
|
|
||||||
|
|
||||||
# Reverse the manifest file so that we start shallow and go
|
# Reverse the manifest file so that we start shallow and go
|
||||||
# deeper as we iterate over each item. This is needed so that
|
# deeper as we iterate over each item. This is needed so that
|
||||||
# directories are created going down the tree.
|
# directories are created going down the tree.
|
||||||
|
@ -834,22 +830,19 @@ pkg_install_files() {
|
||||||
# The 'test' will run with '-e' for no-overwrite and '-z'
|
# The 'test' will run with '-e' for no-overwrite and '-z'
|
||||||
# for overwrite.
|
# for overwrite.
|
||||||
case $line in /etc/*) ;;
|
case $line in /etc/*) ;;
|
||||||
*/) [ -d "$line" ] || mkdir -m "$perms" "$line" ;;
|
*/) [ -d "$line" ] ||
|
||||||
*) test "$1" "$line" || cp -fPp "$2/$line" "${line%/*}" ;;
|
install -o root -g root -m "$perms" -d "$line" ;;
|
||||||
esac
|
|
||||||
|
|
||||||
# Set the ownership of the result to root:root. This is
|
*) test "$1" "$line" ||
|
||||||
# KISS' method to avoid the whole fakeroot mess.
|
|
||||||
|
if [ -L "$2/$line" ]; then
|
||||||
|
cp -fPp "$2/$line" "${line%/*}"
|
||||||
chown -h root:root "$line"
|
chown -h root:root "$line"
|
||||||
|
else
|
||||||
# Preserve permissions by using chmod. This runs after
|
install -o root -g root -m "$perms" "$2/$line" "$line"
|
||||||
# chown as chown will reset suid/guid when ownership changes.
|
fi
|
||||||
[ -L "$line" ] || [ -d "$line" ] || chmod "$perms" "$line"
|
esac
|
||||||
|
|
||||||
printf '%s %s (%s)\e[J\r' "$3" "$i/$man_tot" "$line"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
printf '\n'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_etc() {
|
pkg_etc() {
|
||||||
|
@ -1088,6 +1081,7 @@ pkg_install() {
|
||||||
|
|
||||||
# Install the package's files a second time to fix any mess caused by the
|
# Install the package's files a second time to fix any mess caused by the
|
||||||
# above removal of the previous version of the package.
|
# above removal of the previous version of the package.
|
||||||
|
log "$pkg_name" "Verifying installation"
|
||||||
pkg_install_files -e "$tar_dir/$pkg_name" " Checking file"
|
pkg_install_files -e "$tar_dir/$pkg_name" " Checking file"
|
||||||
|
|
||||||
# Reset 'trap' to its original value. Installation is done so
|
# Reset 'trap' to its original value. Installation is done so
|
||||||
|
|
Loading…
Reference in New Issue