[bitbake-devel] [PATCH 1/1] bitbake: Disable pseudo in runfetchcmd()

Richard Purdie richard.purdie at linuxfoundation.org
Sat Feb 22 11:24:05 UTC 2014


On Thu, 2014-02-20 at 15:55 +0100, Peter Kjellerstedt wrote:
> If a fetcher, e.g., git, is run when pseudo is active it will think it
> is running as root. If it in turn uses ssh (as git does), ssh too will
> think it is running as root. This will cause it to try to read root's
> ssh configuration from /root/.ssh which will fail. If ssh then needs to
> ask for credentials it will hang indefinitely as there is nowhere for it
> to ask the user for them (and even if there was it would not access the
> correct private keys).
> 
> The solution to the above is to temporarily disable pseudo while
> executing any fetcher commands. There should be no reason for them to be
> executed under pseudo anyway so this should not be a problem.
> 
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
> ---
>  bitbake/lib/bb/fetch2/__init__.py | 3 +++
>  1 file changed, 3 insertions(+)

I'm more than a little concerned about why pseudo is active during
do_patch. It shouldn't be. Are you doing anything different with pseudo
in your build?

Cheers,

Richard

> diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
> index de95074..1c3ee4f 100644
> --- a/bitbake/lib/bb/fetch2/__init__.py
> +++ b/bitbake/lib/bb/fetch2/__init__.py
> @@ -680,6 +680,9 @@ def runfetchcmd(cmd, d, quiet = False, cleanup = []):
>          if val:
>              cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
>  
> +    # Disable pseudo as it may affect ssh, potentially causing it to hang.
> +    cmd = 'export PSEUDO_DISABLED=1; ' + cmd
> +
>      logger.debug(1, "Running %s", cmd)
>  
>      success = False





More information about the bitbake-devel mailing list