On Sun, Jan 02, 2022 at 04:00:56PM +0100, Xiretza wrote:
On 02/01/2022 15.48, Allan McRae wrote:
Also, I get a very different list of files with and without -b/-d. Without using them I get a lot of system files. With, I just get the package source files.
Right, without -b/-d, it just lists all source files. With just -b, it prints all source files rooted in the specified directory, but strips the prefix from the output. With both -b and -d, it replaces any base-dir prefixes with dest-dir (modifying the binary), then prints all paths rooted in the dest-dir (again, stripping the dest-dir prefix in the output), regardless if they've always been rooted in dest-dir (due to -fdebug-prefix-map) or if they were just transformed from base-dir.
I hope that made sense.
We can have one function `rewrite_source_list` and one `source_list`? `rewrite_source_list` would do the explicit rewrite, if needed. `source_list` just uses --base-dir and returns the files. -- Morten Linderud PGP: 9C02FF419FECBE16