Bug 269242 - ports-mgmt/portmaster --clean-distfiles fails deleting a file whose name contains a space
Summary: ports-mgmt/portmaster --clean-distfiles fails deleting a file whose name cont...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Stefan Eßer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-30 10:47 UTC by fmysh
Modified: 2023-01-30 10:47 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (se)


Attachments
a patch to preserve a space in a filename (847 bytes, patch)
2023-01-30 10:47 UTC, fmysh
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fmysh 2023-01-30 10:47:43 UTC
Created attachment 239802 [details]
a patch to preserve a space in a filename

portmaster --clean-distfiles fails deleting a file whose name contains a space.

(exapmple)
link: /usr/ports/distfiles/go/finance_cointop/pkg/mod/github.com/lucasb-eyer/go-colorful@v1.0.3/doc/LinearRGB: No such file or directory
unlink: Approximations.ipynb: No such file or directory
unlink: /usr/ports/distfiles/go/finance_cointop/pkg/mod/github.com/russross/blackfriday/v2@v2.0.1/testdata/Amps: No such file or directory
unlink: angle: No such file or directory
unlink: encoding.html: No such file or directory

The first example is actually "LinearRGB Approximations.ipynb".
This is caused by a for statement which does not preserve a filename but 
separates it to words by a space.

for df in `find $DISTDIR -type f | sort`; do
  (delete $df here)
done