All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Arno Baumfalk <a.baumfalk@astro-kom.de>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [bitbake-devel] [PATCH] fetch2/npm: evaluate PATH before patching HOME
Date: Tue, 23 May 2023 23:04:33 +0200	[thread overview]
Message-ID: <202305232104338816c33b@mail.local> (raw)
In-Reply-To: <94c18370-5149-8d5a-32ad-8c72a76e38e0@astro-kom.de>

Hello,

On 16/05/2023 18:07:08+0200, Arno Baumfalk wrote:
> From acafbccb32510bca036894287afbe83765bc2d30 Mon Sep 17 00:00:00 2001
> From: Arno Baumfalk <a.baumfalk@astro-kom.de>
> Date: Tue, 16 May 2023 17:18:26 +0200
> Subject: [PATCH] fetch2/npm: evaluate PATH before patching HOME
> 
> When the user configures the TMPDIR variable in a way that it contains $HOME
> (in local.conf), the DataSmart (d) object's PATH variable will also contain
> $HOME.
> 
> As the NpmEnvironment patches HOME with a temporary directory, further
> evaluation of PATH will become invalid an the build breaks with an error
> (npm not found).
> 
> As countermeasure PATH is evaluated *before* patching HOME.
> 
> Signed-off-by: Arno Baumfalk <a.baumfalk@astro-kom.de>
> ---
> �bitbake/lib/bb/fetch2/npm.py | 1 +
> �1 file changed, 1 insertion(+)
> 
> diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
> index 8a179a339a..e6d0598f5d 100644
> --- a/bitbake/lib/bb/fetch2/npm.py
> +++ b/bitbake/lib/bb/fetch2/npm.py
> @@ -103,6 +103,7 @@ class NpmEnvironment(object):
> �������� """Run npm command in a controlled environment"""
> �������� with tempfile.TemporaryDirectory() as tmpdir:
> ������������ d = bb.data.createCopy(self.d)
> +����������� d.setVar("PATH", d.getVar("PATH"))� # PATH might contain $HOME
> - evaluate it before patching

It seems your mailer is mangling your patch and it does not apply.

> ������������ d.setVar("HOME", tmpdir)
> 
> ������������ if not workdir:
> -- 
> 2.26.2
> -- 
> 
> Mit freundlichen Gr��en
> 
> *ASTRO Strobel **
> *Kommunikationssysteme GmbH
> 
> Dr. Arno Baumfalk
> Entwicklung
> 
> 	
> 
> 
> Telefon: 	+49�(0) 2204 405 228
> Fax: 	+49�(0) 2204 405 220
> eMail 	a.baumfalk@astro-kom.de <3D"mailto:a.ba=>
> Internet: 	www.astro-kom.de <3D"http://www.=>
> 
> 
> Folgen Sie uns<https://www.facebook.com/astrostrobel/>
> 
> ASTRO Strobel Kommunikationssysteme GmbH
> Olefant 1-3 � 51427 Bergisch Gladbach
> Gesch�ftsf�hrer: Herbert Strobel
> Registergericht K�ln HRB 46271
> Steuer-Nr. 204/5710/0569 � USt.ID-Nr. DE 121980384
> 
> Die Informationen in dieser eMail zusammen mit allen Anlagen sind streng
> vertraulich. Sie sind ausschlie�lich f�r den Gebrauch des rechtm��igen
> Empf�ngers bestimmt. Jegliche Weitergabe ohne unsere ausdr�ckliche
> Genehmigung ist verboten und kann strafrechtlich verfolgt werden. Sollten
> Sie nicht der vorgesehene Empf�nger dieser E-Mail sein, informieren Sie�uns
> bitte unter 02204/405-0 oder leiten Sie die Mail an uns zur�ck
> _a.baumfalk@astro-kom.de_. L�schen Sie bitte die E-Mail von Ihrem System.
> Die ASTRO Strobel Kommunikationssysteme GmbH tr�gt weder die Verantwortung
> f�r die richtige und vollst�ndige �bertragung dieser E-Mail noch f�r die
> Verz�gerungen in der �bertragung.
> 
> The information and attachments in this e-mail are strictly confidential.
> They are for the exclusive use of the legitimate recipient. Any transfer
> without our express approval is prohibited and can be prosecuted. If you are
> not the destined recipient of this e-mail, please inform us by phone number
> +49 2204 405 0 or send the e-mail back to a.baumfalk@astro-kom.de. Please
> delete this e-mail from your system. The ASTRO Strobel Kommunikationssysteme
> GmbH is neither responsible for the complete transmission of this e-mail nor
> for transmission delays.

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#14790): https://lists.openembedded.org/g/bitbake-devel/message/14790
> Mute This Topic: https://lists.openembedded.org/mt/98929768/3617179
> Group Owner: bitbake-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/bitbake-devel/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


      reply	other threads:[~2023-05-23 21:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 16:07 [PATCH] fetch2/npm: evaluate PATH before patching HOME Dr. Arno Baumfalk
2023-05-23 21:04 ` Alexandre Belloni [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202305232104338816c33b@mail.local \
    --to=alexandre.belloni@bootlin.com \
    --cc=a.baumfalk@astro-kom.de \
    --cc=bitbake-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.