haxmeister / liguros-reporter

Anonymous reporting tool for Liguros Linux
MIT License
5 stars 3 forks source link

Add comment with current version to /etc/funtoo-report.conf file #112

Closed palica closed 6 years ago

palica commented 6 years ago

I would like to add a comment with current version of tool to the config file when generated through --update-config

ShadowM00n commented 6 years ago

Should be trivial. I'll take care of it.

ShadowM00n commented 6 years ago

I think that should do it. Let me know if I overlooked anything.

palica commented 6 years ago

is funtoo-report -l using only uncommented lines?

cat /etc/funtoo-report.conf 
# Generated on Sat Apr 14 22:41:17 2018 for v2.0.0-136-gcc83c96 of funtoo-report
UUID:d9c85d92-b59d-43f2-9d96-dafd576d3525
boot-dir-info:y
hardware-info:y
installed-pkgs:y
kernel-info:y
kit-info:y
profile-info:y
funtoo-report -l
Current configuration of /etc/funtoo-report.conf:

UUID: d9c85d92-b59d-43f2-9d96-dafd576d3525
boot-dir-info: y
hardware-info: y
installed-pkgs: y
kernel-info: y
kit-info: y
profile-info: y

Would it make sense to show the comment also when using -l|--list-config?

Other then that, very nice @ShadowM00n

ShadowM00n commented 6 years ago

I'm not sure it would, as that command serves as a test that everything is being parsed correctly as much as anything else, to my understanding, and it calls on user_config() directly, which skips comments. My thought is that if a user really needs to see the full thing, its location is documented and meta-information like that is probably best left within the file proper.

tejr commented 6 years ago

I agree with @ShadowM00n -- the option isn't much use if you get the same result by cat /etc/funtoo-report.conf. Its primary use is showing what the module has parsed from the config.

palica commented 6 years ago

ok, fine.

looks good IMHO and can be merged to develop.