meta/classes: Fix whitespace mismatch and broken functions

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
Richard Purdie 2010-08-25 15:40:34 +01:00
parent e300aa0485
commit e6566322bd
4 changed files with 19 additions and 20 deletions

View File

@ -120,12 +120,12 @@ SCENEFUNCS += "base_scenefunction"
python base_scenefunction () {
stamp = bb.data.getVar('STAMP', d, 1) + ".needclean"
if os.path.exists(stamp):
bb.build.exec_func("do_clean", d)
bb.build.exec_func("do_clean", d)
}
python base_do_setscene () {
for f in (bb.data.getVar('SCENEFUNCS', d, 1) or '').split():
bb.build.exec_func(f, d)
for f in (bb.data.getVar('SCENEFUNCS', d, 1) or '').split():
bb.build.exec_func(f, d)
if not os.path.exists(bb.data.getVar('STAMP', d, 1) + ".do_setscene"):
bb.build.make_stamp("do_setscene", d)
}
@ -299,8 +299,8 @@ python base_do_unpack() {
local = bb.data.expand(bb.fetch.localpath(url, localdata), localdata)
except bb.MalformedUrl, e:
raise FuncFailed('Unable to generate local path for malformed uri: %s' % e)
if local is None:
continue
if local is None:
continue
local = os.path.realpath(local)
ret = oe_unpack_file(local, localdata, url)
if not ret:

View File

@ -160,8 +160,8 @@ python do_package_deb () {
fields.append(["OE: %s\n", ['PN']])
fields.append(["Homepage: %s\n", ['HOMEPAGE']])
# Package, Version, Maintainer, Description - mandatory
# Section, Priority, Essential, Architecture, Source, Depends, Pre-Depends, Recommends, Suggests, Conflicts, Replaces, Provides - Optional
# Package, Version, Maintainer, Description - mandatory
# Section, Priority, Essential, Architecture, Source, Depends, Pre-Depends, Recommends, Suggests, Conflicts, Replaces, Provides - Optional
def pullData(l, d):
@ -170,7 +170,7 @@ python do_package_deb () {
data = bb.data.getVar(i, d, True)
if data is None:
raise KeyError(f)
if i == 'DPKG_ARCH' and bb.data.getVar('PACKAGE_ARCH', d, True) == 'all':
if i == 'DPKG_ARCH' and bb.data.getVar('PACKAGE_ARCH', d, True) == 'all':
data = 'all'
l2.append(data)
return l2
@ -191,13 +191,13 @@ python do_package_deb () {
bb.build.exec_func("mapping_rename_hook", localdata)
rdepends = bb.utils.explode_dep_versions(bb.data.getVar("RDEPENDS", localdata, True) or "")
for dep in rdepends:
if '*' in dep:
del rdepends[dep]
for dep in rdepends:
if '*' in dep:
del rdepends[dep]
rrecommends = bb.utils.explode_dep_versions(bb.data.getVar("RRECOMMENDS", localdata, True) or "")
for dep in rrecommends:
if '*' in dep:
del rrecommends[dep]
for dep in rrecommends:
if '*' in dep:
del rrecommends[dep]
rsuggests = bb.utils.explode_dep_versions(bb.data.getVar("RSUGGESTS", localdata, True) or "")
rprovides = bb.utils.explode_dep_versions(bb.data.getVar("RPROVIDES", localdata, True) or "")
rreplaces = bb.utils.explode_dep_versions(bb.data.getVar("RREPLACES", localdata, True) or "")

View File

@ -48,8 +48,7 @@ python package_ipk_install () {
f.close()
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):
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):
ret = os.system('opkg-make-index -p %s %s ' % (os.path.join(ipkdir, "Packages"), ipkdir))
if (ret != 0 ):
raise bb.build.FuncFailed

View File

@ -462,12 +462,12 @@ python do_package_rpm () {
targetsys = bb.data.getVar('TARGET_SYS', d, True)
pkgwritedir = bb.data.expand('${PKGWRITEDIRRPM}/${PACKAGE_ARCH}', d)
pkgarch = bb.data.expand('${PACKAGE_ARCH}', d)
bb.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0755)
bb.mkdirhier(pkgwritedir)
os.chmod(pkgwritedir, 0755)
cmd = rpmbuild
cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
cmd = cmd + " --nodeps --short-circuit --target " + pkgarch + " --buildroot " + pkgd
cmd = cmd + " --define '_topdir " + workdir + "' --define '_rpmdir " + pkgwritedir + "'"
cmd = cmd + " --define '_build_name_fmt %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm'"
cmd = cmd + " -bb " + outspecfile