freebsd / portmaster

FreeBSD port management script without external databases or languages
77 stars 40 forks source link

--clean-distfiles with paths containing square brackets #76

Closed drossberg closed 1 year ago

drossberg commented 1 year ago

Recently, there are file paths in distfiles which contain square brackets. They cause the following kind of messages when I try to clean them up:

grep: brackets ([ ]) not balanced
       Deleting go/www_gohugo/pkg/mod/github.com/!azure/go-amqp@v0.13.12/fuzz/marshal/corpus/[]interface

unlink: /usr/ports/distfiles/go/www_gohugo/pkg/mod/github.com/!azure/go-amqp@v0.13.12/fuzz/marshal/corpus/[]interface: No such file or directory
       Deleting {}.bin

unlink: {}.bin: No such file or directory

The original file path in the example above is /usr/ports/distfiles/go/www_gohugo/pkg/mod/github.com/!azure/go-amqp@v0.13.12/fuzz/marshal/corpus/[]interface {}.bin.

The responsible code section seems to be https://github.com/freebsd/portmaster/blob/f273c9160333911ba1c7be3611a6cd34aefd3816/portmaster#L1310

The "unlink" error was reported in #75.