Page MenuHomeFreeBSD

D32570.id97202.diff
No OneTemporary

D32570.id97202.diff

Index: usr.sbin/freebsd-update/freebsd-update.sh
===================================================================
--- usr.sbin/freebsd-update/freebsd-update.sh
+++ usr.sbin/freebsd-update/freebsd-update.sh
@@ -1215,6 +1215,11 @@
touch tINDEX.present
}
+# Fetch compare upstream tag (tag.new) to tag on disk
+fetch_compare_new_tag_to_current_tag () {
+ [ -f tag.new -a -f tag ] && cmp -s tag.new tag
+}
+
# Check that we have a public key with an appropriate hash, or
# fetch the key if it doesn't exist. Returns 1 if the key has
# not yet been fetched.
@@ -2200,6 +2205,14 @@
done
fetch_tagsanity || return 1
+ # If there are no updates upstream there is no need for further
+ # processing (except forced fetch).
+ if [ $FORCEFETCH -eq 0 ] && fetch_compare_new_tag_to_current_tag; then
+ echo "No updates are available to fetch."
+ rm -f tag.new
+ return 0
+ fi
+
# Fetch the latest INDEX-NEW and INDEX-OLD files.
fetch_metadata INDEX-NEW INDEX-OLD || return 1
@@ -3395,7 +3408,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
Sat, Feb 22, 11:34 AM (2 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16770610
Default Alt Text
D32570.id97202.diff (1 KB)

Event Timeline