Bug 214619 - freebsd-update fetch -F doesn't force fetch like I would expect
Summary: freebsd-update fetch -F doesn't force fetch like I would expect
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.3-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-18 06:44 UTC by Enji Cooper
Modified: 2019-04-02 14:02 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Enji Cooper freebsd_committer freebsd_triage 2016-11-18 06:44:28 UTC
I was operating under the assumption that -F would actually force the fetch operation to do something... it just notes that there isn't anything to update, even though I'm one rev off of the latest version of 10.3-RELEASE.

$ sudo freebsd-update fetch -F
Looking up update.FreeBSD.org mirrors... 4 mirrors found.
Fetching metadata signature for 10.3-RELEASE from update4.freebsd.org... done.
Fetching metadata index... done.
Inspecting system... done.
Preparing to download files... done.

No updates needed to update system to 10.3-RELEASE-p12.
$ what -q /boot/kernel/kernel
FreeBSD 10.3-RELEASE-p11 #0: Mon Oct 24 18:49:24 UTC 2016
$ uname -a
FreeBSD picasso.local 10.3-RELEASE-p11 FreeBSD 10.3-RELEASE-p11 #0: Mon Oct 24 18:49:24 UTC 2016     root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
$ freebsd-update 
usage: freebsd-update [options] command ... [path]

Options:
  -b basedir   -- Operate on a system mounted at basedir
                  (default: /)
  -d workdir   -- Store working files in workdir
                  (default: /var/db/freebsd-update/)
  -f conffile  -- Read configuration options from conffile
                  (default: /etc/freebsd-update.conf)
  -F           -- Force a fetch operation to proceed
  -k KEY       -- Trust an RSA key with SHA256 hash of KEY
  -r release   -- Target for upgrade (e.g., 6.2-RELEASE)
  -s server    -- Server from which to fetch updates
                  (default: update.FreeBSD.org)
  -t address   -- Mail output of cron command, if any, to address
                  (default: root)
  --not-running-from-cron
               -- Run without a tty, for use by automated tools
  --currently-running release
               -- Update as if currently running this release
Commands:
  fetch        -- Fetch updates from server
  cron         -- Sleep rand(3600) seconds, fetch updates, and send an
                  email if updates were found
  upgrade      -- Fetch upgrades to FreeBSD version specified via -r option
  install      -- Install downloaded updates or upgrades
  rollback     -- Uninstall most recently installed updates
  IDS          -- Compare the system against an index of "known good" files.
$ svn info freebsd-update.sh 
Path: freebsd-update.sh
Name: freebsd-update.sh
Working Copy Root Path: /usr/src
URL: https://svn.freebsd.org/base/releng/10.3/usr.sbin/freebsd-update/freebsd-update.sh
Relative URL: ^/releng/10.3/usr.sbin/freebsd-update/freebsd-update.sh
Repository Root: https://svn.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 308389
Node Kind: file
Schedule: normal
Last Changed Author: delphij
Last Changed Rev: 303304
Last Changed Date: 2016-07-25 08:04:17 -0700 (Mon, 25 Jul 2016)
Text Last Updated: 2016-07-31 13:38:57 -0700 (Sun, 31 Jul 2016)
Checksum: 2fe5a12eb864e11e4be5c247b317e9772fb784f9

$
Comment 1 Ed Maste freebsd_committer freebsd_triage 2017-08-10 14:38:55 UTC
Added in r279571, perhaps it just needs more documentation?

-F just disables a new check added in that rev:

       # Check that we have updates ready to install
       if [ -f ${BDHASH}-install/kerneldone && $FORCEFETCH -eq 0 ]; then
               echo "You have a partially completed upgrade pending"
               echo "Run '$0 install' first."
               echo "Run '$0 fetch -F' to proceed anyway."
               exit 1
       fi
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-02-19 17:39:28 UTC
A commit references this bug:

Author: emaste
Date: Tue Feb 19 17:38:25 UTC 2019
New revision: 344280
URL: https://svnweb.freebsd.org/changeset/base/344280

Log:
  freebsd-update: Clarify help text

  Improve help text to include example release numbers for reference
  and clarify the -F option.

  PR:		231185, 214619
  Submitted by:	Gerald Aryeetey <aryeeteygerald_rogers.com>
  Reviewed by:	delphij, rgrimes
  MFC after:	1 month
  Sponsored by:	The FreeBSD Foundation
  Differential Revision:	https://reviews.freebsd.org/D18944

Changes:
  head/usr.sbin/freebsd-update/freebsd-update.8
  head/usr.sbin/freebsd-update/freebsd-update.sh
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-04-02 13:58:53 UTC
A commit references this bug:

Author: emaste
Date: Tue Apr  2 13:57:53 UTC 2019
New revision: 345801
URL: https://svnweb.freebsd.org/changeset/base/345801

Log:
  MFC r344280: freebsd-update: Clarify help text

  Improve help text to include example release numbers for reference
  and clarify the -F option.

  PR:		231185, 214619
  Submitted by:	Gerald Aryeetey <aryeeteygerald_rogers.com>
  Reviewed by:	delphij, rgrimes
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/12/
  stable/12/usr.sbin/freebsd-update/freebsd-update.8
  stable/12/usr.sbin/freebsd-update/freebsd-update.sh
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-04-02 13:58:58 UTC
A commit references this bug:

Author: emaste
Date: Tue Apr  2 13:58:32 UTC 2019
New revision: 345802
URL: https://svnweb.freebsd.org/changeset/base/345802

Log:
  MFC r344280: freebsd-update: Clarify help text

  Improve help text to include example release numbers for reference
  and clarify the -F option.

  PR:		231185, 214619
  Submitted by:	Gerald Aryeetey <aryeeteygerald_rogers.com>
  Reviewed by:	delphij, rgrimes
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/11/
  stable/11/usr.sbin/freebsd-update/freebsd-update.8
  stable/11/usr.sbin/freebsd-update/freebsd-update.sh