From aa8bef28a22bb4d70b482dcb3ba57fbab77cf10d Mon Sep 17 00:00:00 2001 From: Chris Larson Date: Thu, 17 Jun 2010 14:03:20 -0700 Subject: Indentation fixups, caught by python -t Signed-off-by: Chris Larson --- classes/cpan-base.bbclass | 2 +- classes/kernel-arch.bbclass | 10 +++++----- classes/package.bbclass | 34 +++++++++++++++++----------------- classes/packaged-staging.bbclass | 8 ++++---- classes/sanity.bbclass | 2 +- classes/siteinfo.bbclass | 6 +++--- 6 files changed, 31 insertions(+), 31 deletions(-) (limited to 'classes') diff --git a/classes/cpan-base.bbclass b/classes/cpan-base.bbclass index d65b5d944a..379defadb2 100644 --- a/classes/cpan-base.bbclass +++ b/classes/cpan-base.bbclass @@ -10,7 +10,7 @@ RDEPENDS += "${@["perl", ""][(bb.data.inherits_class('native', d))]}" # Determine the staged version of perl from the perl configuration file def get_perl_version(d): import re - cfg = bb.data.expand('${STAGING_LIBDIR}/perl/config.sh', d) + cfg = bb.data.expand('${STAGING_LIBDIR}/perl/config.sh', d) try: f = open(cfg, 'r') except IOError: diff --git a/classes/kernel-arch.bbclass b/classes/kernel-arch.bbclass index 8894fa554c..58c8374fa6 100644 --- a/classes/kernel-arch.bbclass +++ b/classes/kernel-arch.bbclass @@ -7,12 +7,12 @@ valid_archs = "alpha cris ia64 \ x86_64 i386 x86 \ m68knommu m68k ppc powerpc ppc64 \ - sparc sparc64 \ + sparc sparc64 \ arm arm26 \ m32r mips \ - sh sh64 um h8300 \ - parisc s390 v850 \ - avr32 blackfin" + sh sh64 um h8300 \ + parisc s390 v850 \ + avr32 blackfin" def map_kernel_arch(a, d): import re @@ -25,7 +25,7 @@ def map_kernel_arch(a, d): elif re.match('mipsel$', a): return 'mips' elif re.match('sh(3|4)$', a): return 'sh' elif re.match('bfin', a): return 'blackfin' - elif a in valid_archs: return a + elif a in valid_archs: return a else: bb.error("cannot map '%s' to a linux kernel architecture" % a) diff --git a/classes/package.bbclass b/classes/package.bbclass index 77a20bf9c5..c3781330bb 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -1029,23 +1029,23 @@ def package_run_hooks(f, d): bb.parse.parse_py.BBHandler.feeder(line, l, fn, os.path.basename(fn), d) line += 1 fp.close() - anonqueue = bb.data.getVar("__anonqueue", d, True) or [] - body = [x['content'] for x in anonqueue] - flag = { 'python' : 1, 'func' : 1 } - bb.data.setVar("__anonfunc", "\n".join(body), d) - bb.data.setVarFlags("__anonfunc", flag, d) - try: - t = bb.data.getVar('T', d) - bb.data.setVar('T', '${TMPDIR}/', d) - bb.build.exec_func("__anonfunc", d) - bb.data.delVar('T', d) - if t: - bb.data.setVar('T', t, d) - except Exception, e: - bb.msg.debug(1, bb.msg.domain.Parsing, "Exception when executing anonymous function: %s" % e) - raise - bb.data.delVar("__anonqueue", d) - bb.data.delVar("__anonfunc", d) + anonqueue = bb.data.getVar("__anonqueue", d, True) or [] + body = [x['content'] for x in anonqueue] + flag = { 'python' : 1, 'func' : 1 } + bb.data.setVar("__anonfunc", "\n".join(body), d) + bb.data.setVarFlags("__anonfunc", flag, d) + try: + t = bb.data.getVar('T', d) + bb.data.setVar('T', '${TMPDIR}/', d) + bb.build.exec_func("__anonfunc", d) + bb.data.delVar('T', d) + if t: + bb.data.setVar('T', t, d) + except Exception, e: + bb.msg.debug(1, bb.msg.domain.Parsing, "Exception when executing anonymous function: %s" % e) + raise + bb.data.delVar("__anonqueue", d) + bb.data.delVar("__anonfunc", d) python package_do_package () { packages = (bb.data.getVar('PACKAGES', d, True) or "").split() diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass index 8a98940c09..09e86ae99e 100644 --- a/classes/packaged-staging.bbclass +++ b/classes/packaged-staging.bbclass @@ -259,8 +259,8 @@ python packagestage_scenefunc () { # Remove the stamps and files we added above # FIXME - we should really only remove the stamps we added - for fname in glob.glob(stamp + '.*'): - oe.path.remove(fname) + for fname in glob.glob(stamp + '.*'): + oe.path.remove(fname) oe.path.remove(bb.data.expand("${WORKDIR}/tstage", d)) if stageok: @@ -295,8 +295,8 @@ python packagedstage_stampfixing_eventhandler() { # so we need to remove the autogenerated stamps. for task in taskscovered: covered = "%s.do_%s" % (e.stampPrefix[fn], task) - oe.path.remove(covered) - oe.path.remove(stamp) + oe.path.remove(covered) + oe.path.remove(stamp) } populate_sysroot_preamble () { diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index dfb3010f82..8eb74530a2 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -141,7 +141,7 @@ def check_sanity(e): if not abi.isdigit(): f = file(abifile, "w") f.write(current_abi) - elif abi == "3" and current_abi == "4": + elif abi == "3" and current_abi == "4": import bb bb.note("Converting staging from layout version 2 to layout version 3") os.system(bb.data.expand("mv ${TMPDIR}/staging ${TMPDIR}/sysroots", e.data)) diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index d7f27054b0..76a86c0bb9 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -47,7 +47,7 @@ def get_siteinfo_list(d): "i486-mingw32": "endian-little bit-32 common-mingw ix86-common",\ "i586-mingw32": "endian-little bit-32 common-mingw ix86-common",\ "i686-mingw32": "endian-little bit-32 common-mingw ix86-common",\ - "ia64-linux": "endian-little bit-64 common-linux common-glibc",\ + "ia64-linux": "endian-little bit-64 common-linux common-glibc",\ "mipsel-linux": "endian-little bit-32 common-linux common-glibc mips-common",\ "mipsel-linux-uclibc": "endian-little bit-32 common-linux common-uclibc mips-common",\ "mips-linux": "endian-big bit-32 common-linux common-glibc mips-common",\ @@ -55,8 +55,8 @@ def get_siteinfo_list(d): "powerpc-darwin": "endian-big bit-32 common-darwin",\ "ppc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common powerpc-linux",\ "ppc64-linux": "endian-big bit-64 common-linux common-glibc powerpc-common powerpc64-linux",\ - "powerpc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\ - "powerpc-linux-gnuspe": "endian-big bit-32 common-linux common-glibc powerpc-common powerpc-linux",\ + "powerpc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\ + "powerpc-linux-gnuspe": "endian-big bit-32 common-linux common-glibc powerpc-common powerpc-linux",\ "powerpc-linux-uclibc": "endian-big bit-32 common-linux common-uclibc powerpc-common",\ "powerpc-linux-uclibcspe": "endian-big bit-32 common-linux common-uclibc powerpc-common powerpc-linux-uclibc",\ "sh3-linux": "endian-little bit-32 common-linux common-glibc sh-common",\ -- cgit v1.2.3 From 1d5e4efced897a3a5be9b44fb2a3abaaa44e951f Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Sat, 19 Jun 2010 06:47:09 +0200 Subject: testlab: match Package,Version,Archi,Depends,Recom only as first word on line * otherwise it will pick 'The' ie from line 'Description: The Enlightenment Window Manager Version 17' and mess installed-packages.txt fails: Version_shr-version_1.0-20100512-r0.4_om-gta02.ipk fails: The_e-wm_0.16.999.060+svnr48617-r13.4_armv4t.ipk * this is also fix for missing entries in installed-package-sizes.txt (when find cannot find ipk files for messed package names) Signed-off-by: Martin Jansa --- classes/testlab.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/testlab.bbclass b/classes/testlab.bbclass index e6c9c8e284..bc6b6e5a7f 100644 --- a/classes/testlab.bbclass +++ b/classes/testlab.bbclass @@ -36,14 +36,14 @@ if [ -e ${IMAGE_ROOTFS}/etc/opkg ] && [ "${ONLINE_PACKAGE_MANAGEMENT}" = "full" echo -e "digraph depends {\n node [shape=plaintext]" > ${TESTLAB_DIR}/depends.dot for pkg in $(opkg-cl ${IPKG_ARGS} list_installed | awk '{print $1}') ; do - opkg-cl ${IPKG_ARGS} info $pkg | awk '/Package/ {printf $2"_"} /Version/ {printf $2"_"} /Archi/ {print $2".ipk"}' >> ${TESTLAB_DIR}/installed-packages.txt + opkg-cl ${IPKG_ARGS} info $pkg | awk '/^Package/ {printf $2"_"} /^Version/ {printf $2"_"} /^Archi/ {print $2".ipk"}' >> ${TESTLAB_DIR}/installed-packages.txt - for depends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep Depends) ; do - echo "$pkg OPP $depends;" | grep -v "(" | grep -v ")" | grep -v Depends | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot + for depends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep ^Depends) ; do + echo "$pkg OPP $depends;" | grep -v "(" | grep -v ")" | grep -v "$pkg OPP Depends" | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot done - for recommends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep Recom) ; do - echo "$pkg OPP $recommends [style=dotted];" | grep -v "(" | grep -v ")" | grep -v Recom | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot + for recommends in $(opkg-cl ${IPKG_ARGS} info $pkg | grep ^Recom) ; do + echo "$pkg OPP $recommends [style=dotted];" | grep -v "(" | grep -v ")" | grep -v "$pkg OPP Recom" | sed -e 's:,::g' -e 's:-:_:g' -e 's:\.:_:g' -e 's:+::g' |sed 's:OPP:->:g' >> ${TESTLAB_DIR}/depends.dot done done -- cgit v1.2.3 From 176e951e6d77f14aa4c84bc23753b0c5575bfc2e Mon Sep 17 00:00:00 2001 From: Frans Meulenbroeks Date: Sun, 20 Jun 2010 11:28:48 +0200 Subject: insane.bbclass: minor change: relayouted, sorted Sorted the entries alphabetically (except for x86_64 which I kept with the intel group). Made sure the tables are all indented the same way. replaced some tabs with spaces Signed-off-by: Frans Meulenbroeks --- classes/insane.bbclass | 75 +++++++++++++++++++++++++------------------------- 1 file changed, 37 insertions(+), 38 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 9ce348ddeb..ce2906159a 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -32,58 +32,57 @@ PACKAGEFUNCS += " do_package_qa " def package_qa_get_machine_dict(): return { "darwin9" : { - "arm" : (40, 0, 0, True, True), + "arm" : ( 40, 0, 0, True, True), }, "linux" : { - "arm" : (40, 97, 0, True, True), - "armeb": (40, 97, 0, False, True), - "powerpc": (20, 0, 0, False, True), - "i386": ( 3, 0, 0, True, True), - "i486": ( 3, 0, 0, True, True), - "i586": ( 3, 0, 0, True, True), - "i686": ( 3, 0, 0, True, True), - "x86_64": (62, 0, 0, True, False), - "ia64": (50, 0, 0, True, False), - "alpha": (36902, 0, 0, True, False), - "hppa": (15, 3, 0, False, True), - "m68k": ( 4, 0, 0, False, True), - "mips": ( 8, 0, 0, False, True), - "mipsel": ( 8, 0, 0, True, True), - "s390": (22, 0, 0, False, True), - "sh4": (42, 0, 0, True, True), - "sparc": ( 2, 0, 0, False, True), + "arm" : ( 40, 97, 0, True, True), + "armeb": ( 40, 97, 0, False, True), + "i386": ( 3, 0, 0, True, True), + "i486": ( 3, 0, 0, True, True), + "i586": ( 3, 0, 0, True, True), + "i686": ( 3, 0, 0, True, True), + "x86_64": ( 62, 0, 0, True, False), + "ia64": ( 50, 0, 0, True, False), + "alpha": (36902, 0, 0, True, False), + "hppa": ( 15, 3, 0, False, True), + "m68k": ( 4, 0, 0, False, True), + "mips": ( 8, 0, 0, False, True), + "mipsel": ( 8, 0, 0, True, True), + "powerpc": ( 20, 0, 0, False, True), + "s390": ( 22, 0, 0, False, True), + "sh4": ( 42, 0, 0, True, True), + "sparc": ( 2, 0, 0, False, True), }, "linux-uclibc" : { - "arm" : ( 40, 97, 0, True, True), - "armeb": ( 40, 97, 0, False, True), - "powerpc": ( 20, 0, 0, False, True), - "i386": ( 3, 0, 0, True, True), - "i486": ( 3, 0, 0, True, True), - "i586": ( 3, 0, 0, True, True), - "i686": ( 3, 0, 0, True, True), - "x86_64": ( 62, 0, 0, True, False), - "mips": ( 8, 0, 0, False, True), - "mipsel": ( 8, 0, 0, True, True), - "avr32": (6317, 0, 0, False, True), - "sh4": (42, 0, 0, True, True), - + "arm" : ( 40, 97, 0, True, True), + "armeb": ( 40, 97, 0, False, True), + "avr32": ( 6317, 0, 0, False, True), + "i386": ( 3, 0, 0, True, True), + "i486": ( 3, 0, 0, True, True), + "i586": ( 3, 0, 0, True, True), + "i686": ( 3, 0, 0, True, True), + "x86_64": ( 62, 0, 0, True, False), + "mips": ( 8, 0, 0, False, True), + "mipsel": ( 8, 0, 0, True, True), + "powerpc": ( 20, 0, 0, False, True), + "sh4": ( 42, 0, 0, True, True), }, "uclinux-uclibc" : { - "bfin": ( 106, 0, 0, True, True), + "bfin": ( 106, 0, 0, True, True), }, "linux-gnueabi" : { - "arm" : (40, 0, 0, True, True), - "armeb" : (40, 0, 0, False, True), + "arm" : ( 40, 0, 0, True, True), + "armeb" : ( 40, 0, 0, False, True), }, "linux-uclibceabi" : { - "arm" : (40, 0, 0, True, True), - "armeb" : (40, 0, 0, False, True), + "arm" : ( 40, 0, 0, True, True), + "armeb" : ( 40, 0, 0, False, True), }, "linux-gnuspe" : { - "powerpc": (20, 0, 0, False, True), + "powerpc": ( 20, 0, 0, False, True), }, "linux-uclibcspe" : { - "powerpc": (20, 0, 0, False, True), + "powerpc": ( 20, 0, 0, False, True), }, } -- cgit v1.2.3 From 8079e4ce1279ca6c7d20b1ba5338ee821caca6b4 Mon Sep 17 00:00:00 2001 From: Frans Meulenbroeks Date: Sun, 20 Jun 2010 11:40:21 +0200 Subject: siteinfo.bbclass: sorted entries, made indenting consistent sorted entries alphabetically indented everything properly removed a tab Signed-off-by: Frans Meulenbroeks --- classes/siteinfo.bbclass | 46 +++++++++++++++++++++++----------------------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'classes') diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index 76a86c0bb9..ebea48721b 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -19,51 +19,51 @@ def get_siteinfo_list(d): target = bb.data.getVar('HOST_ARCH', d, 1) + "-" + bb.data.getVar('HOST_OS', d, 1) targetinfo = {\ - "armeb-linux": "endian-big bit-32 common-linux common-glibc arm-common",\ - "armeb-linux-gnueabi": "endian-big bit-32 common-linux common-glibc arm-common armeb-linux",\ - "armeb-linux-uclibc": "endian-big bit-32 common-linux common-uclibc arm-common",\ - "armeb-linux-uclibceabi": "endian-big bit-32 common-linux common-uclibc arm-common armeb-linux-uclibc",\ "arm-darwin": "endian-little bit-32 common-darwin",\ "arm-darwin9": "endian-little bit-32 common-darwin",\ "arm-linux": "endian-little bit-32 common-linux common-glibc arm-common",\ "arm-linux-gnueabi": "endian-little bit-32 common-linux common-glibc arm-common arm-linux",\ "arm-linux-uclibc": "endian-little bit-32 common-linux common-uclibc arm-common",\ "arm-linux-uclibceabi": "endian-little bit-32 common-linux common-uclibc arm-common arm-linux-uclibc",\ + "armeb-linux": "endian-big bit-32 common-linux common-glibc arm-common",\ + "armeb-linux-gnueabi": "endian-big bit-32 common-linux common-glibc arm-common armeb-linux",\ + "armeb-linux-uclibc": "endian-big bit-32 common-linux common-uclibc arm-common",\ + "armeb-linux-uclibceabi": "endian-big bit-32 common-linux common-uclibc arm-common armeb-linux-uclibc",\ "avr32-linux-uclibc": "endian-big bit-32 common-linux common-uclibc avr32-common",\ "bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\ - "i386-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ - "i486-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ - "i586-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ - "i686-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ - "i386-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ - "i486-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ - "i586-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ - "i686-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ "i386-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ - "i486-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ - "i586-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ - "i686-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ + "i386-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i386-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ "i386-mingw32": "endian-little bit-32 common-mingw ix86-common",\ + "i486-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ + "i486-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i486-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ "i486-mingw32": "endian-little bit-32 common-mingw ix86-common",\ + "i586-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ + "i586-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i586-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ "i586-mingw32": "endian-little bit-32 common-mingw ix86-common",\ + "i686-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ + "i686-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "i686-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ "i686-mingw32": "endian-little bit-32 common-mingw ix86-common",\ - "ia64-linux": "endian-little bit-64 common-linux common-glibc",\ - "mipsel-linux": "endian-little bit-32 common-linux common-glibc mips-common",\ - "mipsel-linux-uclibc": "endian-little bit-32 common-linux common-uclibc mips-common",\ + "ia64-linux": "endian-little bit-64 common-linux common-glibc",\ "mips-linux": "endian-big bit-32 common-linux common-glibc mips-common",\ "mips-linux-uclibc": "endian-big bit-32 common-linux common-uclibc mips-common",\ + "mipsel-linux": "endian-little bit-32 common-linux common-glibc mips-common",\ + "mipsel-linux-uclibc": "endian-little bit-32 common-linux common-uclibc mips-common",\ "powerpc-darwin": "endian-big bit-32 common-darwin",\ - "ppc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common powerpc-linux",\ - "ppc64-linux": "endian-big bit-64 common-linux common-glibc powerpc-common powerpc64-linux",\ "powerpc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common",\ - "powerpc-linux-gnuspe": "endian-big bit-32 common-linux common-glibc powerpc-common powerpc-linux",\ + "powerpc-linux-gnuspe": "endian-big bit-32 common-linux common-glibc powerpc-common powerpc-linux",\ "powerpc-linux-uclibc": "endian-big bit-32 common-linux common-uclibc powerpc-common",\ "powerpc-linux-uclibcspe": "endian-big bit-32 common-linux common-uclibc powerpc-common powerpc-linux-uclibc",\ + "ppc-linux": "endian-big bit-32 common-linux common-glibc powerpc-common powerpc-linux",\ + "ppc64-linux": "endian-big bit-64 common-linux common-glibc powerpc-common powerpc64-linux",\ "sh3-linux": "endian-little bit-32 common-linux common-glibc sh-common",\ "sh4-linux": "endian-little bit-32 common-linux common-glibc sh-common",\ "sh4-linux-uclibc": "endian-little bit-32 common-linux common-uclibc sh-common",\ - "sparc-linux": "endian-big bit-32 common-linux common-glibc",\ - "viac3-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ + "sparc-linux": "endian-big bit-32 common-linux common-glibc",\ + "viac3-linux": "endian-little bit-32 common-linux common-glibc ix86-common",\ "x86_64-linux": "endian-little bit-64 common-linux common-glibc",\ "x86_64-linux-uclibc": "endian-little bit-64 common-linux common-uclibc"} if target in targetinfo: -- cgit v1.2.3