Bug 277699 - freebsd-update: "cron install" give spurious message compared to "fetch install"
Summary: freebsd-update: "cron install" give spurious message compared to "fetch install"
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.3-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-14 16:30 UTC by Michael Osipov
Modified: 2024-04-01 19:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Osipov freebsd_committer freebsd_triage 2024-03-14 16:30:25 UTC
Running "freebsd cron install" gives me:
> No updates are available to install.
> Run '/usr/sbin/freebsd-update fetch' first.

Well, I did the fetch via "cron". Looking at the source it seems to come from incomplete change in https://svnweb.freebsd.org/base/head/usr.sbin/freebsd-update/freebsd-update.sh?r1=324441&r2=324440&pathrev=324441.

After a one line patch it looks:
> No updates are available to install.

Will provide a patch.
Comment 1 commit-hook freebsd_committer freebsd_triage 2024-03-18 10:03:20 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=85c3ef77cc9f7dbf8500c3d16c82d24eb06bfa81

commit 85c3ef77cc9f7dbf8500c3d16c82d24eb06bfa81
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2024-03-14 16:39:47 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2024-03-18 10:01:59 +0000

    freebsd-update: mark "cron" as fetched as "fetch" itself

    The change in 33bd05c3187d7b49c80cf1b0132b405c105d0833 was incomplete
    because it did not mark "cron" as ISFETCHED=1 although it performs the
    same operations as "install", but less output and does not perform a
    hard exit. Mark result as such and make "install" know that updates have
    been fetched.

    PR:             277699
    Approved by:    jrm (mentor), emaste, cperciva
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D44356

 usr.sbin/freebsd-update/freebsd-update.sh | 1 +
 1 file changed, 1 insertion(+)
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-04-01 19:19:13 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e54b9d17f82d5cb5efd84826706205442e6352cd

commit e54b9d17f82d5cb5efd84826706205442e6352cd
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2024-03-14 16:39:47 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2024-04-01 19:18:15 +0000

    freebsd-update: mark "cron" as fetched as "fetch" itself

    The change in 33bd05c3187d7b49c80cf1b0132b405c105d0833 was incomplete
    because it did not mark "cron" as ISFETCHED=1 although it performs the
    same operations as "install", but less output and does not perform a
    hard exit. Mark result as such and make "install" know that updates have
    been fetched.

    PR:             277699
    Approved by:    jrm (mentor), emaste, cperciva
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D44356

 usr.sbin/freebsd-update/freebsd-update.sh | 1 +
 1 file changed, 1 insertion(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-04-01 19:20:14 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=fc5208028a78b014bdb1c77264c5b8c1823f9281

commit fc5208028a78b014bdb1c77264c5b8c1823f9281
Author:     Michael Osipov <michaelo@FreeBSD.org>
AuthorDate: 2024-03-14 16:39:47 +0000
Commit:     Michael Osipov <michaelo@FreeBSD.org>
CommitDate: 2024-04-01 19:19:50 +0000

    freebsd-update: mark "cron" as fetched as "fetch" itself

    The change in 33bd05c3187d7b49c80cf1b0132b405c105d0833 was incomplete
    because it did not mark "cron" as ISFETCHED=1 although it performs the
    same operations as "install", but less output and does not perform a
    hard exit. Mark result as such and make "install" know that updates have
    been fetched.

    PR:             277699
    Approved by:    jrm (mentor), emaste, cperciva
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D44356

 usr.sbin/freebsd-update/freebsd-update.sh | 1 +
 1 file changed, 1 insertion(+)
Comment 4 Michael Osipov freebsd_committer freebsd_triage 2024-04-01 19:20:59 UTC
Fixed in all active branches.