Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F168129603
D32570.id97355.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.id97355.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,20 @@
done
fetch_tagsanity || return 1
+ # Expedite fetch_run, if there are no updates upstream there is
+ # no need for further processing. By comparing the upstream tag
+ # (tag.new) to the tag on disk fetch_run can be expedited.
+ # Note 1: Expedited fetch_run can only occur subsequent to a full
+ # fetch_run (not interrupted, or the like).
+ # Note 2: Force (-F) will not be expedite fetch_run.
+ if [ $FORCEFETCH -eq 0 ] && [ ! -f fetch_run.pending ] &&
+ [ -f tag.new -a -f tag ] && cmp -s tag.new tag; then
+ echo "No updates are available to fetch."
+ rm -f tag.new
+ return 0
+ fi
+ touch fetch_run.pending || return 1
+
# Fetch the latest INDEX-NEW and INDEX-OLD files.
fetch_metadata INDEX-NEW INDEX-OLD || return 1
@@ -2258,6 +2272,8 @@
# 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
@@ -3395,7 +3411,7 @@
TMPFILE=`mktemp /tmp/freebsd-update.XXXXXX` || exit 1
finalize_components_config ${COMPONENTS} >> ${TMPFILE}
if ! fetch_run >> ${TMPFILE} ||
- ! grep -q "No updates needed" ${TMPFILE} ||
+ ! grep -q -E "(^No updates are available to fetch\.$|No updates needed)" ${TMPFILE} ||
[ ${VERBOSELEVEL} = "debug" ]; then
mail -s "`hostname` security updates" ${MAILTO} < ${TMPFILE}
fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Aug 27, 12:38 PM (16 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37311569
Default Alt Text
D32570.id97355.diff (1 KB)
Attached To
Mode
D32570: freebsd-update: efficiently handle no updates in fetch
Attached
Detach File
Event Timeline
Log In to Comment