Date: Wed, 28 Oct 2020 17:43:07 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 250698] Mk/Scripts/do-patch.sh: not failing on missing patch file Message-ID: <bug-250698-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250698 Bug ID: 250698 Summary: Mk/Scripts/do-patch.sh: not failing on missing patch file Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: ports-bugs@FreeBSD.org Reporter: jcfyecrayz@liamekaens.com Created attachment 219173 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D219173&action= =3Dedit [patch] fix undetected cat_file failure If a patch file does not exist, do-patch.sh does not trigger a build failur= e.=20 It appears this was broken in r533459 (2020-04-30). See also bug 250530 comment 10. The attached patch checks the return value of cat_file first, then the pipe= line to do_patch(). This isn't great efficiency-wise, because of the extra cat,= but it catches more potential failures than just [ ! -r "$file" || ! ! -f "$fil= e" ] or similar tests - for instance, if the patch is compressed and the decompression fails for some reason. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250698-7788>