kiss: only sort manifest once during install
This commit is contained in:
parent
001ce0396f
commit
855bda4497
16
kiss
16
kiss
|
@ -1016,11 +1016,6 @@ pkg_swap() {
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_install_files() {
|
pkg_install_files() {
|
||||||
# Reverse the manifest file so that we start shallow and go deeper as we
|
|
||||||
# iterate over each item. This is needed so that directories are created
|
|
||||||
# going down the tree.
|
|
||||||
sort "$2/$pkg_db/${2##*/}/manifest" > "$mak_dir/if"
|
|
||||||
|
|
||||||
while read -r file; do
|
while read -r file; do
|
||||||
# Grab the octal permissions so that directory creation
|
# Grab the octal permissions so that directory creation
|
||||||
# preserves permissions.
|
# preserves permissions.
|
||||||
|
@ -1066,7 +1061,7 @@ pkg_install_files() {
|
||||||
[ -h "$_file" ] || chmod "$b$oct" "$_file"
|
[ -h "$_file" ] || chmod "$b$oct" "$_file"
|
||||||
}
|
}
|
||||||
esac
|
esac
|
||||||
done < "$mak_dir/if" || :
|
done || :
|
||||||
}
|
}
|
||||||
|
|
||||||
pkg_remove_files() {
|
pkg_remove_files() {
|
||||||
|
@ -1318,8 +1313,13 @@ pkg_install() {
|
||||||
cp -f "$sys_db/$pkg_name/etcsums" "$mak_dir/c" 2>/dev/null ||
|
cp -f "$sys_db/$pkg_name/etcsums" "$mak_dir/c" 2>/dev/null ||
|
||||||
: > "$mak_dir/c"
|
: > "$mak_dir/c"
|
||||||
|
|
||||||
|
# Reverse the manifest file so that we start shallow and go deeper as we
|
||||||
|
# iterate over each item. This is needed so that directories are created
|
||||||
|
# going down the tree.
|
||||||
|
sort "$tar_dir/$pkg_name/$pkg_db/$pkg_name/manifest" > "$mak_dir/if"
|
||||||
|
|
||||||
# Install the package's files by iterating over its manifest.
|
# Install the package's files by iterating over its manifest.
|
||||||
pkg_install_files -z "$tar_dir/$pkg_name"
|
pkg_install_files -z "$tar_dir/$pkg_name" < "$mak_dir/if"
|
||||||
|
|
||||||
# Handle /etc/ files in a special way (via a 3-way checksum) to determine
|
# Handle /etc/ files in a special way (via a 3-way checksum) to determine
|
||||||
# how these files should be installed. Do we overwrite the existing file?
|
# how these files should be installed. Do we overwrite the existing file?
|
||||||
|
@ -1341,7 +1341,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"
|
log "$pkg_name" "Verifying installation"
|
||||||
pkg_install_files -e "$tar_dir/$pkg_name"
|
pkg_install_files -e "$tar_dir/$pkg_name" < "$mak_dir/if"
|
||||||
|
|
||||||
# Reset 'trap' to its original value. Installation is done so we no longer
|
# Reset 'trap' to its original value. Installation is done so we no longer
|
||||||
# need to block 'Ctrl+C'.
|
# need to block 'Ctrl+C'.
|
||||||
|
|
Loading…
Reference in New Issue