summaryrefslogtreecommitdiffstats
path: root/meta/classes/mime.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-11 17:33:43 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-07-19 10:24:50 +0100
commitbfd279de3275abbfaf3e630383ec244131e0375f (patch)
tree0d1c90461a890d21444f5d2afb13c52b302427f1 /meta/classes/mime.bbclass
parent99203edda6f0b09d817454d656c100b7a8806b18 (diff)
downloadpoky-bfd279de3275abbfaf3e630383ec244131e0375f.tar.gz
Convert tab indentation in python functions into four-space
(From OE-Core rev: 604d46c686d06d62d5a07b9c7f4fa170f99307d8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/mime.bbclass')
-rw-r--r--meta/classes/mime.bbclass54
1 files changed, 27 insertions, 27 deletions
diff --git a/meta/classes/mime.bbclass b/meta/classes/mime.bbclass
index 6302747dc1..b669418286 100644
--- a/meta/classes/mime.bbclass
+++ b/meta/classes/mime.bbclass
@@ -29,32 +29,32 @@ fi
29} 29}
30 30
31python populate_packages_append () { 31python populate_packages_append () {
32 import re 32 import re
33 packages = d.getVar('PACKAGES', True).split() 33 packages = d.getVar('PACKAGES', True).split()
34 pkgdest = d.getVar('PKGDEST', True) 34 pkgdest = d.getVar('PKGDEST', True)
35 35
36 for pkg in packages: 36 for pkg in packages:
37 mime_dir = '%s/%s/usr/share/mime/packages' % (pkgdest, pkg) 37 mime_dir = '%s/%s/usr/share/mime/packages' % (pkgdest, pkg)
38 mimes = [] 38 mimes = []
39 mime_re = re.compile(".*\.xml$") 39 mime_re = re.compile(".*\.xml$")
40 if os.path.exists(mime_dir): 40 if os.path.exists(mime_dir):
41 for f in os.listdir(mime_dir): 41 for f in os.listdir(mime_dir):
42 if mime_re.match(f): 42 if mime_re.match(f):
43 mimes.append(f) 43 mimes.append(f)
44 if mimes: 44 if mimes:
45 bb.note("adding mime postinst and postrm scripts to %s" % pkg) 45 bb.note("adding mime postinst and postrm scripts to %s" % pkg)
46 postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True) 46 postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
47 if not postinst: 47 if not postinst:
48 postinst = '#!/bin/sh\n' 48 postinst = '#!/bin/sh\n'
49 postinst += d.getVar('mime_postinst', True) 49 postinst += d.getVar('mime_postinst', True)
50 d.setVar('pkg_postinst_%s' % pkg, postinst) 50 d.setVar('pkg_postinst_%s' % pkg, postinst)
51 postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True) 51 postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True)
52 if not postrm: 52 if not postrm:
53 postrm = '#!/bin/sh\n' 53 postrm = '#!/bin/sh\n'
54 postrm += d.getVar('mime_postrm', True) 54 postrm += d.getVar('mime_postrm', True)
55 d.setVar('pkg_postrm_%s' % pkg, postrm) 55 d.setVar('pkg_postrm_%s' % pkg, postrm)
56 bb.note("adding shared-mime-info-data dependency to %s" % pkg) 56 bb.note("adding shared-mime-info-data dependency to %s" % pkg)
57 rdepends = explode_deps(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "" ) 57 rdepends = explode_deps(d.getVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False) or "" )
58 rdepends.append("shared-mime-info-data") 58 rdepends.append("shared-mime-info-data")
59 d.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends)) 59 d.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends))
60} 60}