* [PATCH] toolchain-scripts.bbclass: unset command_not_found_handle @ 2015-11-30 8:50 Fang Jia 2015-12-01 3:48 ` Christopher Larson 0 siblings, 1 reply; 4+ messages in thread From: Fang Jia @ 2015-11-30 8:50 UTC (permalink / raw) To: openembedded-core On Ubuntu-system, When sourcing the env.sh from an exported sdk, and running a bogus linux command (for example "asd"), a core dump of python is usually generated. Unset the command_not_found_handle to fix it. Signed-off-by: Fang Jia <fang.jia@windriver.com> --- meta/classes/toolchain-scripts.bbclass | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass index d0b2b91..ab4feb0 100644 --- a/meta/classes/toolchain-scripts.bbclass +++ b/meta/classes/toolchain-scripts.bbclass @@ -32,6 +32,7 @@ toolchain_create_sdk_env_script () { echo 'export OECORE_TARGET_SYSROOT="$SDKTARGETSYSROOT"' >> $script echo "export OECORE_ACLOCAL_OPTS=\"-I $sdkpathnative/usr/share/aclocal\"" >> $script echo "export PYTHONHOME=$sdkpathnative$prefix" >> $script + echo 'unset command_not_found_handle' >> $script toolchain_shared_env_script } -- 1.9.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] toolchain-scripts.bbclass: unset command_not_found_handle 2015-11-30 8:50 [PATCH] toolchain-scripts.bbclass: unset command_not_found_handle Fang Jia @ 2015-12-01 3:48 ` Christopher Larson 2015-12-01 4:04 ` Robert Yang 0 siblings, 1 reply; 4+ messages in thread From: Christopher Larson @ 2015-12-01 3:48 UTC (permalink / raw) To: Fang Jia; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 694 bytes --] On Mon, Nov 30, 2015 at 3:50 AM, Fang Jia <fang.jia@windriver.com> wrote: > On Ubuntu-system, When sourcing the env.sh from an exported sdk, and > running a bogus linux command (for example "asd"), a core dump of > python is usually generated. > > Unset the command_not_found_handle to fix it. > > Signed-off-by: Fang Jia <fang.jia@windriver.com> > Will this syntax be valid for non-bash environments? What about dash and zsh? You have to be careful to use portable constructs in a script which is sourced like this. -- Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics [-- Attachment #2: Type: text/html, Size: 1154 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] toolchain-scripts.bbclass: unset command_not_found_handle 2015-12-01 3:48 ` Christopher Larson @ 2015-12-01 4:04 ` Robert Yang 2015-12-01 4:08 ` Christopher Larson 0 siblings, 1 reply; 4+ messages in thread From: Robert Yang @ 2015-12-01 4:04 UTC (permalink / raw) To: Christopher Larson, Fang Jia Cc: Patches and discussions about the oe-core layer On 12/01/2015 11:48 AM, Christopher Larson wrote: > On Mon, Nov 30, 2015 at 3:50 AM, Fang Jia <fang.jia@windriver.com > <mailto:fang.jia@windriver.com>> wrote: > > On Ubuntu-system, When sourcing the env.sh from an exported sdk, and > running a bogus linux command (for example "asd"), a core dump of > python is usually generated. > > Unset the command_not_found_handle to fix it. > > Signed-off-by: Fang Jia <fang.jia@windriver.com <mailto:fang.jia@windriver.com>> > > > Will this syntax be valid for non-bash environments? What about dash and zsh? unset is part of posix shell, I think it's fine to use it here. // Robert > You have to be careful to use portable constructs in a script which is sourced > like this. > -- > Christopher Larson > clarson at kergoth dot com > Founder - BitBake, OpenEmbedded, OpenZaurus > Maintainer - Tslib > Senior Software Engineer, Mentor Graphics > > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] toolchain-scripts.bbclass: unset command_not_found_handle 2015-12-01 4:04 ` Robert Yang @ 2015-12-01 4:08 ` Christopher Larson 0 siblings, 0 replies; 4+ messages in thread From: Christopher Larson @ 2015-12-01 4:08 UTC (permalink / raw) To: Robert Yang; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 1043 bytes --] On Mon, Nov 30, 2015 at 11:04 PM, Robert Yang <liezhi.yang@windriver.com> wrote: > On 12/01/2015 11:48 AM, Christopher Larson wrote: > >> On Mon, Nov 30, 2015 at 3:50 AM, Fang Jia <fang.jia@windriver.com >> <mailto:fang.jia@windriver.com>> wrote: >> >> On Ubuntu-system, When sourcing the env.sh from an exported sdk, and >> running a bogus linux command (for example "asd"), a core dump of >> python is usually generated. >> >> Unset the command_not_found_handle to fix it. >> >> Signed-off-by: Fang Jia <fang.jia@windriver.com <mailto: >> fang.jia@windriver.com>> >> >> >> Will this syntax be valid for non-bash environments? What about dash and >> zsh? >> > > unset is part of posix shell, I think it's fine to use it here. Ah, good point, for some reason I read it as unsetopt, but yes, clearly unset is portable, ignore me. :) -- Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics [-- Attachment #2: Type: text/html, Size: 1882 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-12-01 4:08 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-11-30 8:50 [PATCH] toolchain-scripts.bbclass: unset command_not_found_handle Fang Jia 2015-12-01 3:48 ` Christopher Larson 2015-12-01 4:04 ` Robert Yang 2015-12-01 4:08 ` Christopher Larson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox