Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110651224
D32570.id98656.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D32570.id98656.diff
View Options
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 | ${PAGER}
+ 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
@@ -3125,6 +3150,8 @@
# Rearrange bits to allow the installed updates to be rolled back
install_setup_rollback
+ rm -f fetch_create_manifest.out
+
echo " done."
}
@@ -3192,6 +3219,7 @@
# Actually rollback updates
rollback_run () {
+ rm -f tag
echo -n "Uninstalling updates..."
# If there are updates waiting to be installed, remove them; we
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Feb 22, 11:26 AM (1 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16770497
Default Alt Text
D32570.id98656.diff (1 KB)
Attached To
Mode
D32570: freebsd-update: efficiently handle no updates in fetch
Attached
Detach File
Event Timeline
Log In to Comment