Bug 2162885 - Do what the manpage says and read both configuration files.
Summary: Do what the manpage says and read both configuration files.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: ykocli
Version: 37
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
Assignee: Gerald Cox
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-01-21 20:00 UTC by Björn Persson
Modified: 2023-01-31 01:57 UTC (History)
1 user (show)

Fixed In Version: ykocli-1.2.0-1.fc38 ykocli-1.3.1-1.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-01-23 15:21:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Björn Persson 2023-01-21 20:00:54 UTC
Description of problem:
The Ykocli manpage says:

       ykocli sources two configuration files on startup - /etc/ykocli.conf and $HOME/.ykocli.conf, in that order.

That's a good way to do it, as users can then have a minimal configuration files that overrides the one parameter they need to change, and uses the global configuration for the rest.

That is however not what the program actually does. Reading the code I find that an accurate description would be:

       ykocli sources one of two configuration files on startup. If $HOME/.ykocli.conf exists, then only that file is used. Otherwise /etc/ykocli.conf is in effect.

That's worse, because changes and additions to the global configuration are then hidden from users who changed one parameter at some point in the past. It would be better to change the code to match the manpage, than to change the manpage to match the code.

By the way, VERSION doesn't belong in a configuration file at all, and it's doubtful whether SRC does. 

Version-Release number of selected component:
1.1.1-1.fc37

Comment 1 Gerald Cox 2023-01-21 21:15:26 UTC
Good point, I'll fix that.  Again, thanks for testing and commenting.  If you notice anything else, please report.

Comment 2 Fedora Update System 2023-01-23 15:19:37 UTC
FEDORA-2023-d27c76f394 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-d27c76f394

Comment 3 Fedora Update System 2023-01-23 15:21:53 UTC
FEDORA-2023-d27c76f394 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 4 Fedora Update System 2023-01-23 15:31:09 UTC
FEDORA-2023-e2e6e622af has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-e2e6e622af

Comment 5 Fedora Update System 2023-01-23 17:38:16 UTC
FEDORA-2023-208b0260aa has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-208b0260aa

Comment 6 Fedora Update System 2023-01-25 03:18:10 UTC
FEDORA-2023-208b0260aa has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-208b0260aa`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-208b0260aa

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-01-27 17:23:20 UTC
FEDORA-2023-cdf5d80cbb has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-cdf5d80cbb`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-cdf5d80cbb

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Björn Persson 2023-01-30 10:29:26 UTC
So Ykocli 1.3.1 doesn't read /etc/ykocli.conf at all. It has only per-user configuration, no global configuration file. That's also a valid approach, but then /etc/ykocli.conf is effectively documentation, not configuration. Documentation belongs in /usr/share/doc/ykocli, not in /etc.

Comment 9 Gerald Cox 2023-01-30 15:27:16 UTC
I just took the same approach as other packages, e.g. abcde.  It's an established convention for users to copy /etc/xxx.conf files and make local changes.

Comment 10 Fedora Update System 2023-01-31 01:57:04 UTC
FEDORA-2023-cdf5d80cbb has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.