Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153683829
D32570.id97351.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.id97351.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
+ # If there are no updates upstream there is no need for
+ # further processing, but force (-F) will still perform the
+ # entirity of fetch_run. Only if a prior fetch_run has
+ # completed in full will fetch then compare the upstream tag
+ # (tag.new) to the tag on disk and emit "No updates are
+ # available to fetch."
+ 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, Apr 23, 9:59 PM (15 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32046942
Default Alt Text
D32570.id97351.diff (1 KB)
Attached To
Mode
D32570: freebsd-update: efficiently handle no updates in fetch
Attached
Detach File
Event Timeline
Log In to Comment