summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2016-03-07 17:27:35 +1300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-07 17:23:02 +0000
commitd9999279d97daa0c39f2d04a22c41324dd3aff63 (patch)
tree9fa7d90a261c273be1338acbfd0209624ff9e1e9 /bitbake/lib/bb/fetch2
parent26ee4ddc653d97f5c436c66a8504493209e3c65e (diff)
downloadpoky-d9999279d97daa0c39f2d04a22c41324dd3aff63.tar.gz
bitbake: fetch2/npm: fix indentation
No code changes, just fix to use four spaces. (Bitbake rev: 66a9ee7d54ca9c25209f72da079f260ccdcc872a) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/npm.py44
1 files changed, 22 insertions, 22 deletions
diff --git a/bitbake/lib/bb/fetch2/npm.py b/bitbake/lib/bb/fetch2/npm.py
index f99b308340..59312f4f01 100644
--- a/bitbake/lib/bb/fetch2/npm.py
+++ b/bitbake/lib/bb/fetch2/npm.py
@@ -57,10 +57,10 @@ class Npm(FetchMethod):
57 logger.debug(1, "NpmFetch: %s", msg) 57 logger.debug(1, "NpmFetch: %s", msg)
58 58
59 def clean(self, ud, d): 59 def clean(self, ud, d):
60 logger.debug(2, "Calling cleanup %s" % ud.pkgname) 60 logger.debug(2, "Calling cleanup %s" % ud.pkgname)
61 bb.utils.remove(ud.localpath, False) 61 bb.utils.remove(ud.localpath, False)
62 bb.utils.remove(ud.pkgdatadir, True) 62 bb.utils.remove(ud.pkgdatadir, True)
63 bb.utils.remove(ud.fullmirror, False) 63 bb.utils.remove(ud.fullmirror, False)
64 64
65 def urldata_init(self, ud, d): 65 def urldata_init(self, ud, d):
66 """ 66 """
@@ -105,32 +105,32 @@ class Npm(FetchMethod):
105 runfetchcmd(command, d, quiet) 105 runfetchcmd(command, d, quiet)
106 106
107 def _unpackdep(self, ud, pkg, data, destdir, dldir, d): 107 def _unpackdep(self, ud, pkg, data, destdir, dldir, d):
108 file = data[pkg]['tgz'] 108 file = data[pkg]['tgz']
109 logger.debug(2, "file to extract is %s" % file) 109 logger.debug(2, "file to extract is %s" % file)
110 if file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'): 110 if file.endswith('.tgz') or file.endswith('.tar.gz') or file.endswith('.tar.Z'):
111 cmd = 'tar xz --strip 1 --no-same-owner -f %s/%s' % (dldir, file) 111 cmd = 'tar xz --strip 1 --no-same-owner -f %s/%s' % (dldir, file)
112 else: 112 else:
113 bb.fatal("NPM package %s downloaded not a tarball!" % file) 113 bb.fatal("NPM package %s downloaded not a tarball!" % file)
114 114
115 # Change to subdir before executing command 115 # Change to subdir before executing command
116 save_cwd = os.getcwd() 116 save_cwd = os.getcwd()
117 if not os.path.exists(destdir): 117 if not os.path.exists(destdir):
118 os.makedirs(destdir) 118 os.makedirs(destdir)
119 os.chdir(destdir) 119 os.chdir(destdir)
120 path = d.getVar('PATH', True) 120 path = d.getVar('PATH', True)
121 if path: 121 if path:
122 cmd = "PATH=\"%s\" %s" % (path, cmd) 122 cmd = "PATH=\"%s\" %s" % (path, cmd)
123 bb.note("Unpacking %s to %s/" % (file, os.getcwd())) 123 bb.note("Unpacking %s to %s/" % (file, os.getcwd()))
124 ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True) 124 ret = subprocess.call(cmd, preexec_fn=subprocess_setup, shell=True)
125 os.chdir(save_cwd) 125 os.chdir(save_cwd)
126 126
127 if ret != 0: 127 if ret != 0:
128 raise UnpackError("Unpack command %s failed with return value %s" % (cmd, ret), ud.url) 128 raise UnpackError("Unpack command %s failed with return value %s" % (cmd, ret), ud.url)
129 129
130 if 'deps' not in data[pkg]: 130 if 'deps' not in data[pkg]:
131 return 131 return
132 for dep in data[pkg]['deps']: 132 for dep in data[pkg]['deps']:
133 self._unpackdep(ud, dep, data[pkg]['deps'], "%s/node_modules/%s" % (destdir, dep), dldir, d) 133 self._unpackdep(ud, dep, data[pkg]['deps'], "%s/node_modules/%s" % (destdir, dep), dldir, d)
134 134
135 135
136 def unpack(self, ud, destdir, d): 136 def unpack(self, ud, destdir, d):