MFC revisions 1.13, 1.14: Don't try to compute the SHA256 hashes of

files which don't exist; and fix the handling of symlinks to
dynamically linked libraries.
This commit is contained in:
cperciva 2008-04-04 23:22:49 +00:00
parent 91515fa1c7
commit 10e176c6ce

View File

@ -2196,9 +2196,9 @@ EOF
# Store merged files.
while read F; do
V=`${SHA256} -q merge/new/${F}`
if [ -f merge/new/${F} ]; then
V=`${SHA256} -q merge/new/${F}`
gzip -c < merge/new/${F} > files/${V}.gz
echo "${F}|${V}"
fi
@ -2511,14 +2511,14 @@ Kernel updates have been installed. Please reboot and run
if ! [ -f $1/worlddone ]; then
# Install new shared libraries next
grep -vE '^/boot/' $1/INDEX-NEW |
grep -E '/lib/.*\.so\.[0-9]+' > INDEX-NEW
grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW
install_from_index INDEX-NEW || return 1
# Deal with everything else
grep -vE '^/boot/' $1/INDEX-OLD |
grep -vE '/lib/.*\.so\.[0-9]+' > INDEX-OLD
grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD
grep -vE '^/boot/' $1/INDEX-NEW |
grep -vE '/lib/.*\.so\.[0-9]+' > INDEX-NEW
grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW
install_from_index INDEX-NEW || return 1
install_delete INDEX-OLD INDEX-NEW || return 1
@ -2539,11 +2539,11 @@ Kernel updates have been installed. Please reboot and run
# Do we need to ask the user to portupgrade now?
grep -vE '^/boot/' $1/INDEX-NEW |
grep -E '/lib/.*\.so\.[0-9]+' |
grep -E '/lib/.*\.so\.[0-9]+\|' |
cut -f 1 -d '|' |
sort > newfiles
if grep -vE '^/boot/' $1/INDEX-OLD |
grep -E '/lib/.*\.so\.[0-9]+' |
grep -E '/lib/.*\.so\.[0-9]+\|' |
cut -f 1 -d '|' |
sort |
join -v 1 - newfiles |
@ -2563,9 +2563,9 @@ again to finish installing updates.
# Remove old shared libraries
grep -vE '^/boot/' $1/INDEX-NEW |
grep -E '/lib/.*\.so\.[0-9]+' > INDEX-NEW
grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW
grep -vE '^/boot/' $1/INDEX-OLD |
grep -E '/lib/.*\.so\.[0-9]+' > INDEX-OLD
grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD
install_delete INDEX-OLD INDEX-NEW || return 1
# Remove temporary files
@ -2631,35 +2631,35 @@ rollback_files () {
# Install old shared library files which don't have the same path as
# a new shared library file.
grep -vE '^/boot/' $1/INDEX-NEW |
grep -E '/lib/.*\.so\.[0-9]+' |
grep -E '/lib/.*\.so\.[0-9]+\|' |
cut -f 1 -d '|' |
sort > INDEX-NEW.libs.flist
grep -vE '^/boot/' $1/INDEX-OLD |
grep -E '/lib/.*\.so\.[0-9]+' |
grep -E '/lib/.*\.so\.[0-9]+\|' |
sort -k 1,1 -t '|' - |
join -t '|' -v 1 - INDEX-NEW.libs.flist > INDEX-OLD
install_from_index INDEX-OLD || return 1
# Deal with files which are neither kernel nor shared library
grep -vE '^/boot/' $1/INDEX-OLD |
grep -vE '/lib/.*\.so\.[0-9]+' > INDEX-OLD
grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD
grep -vE '^/boot/' $1/INDEX-NEW |
grep -vE '/lib/.*\.so\.[0-9]+' > INDEX-NEW
grep -vE '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW
install_from_index INDEX-OLD || return 1
install_delete INDEX-NEW INDEX-OLD || return 1
# Install any old shared library files which we didn't install above.
grep -vE '^/boot/' $1/INDEX-OLD |
grep -E '/lib/.*\.so\.[0-9]+' |
grep -E '/lib/.*\.so\.[0-9]+\|' |
sort -k 1,1 -t '|' - |
join -t '|' - INDEX-NEW.libs.flist > INDEX-OLD
install_from_index INDEX-OLD || return 1
# Delete unneeded shared library files
grep -vE '^/boot/' $1/INDEX-OLD |
grep -E '/lib/.*\.so\.[0-9]+' > INDEX-OLD
grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-OLD
grep -vE '^/boot/' $1/INDEX-NEW |
grep -E '/lib/.*\.so\.[0-9]+' > INDEX-NEW
grep -E '/lib/.*\.so\.[0-9]+\|' > INDEX-NEW
install_delete INDEX-NEW INDEX-OLD || return 1
# Deal with kernel files