[PATCH 1/1] strip: Use debugedit instead of AWK to parse source files

Morten Linderud foxboron at archlinux.org
Sun Jan 2 15:18:15 UTC 2022


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/pacman-dev/attachments/20220102/59431d58/attachment.sig>


More information about the pacman-dev mailing list