summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-25 15:40:34 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-31 12:02:24 +0100
commite6566322bd2856e14fbabd78a6307f6575ba3d8c (patch)
tree027ed4b509ac7ba0a4a7f7b58ea9747455d78815
parente300aa048531a5a11c4c87848551e5541b5b3022 (diff)
downloadpoky-e6566322bd2856e14fbabd78a6307f6575ba3d8c.tar.gz
meta/classes: Fix whitespace mismatch and broken functions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/classes/base.bbclass10
-rw-r--r--meta/classes/package_deb.bbclass18
-rw-r--r--meta/classes/package_ipk.bbclass3
-rw-r--r--meta/classes/package_rpm.bbclass8
4 files changed, 19 insertions, 20 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 6824f8e512..d2d5da04cf 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -120,12 +120,12 @@ SCENEFUNCS += "base_scenefunction"
120python base_scenefunction () { 120python base_scenefunction () {
121 stamp = bb.data.getVar('STAMP', d, 1) + ".needclean" 121 stamp = bb.data.getVar('STAMP', d, 1) + ".needclean"
122 if os.path.exists(stamp): 122 if os.path.exists(stamp):
123 bb.build.exec_func("do_clean", d) 123 bb.build.exec_func("do_clean", d)
124} 124}
125 125
126python base_do_setscene () { 126python base_do_setscene () {
127 for f in (bb.data.getVar('SCENEFUNCS', d, 1) or '').split(): 127 for f in (bb.data.getVar('SCENEFUNCS', d, 1) or '').split():
128 bb.build.exec_func(f, d) 128 bb.build.exec_func(f, d)
129 if not os.path.exists(bb.data.getVar('STAMP', d, 1) + ".do_setscene"): 129 if not os.path.exists(bb.data.getVar('STAMP', d, 1) + ".do_setscene"):
130 bb.build.make_stamp("do_setscene", d) 130 bb.build.make_stamp("do_setscene", d)
131} 131}
@@ -299,8 +299,8 @@ python base_do_unpack() {
299 local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata) 299 local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata)
300 except bb.MalformedUrl, e: 300 except bb.MalformedUrl, e:
301 raise FuncFailed('Unable to generate local path for malformed uri: %s' % e) 301 raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
302 if local is None: 302 if local is None:
303 continue 303 continue
304 local = os.path.realpath(local) 304 local = os.path.realpath(local)
305 ret = oe_unpack_file(local, localdata, url) 305 ret = oe_unpack_file(local, localdata, url)
306 if not ret: 306 if not ret:
diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index 478f2ed1ab..1bb2ebd766 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -160,8 +160,8 @@ python do_package_deb () {
160 fields.append(["OE: %s\n", ['PN']]) 160 fields.append(["OE: %s\n", ['PN']])
161 fields.append(["Homepage: %s\n", ['HOMEPAGE']]) 161 fields.append(["Homepage: %s\n", ['HOMEPAGE']])
162 162
163# Package, Version, Maintainer, Description - mandatory 163 # Package, Version, Maintainer, Description - mandatory
164# Section, Priority, Essential, Architecture, Source, Depends, Pre-Depends, Recommends, Suggests, Conflicts, Replaces, Provides - Optional 164 # Section, Priority, Essential, Architecture, Source, Depends, Pre-Depends, Recommends, Suggests, Conflicts, Replaces, Provides - Optional
165 165
166 166
167 def pullData(l, d): 167 def pullData(l, d):
@@ -170,7 +170,7 @@ python do_package_deb () {
170 data = bb.data.getVar(i, d, True) 170 data = bb.data.getVar(i, d, True)
171 if data is None: 171 if data is None:
172 raise KeyError(f) 172 raise KeyError(f)
173 if i == 'DPKG_ARCH' and bb.data.getVar('PACKAGE_ARCH', d, True) == 'all': 173 if i == 'DPKG_ARCH' and bb.data.getVar('PACKAGE_ARCH', d, True) == 'all':
174 data = 'all' 174 data = 'all'
175 l2.append(data) 175 l2.append(data)
176 return l2 176 return l2
@@ -191,13 +191,13 @@ python do_package_deb () {
191 bb.build.exec_func("mapping_rename_hook", localdata) 191 bb.build.exec_func("mapping_rename_hook", localdata)
192 192
193 rdepends = bb.utils.explode_dep_versions(bb.data.getVar("RDEPENDS", localdata, True) or "") 193 rdepends = bb.utils.explode_dep_versions(bb.data.getVar("RDEPENDS", localdata, True) or "")
194 for dep in rdepends: 194 for dep in rdepends:
195 if '*' in dep: 195 if '*' in dep:
196 del rdepends[dep] 196 del rdepends[dep]
197 rrecommends = bb.utils.explode_dep_versions(bb.data.getVar("RRECOMMENDS", localdata, True) or "") 197 rrecommends = bb.utils.explode_dep_versions(bb.data.getVar("RRECOMMENDS", localdata, True) or "")
198 for dep in rrecommends: 198 for dep in rrecommends:
199 if '*' in dep: 199 if '*' in dep:
200 del rrecommends[dep] 200 del rrecommends[dep]
201 rsuggests = bb.utils.explode_dep_versions(bb.data.getVar("RSUGGESTS", localdata, True) or "") 201 rsuggests = bb.utils.explode_dep_versions(bb.data.getVar("RSUGGESTS", localdata, True) or "")
202 rprovides = bb.utils.explode_dep_versions(bb.data.getVar("RPROVIDES", localdata, True) or "") 202 rprovides = bb.utils.explode_dep_versions(bb.data.getVar("RPROVIDES", localdata, True) or "")
203 rreplaces = bb.utils.explode_dep_versions(bb.data.getVar("RREPLACES", localdata, True) or "") 203 rreplaces = bb.utils.explode_dep_versions(bb.data.getVar("RREPLACES", localdata, True) or "")
diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
index e048b41739..014e4094be 100644
--- a/meta/classes/package_ipk.bbclass
+++ b/meta/classes/package_ipk.bbclass
@@ -48,8 +48,7 @@ python package_ipk_install () {
48 f.close() 48 f.close()
49 49
50 50
51 if (not os.access(os.path.join(ipkdir,"Packages"), os.R_OK) or 51 if not os.access(os.path.join(ipkdir,"Packages"), os.R_OK) or not os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"),os.R_OK):
52 not os.access(os.path.join(tmpdir, "stamps", "IPK_PACKAGE_INDEX_CLEAN"),os.R_OK):
53 ret = os.system('opkg-make-index -p %s %s ' % (os.path.join(ipkdir, "Packages"), ipkdir)) 52 ret = os.system('opkg-make-index -p %s %s ' % (os.path.join(ipkdir, "Packages"), ipkdir))
54 if (ret != 0 ): 53 if (ret != 0 ):
55 raise bb.build.FuncFailed 54 raise bb.build.FuncFailed
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 311c0a8883..ad5c6a13ad 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -462,12 +462,12 @@ python do_package_rpm () {
462 targetsys = bb.data.getVar('TARGET_SYS', d, True) 462 targetsys = bb.data.getVar('TARGET_SYS', d, True)
463 pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d) 463 pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
464 pkgarch = bb.data.expand('${PACKAGE_ARCH}', d) 464 pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
465 bb.mkdirhier(pkgwritedir) 465 bb.mkdirhier(pkgwritedir)
466 os.chmod(pkgwritedir, 0755) 466 os.chmod(pkgwritedir, 0755)
467 467
468 cmd = rpmbuild 468 cmd = rpmbuild
469 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd 469 cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
470 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'" 470 cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
471 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'" 471 cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
472 cmd = cmd + " -bb " + outspecfile 472 cmd = cmd + " -bb " + outspecfile
473 473