All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
To: openembedded-core@lists.openembedded.org
Cc: paul.eggleton@linux.intel.com, rennes@savoirfairelinux.com,
	bunk@stusta.de
Subject: [RFC][PATCH v2 4/7] devtool/standard.py: update the append file for the npm recipes
Date: Fri, 25 Oct 2019 10:39:49 +0200	[thread overview]
Message-ID: <20191025083952.14591-5-jean-marie.lemetayer@savoirfairelinux.com> (raw)
In-Reply-To: <20191025083952.14591-1-jean-marie.lemetayer@savoirfairelinux.com>

When creating a recipe using devtool, a workspace is created to store
the new recipe, the recipe source and some append files. These append
files are used by devtool to build the recipe using externalsrc (to use
the source which are in the workspace). They can also have some
additional actions according to the class of the recipe.

This commit updates the append file for the npm recipes. The
devtool / externalsrc files are removed in the npm build directory
instead of the install directory.

Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
---
 scripts/lib/devtool/standard.py | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index 7068a02a01..2604b79be3 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -262,14 +262,11 @@ def add(args, config, basepath, workspace):
                 f.write('}\n')
 
             if bb.data.inherits_class('npm', rd):
-                f.write('do_install_append() {\n')
-                f.write('    # Remove files added to source dir by devtool/externalsrc\n')
-                f.write('    rm -f ${NPM_INSTALLDIR}/singletask.lock\n')
-                f.write('    rm -rf ${NPM_INSTALLDIR}/.git\n')
-                f.write('    rm -rf ${NPM_INSTALLDIR}/oe-local-files\n')
-                f.write('    for symlink in ${EXTERNALSRC_SYMLINKS} ; do\n')
-                f.write('        rm -f ${NPM_INSTALLDIR}/${symlink%%:*}\n')
-                f.write('    done\n')
+                f.write('do_compile_append() {\n')
+                f.write('    rm -rf ${B}/lib/node_modules/*/.git\n')
+                f.write('    rm -rf ${B}/lib/node_modules/@*/*/.git\n')
+                f.write('    rm -f ${B}/lib/node_modules/*/singletask.lock\n')
+                f.write('    rm -f ${B}/lib/node_modules/@*/*/singletask.lock\n')
                 f.write('}\n')
 
         # Check if the new layer provides recipes whose priorities have been
-- 
2.20.1



  parent reply	other threads:[~2019-10-25  8:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25  8:39 [RFC][PATCH v2 0/7] NPM refactoring Jean-Marie LEMETAYER
2019-10-25  8:39 ` [RFC][PATCH v2 1/7] npm.bbclass: refactor the npm class Jean-Marie LEMETAYER
2019-10-25  8:39 ` [RFC][PATCH v2 2/7] devtool: update command line options for npm Jean-Marie LEMETAYER
2019-10-25  8:39 ` [RFC][PATCH v2 3/7] recipetool/create_npm.py: refactor the npm recipe creation handler Jean-Marie LEMETAYER
2019-10-25  8:39 ` Jean-Marie LEMETAYER [this message]
2019-10-25  8:39 ` [RFC][PATCH v2 5/7] recipetool/create.py: replace 'latest' keyword for npm Jean-Marie LEMETAYER
2019-10-25  8:39 ` [RFC][PATCH v2 6/7] recipetool/create.py: remove the 'noverify' url parameter Jean-Marie LEMETAYER
2019-10-25  8:39 ` [RFC][PATCH v2 7/7] oeqa/selftest/recipetool: add npm recipe creation test Jean-Marie LEMETAYER

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=20191025083952.14591-5-jean-marie.lemetayer@savoirfairelinux.com \
    --to=jean-marie.lemetayer@savoirfairelinux.com \
    --cc=bunk@stusta.de \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=paul.eggleton@linux.intel.com \
    --cc=rennes@savoirfairelinux.com \
    /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.