]> www.infradead.org Git - users/borneoa/openocd-next.git/commit
startup.tcl: extend the file search in vendor folders
authorAntonio Borneo <borneo.antonio@gmail.com>
Wed, 21 May 2025 13:19:28 +0000 (15:19 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 7 Jun 2025 08:49:20 +0000 (08:49 +0000)
commitb06212b5a2fc5b9bff72327bc7d5a7ec1c7ef613
tree48dfe25613aff2e610df8d2736ec79fff85a172f
parentb1c1dd1ec4b014d3b17be7598b7ecfebe97edcb5
startup.tcl: extend the file search in vendor folders

The TCL configuration files are going to be dispatched in vendor
specific folders.
Old user configuration files will fail to find the new files to
include, so a set of fallback files reporting the deprecation
should replace the renamed files.

To prevent such enormous proliferation of fallback files, extend
the search of files in the vendor folders too.
For non-trivial renames, a dedicated table is added in the file
tcl/file_renaming.cfg to track old --> new file names.
The deprecated message is then part of the extended search.

E.g.:
old file names:
- path/to/a/certain/vendor_config_file
- path/to/a/certain/vendor-config_file
trigger search of:
- path/to/a/certain/vendor/config_file

and
- path/to/a/certain/config_file
trigger search of:
- path/to/a/certain/${vendor}/config_file
among a possible vendors list.

This is a temporarily feature that should be removed as soon as
possible to prevent clashing on files with the same name.
The names in tcl/file_renaming.cfg are for demonstration purpose
only and should be dropped when the first real entries are added.

Change-Id: If4793fef27dc570d5df4ff4d77a5e36004f394f6
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: https://review.openocd.org/c/openocd/+/8929
Tested-by: jenkins
src/helper/startup.tcl
tcl/file_renaming.cfg [new file with mode: 0644]