From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hetzner.pbcl.net (mail.pbcl.net [88.198.119.4]) by mail.openembedded.org (Postfix) with ESMTP id AB263731BD for ; Wed, 10 Feb 2016 18:54:29 +0000 (UTC) Received: from blundell.swaffham-prior.co.uk ([91.216.112.25] helo=e130.local) by hetzner.pbcl.net with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1aTZuG-0001xa-Vk; Wed, 10 Feb 2016 19:54:29 +0100 Message-ID: <1455130461.7421.130.camel@pbcl.net> From: Phil Blundell To: Khem Raj Date: Wed, 10 Feb 2016 18:54:21 +0000 In-Reply-To: References: X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Cc: openembedded-core@lists.openembedded.org Subject: Re: [PATCH 1/9] distutils: Consider S != B case X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2016 18:54:29 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On Wed, 2016-02-10 at 17:43 +0000, Khem Raj wrote: > + cwd=$PWD;cd ${S} > + STAGING_INCDIR=${STAGING_INCDIR} \ > + STAGING_LIBDIR=${STAGING_LIBDIR} \ > + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ > + ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} ${S}/setup.py build --build-base=${B} ${DISTUTILS_BUILD_ARGS} || \ > + bbfatal "${PYTHON_PN} setup.py build execution failed." > + cd $cwd Why do you need to save and restore the cwd? If this is a shell task then the "cd" would be local to that shell invocation anyway, right? Also, given that you're invoking it by full pathname as "${S}/setup.py ..." anyway, do you even need ${S} to be the cwd in the first place? That seems a bit redundant. p.