[Bug 269242] ports-mgmt/portmaster --clean-distfiles fails deleting a file whose name contains a space

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 30 Jan 2023 10:47:43 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=269242

            Bug ID: 269242
           Summary: ports-mgmt/portmaster --clean-distfiles fails deleting
                    a file whose name contains a space
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: se@FreeBSD.org
          Reporter: fmysh@iijmio-mail.jp
             Flags: maintainer-feedback?(se@FreeBSD.org)
          Assignee: se@FreeBSD.org

Created attachment 239802
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=239802&action=edit
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

-- 
You are receiving this mail because:
You are the assignee for the bug.