Page MenuHomeFreeBSD

Suppress harmless warning if running in 'cron' mode
Needs ReviewPublic

Authored by allanjude on Aug 29 2015, 3:19 PM.

Details

Summary

When running from cron, do not output the warning that the src component was skipped because the src dist set was not installed
This avoids cron sending an email to the administrator unless there is an actual error

PR: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202492

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 303
Build 303: arc lint + arc unit

Event Timeline

allanjude retitled this revision from to Suppress harmless warning if running in 'cron' mode.
allanjude updated this object.
allanjude edited the test plan for this revision. (Show Details)
allanjude added reviewers: cperciva, delphij, bapt, marcel.

The change itself should work as expected.

I'm not totally convinced that this is the right approach though -- the message is legitimate as the user is indeed configuring something that is not available on the system, so they should fix the configuration instead (and that would also reduce an unneeded check), so if I was you I'd change the message to something like "please remove the src component from your /etc/freebsd-update.conf" and live with it and change the installer to tweak the configuration instead, but that's just a personal preference and I have no strong opinion here.

+1 For a more descriptive and user friendly "src component not installed, skipped" message as long as the cron option is not set. Including the config file to be edited would be helpful. Maybe something like:

FreeBSD src component not installed... skipped. Please remove the src component from /etc/freebsd-update.conf.

I also agree that the installer should modify /etc/freebsd-update.conf when the src component is not selected.

The change itself should work as expected.

I'm not totally convinced that this is the right approach though -- the message is legitimate as the user is indeed configuring something that is not available on the system, so they should fix the configuration instead (and that would also reduce an unneeded check), so if I was you I'd change the message to something like "please remove the src component from your /etc/freebsd-update.conf" and live with it and change the installer to tweak the configuration instead, but that's just a personal preference and I have no strong opinion here.

cperciva removed a reviewer: cperciva.

Perhaps we should just add a -q (quiet) option, which could also pick up PR 199776

I am not sure if it is the correct way to fix this either, but note that the src component has a special treatment, for some reason, and also, if you install FreeBSD without the src component from the installer, the resulting freebsd-update.conf file still has the src component,