Bug 263290 - freebsd-update(8) should create new /var/db/freebsd-update dir
Summary: freebsd-update(8) should create new /var/db/freebsd-update dir
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL: https://reviews.freebsd.org/D42033
Keywords: feature, needs-qa
Depends on:
Blocks:
 
Reported: 2022-04-15 10:41 UTC by Slawomir Wojciech Wojtczak
Modified: 2023-12-20 12:05 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Slawomir Wojciech Wojtczak 2022-04-15 10:41:10 UTC
Hi.

If /var/db/freebsd-update dir does not exists then freebsd-update(8) fails with error.

# freebsd-update upgrade -r 13.1-RC3
freebsd-update: Directory does not exist or is not writable: /var/db/freebsd-update

IMHO if such dir does not exists then freebsd-update(8) should try to create it and only fail if 'Permission denied.' error would occur (lack of write permissions).


Regards.
Comment 1 Graham Perrin freebsd_committer freebsd_triage 2022-12-05 03:40:40 UTC
For clarity: is an absence of    /var/db/freebsd-update    typically the result of (for example) someone inadvertently removing the directory, instead of its contents?
Comment 2 Slawomir Wojciech Wojtczak 2022-12-05 16:06:08 UTC
I always remove /var/db/freebsd-update manually.

1st - it takes pointless space.
2nd - I want to be sure I start 'clean'.

Hope that helps.
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2023-08-16 07:01:11 UTC
needs-qa

Back to the pool, to decide whether this feature should be implemented.
Comment 4 Ed Maste freebsd_committer freebsd_triage 2023-10-01 23:34:48 UTC
Potential change in https://reviews.freebsd.org/D42033
Comment 5 Dave Cottlehuber freebsd_committer freebsd_triage 2023-12-20 12:05:13 UTC
var/db/freebsd-update is present in base.txz releases, but appears to be absent when built from poudriere images sometimes.  I added a manual step in image overlay to ensure its present.

IMO this would be nice to fix in freebsd-update, per https://reviews.freebsd.org/D42033