pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkg/58961: 'make print-PLIST' emits 'No such file or directory' when directories contain spaces
The following reply was made to PR pkg/58961; it has been noted by GNATS.
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: iris000%duck.com@localhost
Cc: gnats-bugs%NetBSD.org@localhost, pkgsrc-bugs%NetBSD.org@localhost
Subject: Re: pkg/58961: 'make print-PLIST' emits 'No such file or directory' when directories contain spaces
Date: Sun, 5 Jan 2025 13:17:50 +0000
This is a multi-part message in MIME format.
--=_kfI//mdIC0kx2NGNjppVUyLgYbxCgVBW
Correction -- updated patch attached, to work around the quirk of
shells where x=$(...) strips the trailing newlines of the command
output.
--=_kfI//mdIC0kx2NGNjppVUyLgYbxCgVBW
Content-Type: text/plain; charset="ISO-8859-1"; name="pr58961-printplistifs-v2"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="pr58961-printplistifs-v2.patch"
diff --git a/mk/plist/print-plist.mk b/mk/plist/print-plist.mk
index a41caa2ededa..b758d7cfe11b 100644
--- a/mk/plist/print-plist.mk
+++ b/mk/plist/print-plist.mk
@@ -138,6 +138,7 @@ print-PLIST:
/^man\// { sub("\\.gz$$", ""); } \
{ print $$0; }'
${RUN}\
+ saveIFS=3D$$IFS; IFS=3D$$(printf '\n.'); IFS=3D$${IFS%.}; \
for i in `${_PRINT_PLIST_DIRS_CMD} \
| ${AWK} ' \
${EARLY_PRINT_PLIST_AWK} \
@@ -154,8 +155,9 @@ print-PLIST:
/^${PKGINFODIR:S|/|\\/|g}$$/ { next; } \
{ print $$0; }'` ; \
do \
- if [ `${LS} -la ${DESTDIR}${PREFIX}/$$i | ${WC} -l` =3D 3 ]; then \
- ${ECHO} @pkgdir $$i | ${AWK} ' \
+ IFS=3D$$saveIFS; \
+ if [ `${LS} -la ${DESTDIR}${PREFIX}/"$$i" | ${WC} -l` =3D 3 ]; then \
+ ${ECHO} @pkgdir "$$i" | ${AWK} ' \
${PRINT_PLIST_AWK} \
{ print $$0; }' ; \
fi ; \
--=_kfI//mdIC0kx2NGNjppVUyLgYbxCgVBW--
Home |
Main Index |
Thread Index |
Old Index