Page MenuHomeFreeBSD

D32570.id98052.diff
No OneTemporary

D32570.id98052.diff

Index: usr.sbin/freebsd-update/freebsd-update.sh
===================================================================
--- usr.sbin/freebsd-update/freebsd-update.sh
+++ usr.sbin/freebsd-update/freebsd-update.sh
@@ -2200,6 +2200,28 @@
done
fetch_tagsanity || return 1
+ # By comparing files tag and tag.new fetch_run can detect that
+ # there are no updates upstream and that there is no need for
+ # further processing, expediting fetch_run. fetch_run can only
+ # be expedited subsequent to an uninterrupted fetch_run.
+ if [ ! -f fetch_run.pending ] && [ -f tag.new -a -f tag ] &&
+ cmp -s tag.new tag; then
+ echo "No updates are available to fetch."
+ if [ -f fetch_create_manifest.out ]; then
+ echo "Updates available to install."
+ echo
+ cat fetch_create_manifest.out
+ else
+ echo
+ echo -n "No updates needed to update system to "
+ echo "${RELNUM}-p${RELPATCHNUM}."
+ fi
+ rm -f tag.new
+ return 0
+ fi
+ touch fetch_run.pending || return 1
+ rm -f fetch_create_manifest.out
+
# Fetch the latest INDEX-NEW and INDEX-OLD files.
fetch_metadata INDEX-NEW INDEX-OLD || return 1
@@ -2254,10 +2276,13 @@
# Create and populate install manifest directory; and report what
# updates are available.
- fetch_create_manifest || return 1
+ fetch_create_manifest > fetch_create_manifest.out || return 1
+ cat fetch_create_manifest.out
# Warn about any upcoming EoL
fetch_warn_eol || return 1
+
+ rm -f fetch_run.pending
}
# If StrictComponents is not "yes", generate a new components list
@@ -2637,6 +2662,8 @@
done
fetch_tagsanity || return 1
+ rm -f fetch_create_manifest.out
+
# Fetch the INDEX-OLD and INDEX-ALL.
fetch_metadata INDEX-OLD INDEX-ALL || return 1
@@ -2739,7 +2766,8 @@
# Create and populate install manifest directory; and report what
# updates are available.
- fetch_create_manifest || return 1
+ fetch_create_manifest > fetch_create_manifest.out || return 1
+ cat fetch_create_manifest.out
# Leave a note behind to tell the "install" command that the kernel
# needs to be installed before the world.
@@ -3125,6 +3153,8 @@
# Rearrange bits to allow the installed updates to be rolled back
install_setup_rollback
+ rm -f fetch_create_manifest.out
+
echo " done."
}

File Metadata

Mime Type
text/plain
Expires
Sat, Apr 18, 7:02 AM (6 h, 13 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31704703
Default Alt Text
D32570.id98052.diff (2 KB)

Event Timeline