Date: Wed, 24 Jun 2020 10:17:58 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 247519] Success status on error in Makefile.xtra may cause loss of valuable data Message-ID: <bug-247519-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D247519 Bug ID: 247519 Summary: Success status on error in Makefile.xtra may cause loss of valuable data Product: Base System Version: Unspecified Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: misc Assignee: bugs@FreeBSD.org Reporter: se@FreeBSD.org Created attachment 215904 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D215904&action= =3Dedit Make error case return error exit status When the condition for e.g. "ERROR: 'buildworld' is not a valid target for = ..." is hit, make exits with a status of 0 indicating success. This is a problem if "etcupdate" is used in such a situation, leading to an empty current directory and deletion of all rc files from /etc. To repeat: # cd /usr/src # env WITH_DIRDEPS_BUILD=3Dyes make buildworld ERROR: 'buildworld' is not a valid target for amd64. You can see the targets which are valid for a given machine by running 'env MACHINE=3D<machine> make show-valid-targets' For other information, read:=20 # echo $? 0 (Besides WITH_DIRDEPS_BUILD=3Dyes being suggested in the context of WITH_META_MODE=3Dyes and leading to no targets being accepted except for the destroy targets, the above error text stops after "read:" without giving any indication what to read ...) # env MACHINE=3Damd64 make show-valid-targets Other targets: destroy destroy-arch destroy-host destroy-stage The attached diff might not be the best solution, but it does at least prev= ent the removal of the rc files if etcupdate is invoked in such a situation. --=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-247519-227>