smxi A small point release, various smaller items, ongoing updates to matc…
464cac2 Feb 8, 2023
A small point release, various smaller items, ongoing updates to matc…
…hing table

features, bug fixes, but nothing major.

--------------------------------------------------------------------------------
SPECIAL THANKS:

1. Thanks Umio-Yasuno in github issue #281 for actually being proactive and
finding some Intel/AMD gpu device id lists. I wish more issues would be like
that.

--------------------------------------------------------------------------------
KNOWN ISSUES:

1. DEBUG: --debug-arg and --debug-arg-use must use the full format:
--debug-arg="-GS", or else the command line eats the args, even if in quotes.
The error handlers will then complain about no data supplied, and it will exit.

--------------------------------------------------------------------------------
BUGS:

1. GRAPHICS: An accidental 'and' instead of 'or' test (see Code 1) led to
systems without gpu or dri graphics drivers not showing their xorg driver even
when present. This was due to a mistake, and also due to how Perl handles || and
&& in sequence, which made this bug not show up until I tested on a system with
xorg graphics driver, but without dri or gpu drivers. Virtually no modern
hardware or operating systems would trip this condition, but older hardware and
operating systems, which may not have gpu or dri drivers, might. And did, in my
case. This is by the way why I try to test on old hardware at least now and
then.

--------------------------------------------------------------------------------
FIXES:

1. CODE: A poorly done attempt at optimization would have broken case
insensitive pre-compiled regex with $pattern = qr/../ because you can't add
/$pattern/i to precompiled pattern, but qr/.../i support only added perl 5.014.
This should impact almost nobody, but it is/was a glitch. Basically qr/../ can
only be used when no /i type modifier is required if supporting Perl less than
5.014.

See inxi-perl/docs/optimization.txt section REGEX for more on this.

Note that Perl already compares the values in the variable each iteration via a
simple equality test, so the only real gain from using qr// is not having to do
that equality test each iteration of a loop.

2. OUTPUT: Fixed a few small inner key name failures to use '-' instead of ' '
to separate key terms:

3. REPOS: Called urpm urpmq, which is the query tool, not the actual type.

4. GRAPHICS: Fixed some gpu_id.pl matching rules. Thanks Umio-Yasuno in github
issue #281 for noticing that some of the matching rules were either wrong or not
loose enough.

--------------------------------------------------------------------------------
ENHANCEMENTS:

1a. OPTIONS: Long time oversight, no option to test or do one time change of key:
value separator string ':'. This goes along with existing config option
SEP2_CONSOLE. Added --separator/--sep {character}.

1b. OPTIONS: Added synonym for --output: --export, and for --output-file:
--export-file.

2a. GRAPHICS: New Intel gpu data source, from intel, finally. This let us add a
lot more gpu ids. Thanks Umio-Yasuno in github issue #281 for finding these.

2b. GRAPHICS: New AMD data source, from github. This let me fill in some more,
albeit not as accurately as previous sources, but added more so fine. Thanks
Umio-Yasuno in github issue #281 for finding these.

3. CONFIG: In a first, took a feature from acxi, --config, and imported it into
inxi! This shows active current configuration, by file.

4. CPU: updated, fine tuned amd cpu microarch ids.

5. DISKS: More disk vendors added. Not as many as usual, I think the high tech
sanctions against China may be slowing the rate of new Chinese SSD/USB vendors.
But still some new ones, as always. Not many new IDs for existing ones though,
that is noteworthy. A few new data sources to help pinpoint vendor names found
too, though those won't in general impact users, but can be used to determine if
a string is in fact a company name.

--------------------------------------------------------------------------------
CHANGES:

1. OUTPUT: Fix 2, -t 'started by:' key name changed to: started-by:
-G 'direct render:' changed to 'direct-render:'.

--------------------------------------------------------------------------------
DOCUMENTATION:

1a. MAN: there were a few <...> instead of [...] for required option arguments.
Fixed those.

1b. MAN: also added --debug-id [string] since that is in general useful info.

1c. MAN: Added qualifiers about when xwayland: and compositor: items appear for
default -Ga output.

1d. MAN: Typo in config path in man page, .conf/ should be .config/.

1e. MAN: for --output json/xml, added pointer to doc page on smxi.org, people
being unable to grasp the output is getting tiresome.

1f. MAN: Added synonym for --output, --export.

2a. SMXI.ORG DOCS: added --output json/xml documentation page:
https://smxi.org/docs/inxi-json-xml-output.htm - this is also linked to from the
github wiki page, though of course nobody is going to read it, as well as from
a few pages in smxi.org.

2b. Updated inxi-man,options,changelog.htm files.

3. CHANGELOG: Changed to use same format as acxi.changelog, leading topic id's
in upper case, makes it easier to scan read and organize.

4a. DOCS: docs/inxi-cpu.txt - cleaned up, re-arranged a bit, added cpuid data
explanation, and updated header on inxi-perl/data/cpu/microarch to better
explain the way amd does ext fam / ext model, which are not the same,
bizarrrely, very confusing.

4b. DOCS: New: docs/inxi-disks.txt. Split out from inxi-resources.txt, part of
the ongoing to documentation modularization, slowly splitting out sub topics
from inxi-data.txt and inxi-resources.txt. Note this is in general only done
when I'm working on that specific feature. But slowly, surely.

--------------------------------------------------------------------------------
CODE:

1. GRAPHICS: Test when no gpu drivers and no dri drivers but x drivers never
showed x driver. Was supposed to be all || for tests:

if (@$gpu_drivers || $graphics{'dri-drivers'} && @$x_drivers){

https://perldoc.perl.org/perlop. I believe this led to test 1 being false, test
2 being false, and since that left tests 2 and 3 needing to be true for the &&
logical and to be true. Since only one of the two was true, the last bit was
seen as false.

2. GRAPHICS: Connected with 1, noticed that for some weird reason, I'd decided
to assign the array ref for drivers like this:

@$x_drivers = (a, b, c);
when it was supposed to be:
$x_drivers = [a,b,c];

This did not cause any issues, since they mean the same thing, but it was silly
to write it that way.

3a. DEBUG: Added --debug-arg-use which allows testers to run a specific argument
combination that may be causing issues.

3b. DEBUG: Also added more validation, to make sure arg for --debug-arg /
--debug-arg-use start with - or -- followed by a letter.

4. START: Removed this code block from set_konvi_data. I had left this in place
for a release or two to make sure no need for it was found, but it will never be
used since it never worked in the first place.
	# my $config_cmd = '';
	# there's no current kde 5 konvi config tool that we're aware of. Correct if changes.
	# This part may never have worked, but I don't have legacy data to determine.
	# The idea was to get inxi.conf files from konvi data stores, but that was never right.
	# if (main::check_program('kde4-config')){
	#	$config_cmd = 'kde4-config --path data';
	# }
	# kde5-coinfig never existed, was replaced by $XDG_DATA_HOME in KDE
	# elsif (main::check_program('kde-config')){
	# 	$config_cmd = 'kde-config --path data';
	# }
	# elsif (main::check_program('qtpaths')){
	# 	$config_cmd = 'qtpaths --paths GenericDataLocation';
	# }
	# The section below is on request of Argonel from the Konversation developer team:
	# it sources config files like $HOME/.kde/share/apps/konversation/scripts/inxi.conf
	#  if ($config_cmd){
	#	  my @DaTa = main::grabber("$config_cmd 2>/dev/null",':');
	# 	Configs::set(\@DaTa) if @DaTa;
	#	 main::log_data('dump',"kde config \@DaTa",\@DaTa) if $b_log;
	# }

5. OPTIONS: in OptionsHandler::post_process(), reorganized the various run and
exit triggers, help, configs, recommends, version, etc. All on top now.
464cac2