Bug 229393 - ports-mgmt/pkg: Show which options changed if upgrade needed
Summary: ports-mgmt/pkg: Show which options changed if upgrade needed
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkg (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-28 16:35 UTC by Andreas Sommer
Modified: 2021-08-18 08:51 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (pkg)


Attachments
Verbose output before/after for changed options (1.71 KB, patch)
2018-06-28 16:35 UTC, Andreas Sommer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Sommer 2018-06-28 16:35:03 UTC
Created attachment 194710 [details]
Verbose output before/after for changed options

`pkg upgrade` detects changed options in a package and requires reinstallation, but only shows minimal information about the reason:

    Installed packages to be REINSTALLED:
            mypackage-1.11 (options changed)

This patch prints before/after options and their values so the sysadmin can clearly see why a package is reinstalled.

Why? Building production packages yourself with regular ports tree updates and custom options can often lead to this case, and when doing live deployments, you want to be sure that no critical options have been altered.

I wanted to combine this with {-v,--verbose}, but apparently `pkg upgrade {-v,--vulnerable}` already exists, overriding the default expectation of 'v' option meaning verbose.
Comment 1 Baptiste Daroussin freebsd_committer freebsd_triage 2021-08-18 08:51:39 UTC
sorry for the delay here, but this too simple it does not handle the case where for example an option is added or an option is removed, it only considers that an option has changed.

if you add the notion of options removed and added then I will be happy to merge it.