Page MenuHomeFreeBSD

D32570.id97355.diff
No OneTemporary

D32570.id97355.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,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

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)

Event Timeline