diff options
30 files changed, 181 insertions, 195 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index cbf164fac7..18e6aec814 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -676,55 +676,61 @@ python read_subpackage_metadata () { bb.data.setVar(key, sdata[key], d) } -python __anonymous () { - import exceptions - need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1) - if need_host: - import re - this_host = bb.data.getVar('HOST_SYS', d, 1) - if not re.match(need_host, this_host): - raise bb.parse.SkipPackage("incompatible with host %s" % this_host) - - need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1) - if need_machine: - import re - this_machine = bb.data.getVar('MACHINE', d, 1) - if this_machine and not re.match(need_machine, this_machine): - raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine) - - pn = bb.data.getVar('PN', d, 1) - - # OBSOLETE in bitbake 1.7.4 - srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) - if srcdate != None: - bb.data.setVar('SRCDATE', srcdate, d) +def base_after_parse_two(d): + import bb + import exceptions + need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1) + if need_host: + import re + this_host = bb.data.getVar('HOST_SYS', d, 1) + if not re.match(need_host, this_host): + raise bb.parse.SkipPackage("incompatible with host %s" % this_host) + + need_machine = bb.data.getVar('COMPATIBLE_MACHINE', d, 1) + if need_machine: + import re + this_machine = bb.data.getVar('MACHINE', d, 1) + if this_machine and not re.match(need_machine, this_machine): + raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine) + + pn = bb.data.getVar('PN', d, 1) + + # OBSOLETE in bitbake 1.7.4 + srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) + if srcdate != None: + bb.data.setVar('SRCDATE', srcdate, d) + + use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1) + if use_nls != None: + bb.data.setVar('USE_NLS', use_nls, d) + +def base_after_parse(d): + import bb, os + mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1) + old_arch = bb.data.getVar('PACKAGE_ARCH', d, 1) + if (old_arch == mach_arch): + # Nothing to do + return + if (bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) == '0'): + return + paths = [] + for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]: + paths.append(bb.data.expand(os.path.join(p, mach_arch), d)) + for s in bb.data.getVar('SRC_URI', d, 1).split(): + local = bb.data.expand(bb.fetch.localpath(s, d), d) + for mp in paths: + if local.startswith(mp): + #bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch)) + bb.data.setVar('PACKAGE_ARCH', mach_arch, d) + return - use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1) - if use_nls != None: - bb.data.setVar('USE_NLS', use_nls, d) -} python () { - import bb, os - mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1) - old_arch = bb.data.getVar('PACKAGE_ARCH', d, 1) - if (old_arch == mach_arch): - # Nothing to do - return - if (bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) == '0'): - return - paths = [] - for p in [ "${FILE_DIRNAME}/${PF}", "${FILE_DIRNAME}/${P}", "${FILE_DIRNAME}/${PN}", "${FILE_DIRNAME}/files", "${FILE_DIRNAME}" ]: - paths.append(bb.data.expand(os.path.join(p, mach_arch), d)) - for s in bb.data.getVar('SRC_URI', d, 1).split(): - local = bb.data.expand(bb.fetch.localpath(s, d), d) - for mp in paths: - if local.startswith(mp): -# bb.note("overriding PACKAGE_ARCH from %s to %s" % (old_arch, mach_arch)) - bb.data.setVar('PACKAGE_ARCH', mach_arch, d) - return + base_after_parse_two(d) + base_after_parse(d) } + # Patch handling inherit patch diff --git a/classes/flow-lossage.bbclass b/classes/flow-lossage.bbclass index 3e841e3cae..00e6bf0257 100644 --- a/classes/flow-lossage.bbclass +++ b/classes/flow-lossage.bbclass @@ -1,5 +1,5 @@ # gcc-3.4 blows up in gtktext with -frename-registers on arm-linux python () { - cflags = (bb.data.getVar('CFLAGS', d, 1) or '').replace('-frename-registers', '') - bb.data.setVar('CFLAGS', cflags, d) + cflags = (bb.data.getVar('CFLAGS', d, 1) or '').replace('-frename-registers', '') + bb.data.setVar('CFLAGS', cflags, d) } diff --git a/classes/gettext.bbclass b/classes/gettext.bbclass index 3785f5acd3..a1e00e72c1 100644 --- a/classes/gettext.bbclass +++ b/classes/gettext.bbclass @@ -1,11 +1,15 @@ +def gettext_after_parse(d): + import bb + # Remove the NLS bits if USE_NLS is no. + if bb.data.getVar('USE_NLS', d, 1) == 'no': + cfg = oe_filter_out('^--(dis|en)able-nls$', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d) + cfg += " --disable-nls" + depends = bb.data.getVar('DEPENDS', d, 1) or "" + bb.data.setVar('DEPENDS', oe_filter_out('^(virtual/libiconv|virtual/libintl)$', depends, d), d) + bb.data.setVar('EXTRA_OECONF', cfg, d) + python () { - # Remove the NLS bits if USE_NLS is no. - if bb.data.getVar('USE_NLS', d, 1) == 'no': - cfg = oe_filter_out('^--(dis|en)able-nls$', bb.data.getVar('EXTRA_OECONF', d, 1) or "", d) - cfg += " --disable-nls" - depends = bb.data.getVar('DEPENDS', d, 1) or "" - bb.data.setVar('DEPENDS', oe_filter_out('^(virtual/libiconv|virtual/libintl)$', depends, d), d) - bb.data.setVar('EXTRA_OECONF', cfg, d) + gettext_after_parse(d) } DEPENDS =+ "gettext-native" diff --git a/classes/multimachine.bbclass b/classes/multimachine.bbclass index 30a285e5f3..d63aeb6d73 100644 --- a/classes/multimachine.bbclass +++ b/classes/multimachine.bbclass @@ -4,19 +4,26 @@ STAGING_KERNEL_DIR = "${STAGING_DIR}/${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_ # Find any machine specific sub packages and if present, mark the # whole package as machine specific for multimachine purposes. -python __anonymous () { - packages = bb.data.getVar('PACKAGES', d, 1).split() - macharch = bb.data.getVar('MACHINE_ARCH', d, 1) - multiarch = bb.data.getVar('PACKAGE_ARCH', d, 1) - for pkg in packages: - pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1) - # We could look for != PACKAGE_ARCH here but how to choose - # if multiple differences are present? - # Look through IPKG_ARCHS for the priority order? - if pkgarch and pkgarch == macharch: - multiarch = macharch +def multi_machine_after_parse(d): + import bb + packages = bb.data.getVar('PACKAGES', d, 1).split() + macharch = bb.data.getVar('MACHINE_ARCH', d, 1) + multiarch = bb.data.getVar('PACKAGE_ARCH', d, 1) + + for pkg in packages: + pkgarch = bb.data.getVar("PACKAGE_ARCH_%s" % pkg, d, 1) + + # We could look for != PACKAGE_ARCH here but how to choose + # if multiple differences are present? + # Look through IPKG_ARCHS for the priority order? + if pkgarch and pkgarch == macharch: + multiarch = macharch - bb.data.setVar('MULTIMACH_ARCH', multiarch, d) + bb.data.setVar('MULTIMACH_ARCH', multiarch, d) + + +python __anonymous () { + multi_machine_after_parse(d) } diff --git a/classes/update-alternatives.bbclass b/classes/update-alternatives.bbclass index 6b2b547d5f..2e24eeec48 100644 --- a/classes/update-alternatives.bbclass +++ b/classes/update-alternatives.bbclass @@ -10,11 +10,15 @@ update_alternatives_postrm() { update-alternatives --remove ${ALTERNATIVE_NAME} ${ALTERNATIVE_PATH} } +def updatealternativesafterparse(d): + import bb + if bb.data.getVar('ALTERNATIVE_NAME', d) == None: + raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % bb.data.getVar('FILE', d) + if bb.data.getVar('ALTERNATIVE_PATH', d) == None: + raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d) + python __anonymous() { - if bb.data.getVar('ALTERNATIVE_NAME', d) == None: - raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_NAME" % bb.data.getVar('FILE', d) - if bb.data.getVar('ALTERNATIVE_PATH', d) == None: - raise bb.build.FuncFailed, "%s inherits update-alternatives but doesn't set ALTERNATIVE_PATH" % bb.data.getVar('FILE', d) + updatealternativesafterparse(d) } python populate_packages_prepend () { diff --git a/classes/update-rc.d.bbclass b/classes/update-rc.d.bbclass index 0bfba467c1..581859ad48 100644 --- a/classes/update-rc.d.bbclass +++ b/classes/update-rc.d.bbclass @@ -26,12 +26,17 @@ updatercd_postrm() { update-rc.d $D ${INITSCRIPT_NAME} remove } + +def update_rc_after_parse(d): + import bb + if bb.data.getVar('INITSCRIPT_PACKAGES', d) == None: + if bb.data.getVar('INITSCRIPT_NAME', d) == None: + raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d) + if bb.data.getVar('INITSCRIPT_PARAMS', d) == None: + raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d) + python __anonymous() { - if bb.data.getVar('INITSCRIPT_PACKAGES', d) == None: - if bb.data.getVar('INITSCRIPT_NAME', d) == None: - raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_NAME" % bb.data.getVar('FILE', d) - if bb.data.getVar('INITSCRIPT_PARAMS', d) == None: - raise bb.build.FuncFailed, "%s inherits update-rc.d but doesn't set INITSCRIPT_PARAMS" % bb.data.getVar('FILE', d) + update_rc_after_parse(d) } python populate_packages_prepend () { diff --git a/packages/apache/apache_2.0.54.bb b/packages/apache/apache_2.0.54.bb index 7f714724db..ff0f23e010 100644 --- a/packages/apache/apache_2.0.54.bb +++ b/packages/apache/apache_2.0.54.bb @@ -82,10 +82,10 @@ do_install_append () { } python () { - # Don't build apache unless we are building nativly - target = bb.data.getVar("TARGET_ARCH", d, 1) - build = bb.data.getVar("BUILD_ARCH", d, 1) - if target != build: - raise bb.parse.SkipPackage("Apache will only build nativly (TARGET_ARCH == BUILD_ARCH)") + # Don't build apache unless we are building nativly + target = bb.data.getVar("TARGET_ARCH", d, 1) + build = bb.data.getVar("BUILD_ARCH", d, 1) + if target != build: + raise bb.parse.SkipPackage("Apache will only build nativly (TARGET_ARCH == BUILD_ARCH)") } diff --git a/packages/glib-2.0/glib-2.0.inc b/packages/glib-2.0/glib-2.0.inc new file mode 100644 index 0000000000..c8bde21cf2 --- /dev/null +++ b/packages/glib-2.0/glib-2.0.inc @@ -0,0 +1,5 @@ + +python () { + if bb.data.getVar("USE_NLS", d, 1) == "no": + raise bb.parse.SkipPackage("${PN} requires native language support.") +} diff --git a/packages/glib-2.0/glib-2.0_2.12.0.bb b/packages/glib-2.0/glib-2.0_2.12.0.bb index e60d465fd5..7d666b5903 100644 --- a/packages/glib-2.0/glib-2.0_2.12.0.bb +++ b/packages/glib-2.0/glib-2.0_2.12.0.bb @@ -24,10 +24,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.12.1.bb b/packages/glib-2.0/glib-2.0_2.12.1.bb index 064f2f7f96..90904d0b54 100644 --- a/packages/glib-2.0/glib-2.0_2.12.1.bb +++ b/packages/glib-2.0/glib-2.0_2.12.1.bb @@ -24,10 +24,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.12.3.bb b/packages/glib-2.0/glib-2.0_2.12.3.bb index 064f2f7f96..90904d0b54 100644 --- a/packages/glib-2.0/glib-2.0_2.12.3.bb +++ b/packages/glib-2.0/glib-2.0_2.12.3.bb @@ -24,10 +24,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.2.3.bb b/packages/glib-2.0/glib-2.0_2.2.3.bb index 4288cb62eb..cf9722f2aa 100644 --- a/packages/glib-2.0/glib-2.0_2.2.3.bb +++ b/packages/glib-2.0/glib-2.0_2.2.3.bb @@ -19,10 +19,7 @@ PR = "r1" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.4.5.bb b/packages/glib-2.0/glib-2.0_2.4.5.bb index c6f06e88b6..a1a6012398 100644 --- a/packages/glib-2.0/glib-2.0_2.4.5.bb +++ b/packages/glib-2.0/glib-2.0_2.4.5.bb @@ -30,10 +30,7 @@ PR = "r1" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.4.6.bb b/packages/glib-2.0/glib-2.0_2.4.6.bb index d5b9b6f73f..5b47bc5d3c 100644 --- a/packages/glib-2.0/glib-2.0_2.4.6.bb +++ b/packages/glib-2.0/glib-2.0_2.4.6.bb @@ -31,10 +31,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.6.0.bb b/packages/glib-2.0/glib-2.0_2.6.0.bb index 9e55bf0305..e59d9cc282 100644 --- a/packages/glib-2.0/glib-2.0_2.6.0.bb +++ b/packages/glib-2.0/glib-2.0_2.6.0.bb @@ -30,10 +30,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.6.1.bb b/packages/glib-2.0/glib-2.0_2.6.1.bb index 289b81aaaf..682df4dbbb 100644 --- a/packages/glib-2.0/glib-2.0_2.6.1.bb +++ b/packages/glib-2.0/glib-2.0_2.6.1.bb @@ -30,10 +30,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.6.2.bb b/packages/glib-2.0/glib-2.0_2.6.2.bb index 289b81aaaf..682df4dbbb 100644 --- a/packages/glib-2.0/glib-2.0_2.6.2.bb +++ b/packages/glib-2.0/glib-2.0_2.6.2.bb @@ -30,10 +30,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.6.3.bb b/packages/glib-2.0/glib-2.0_2.6.3.bb index 289b81aaaf..682df4dbbb 100644 --- a/packages/glib-2.0/glib-2.0_2.6.3.bb +++ b/packages/glib-2.0/glib-2.0_2.6.3.bb @@ -30,10 +30,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.6.4.bb b/packages/glib-2.0/glib-2.0_2.6.4.bb index 289b81aaaf..682df4dbbb 100644 --- a/packages/glib-2.0/glib-2.0_2.6.4.bb +++ b/packages/glib-2.0/glib-2.0_2.6.4.bb @@ -30,10 +30,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.8.1.bb b/packages/glib-2.0/glib-2.0_2.8.1.bb index ecb7115dd1..218cb53c46 100644 --- a/packages/glib-2.0/glib-2.0_2.8.1.bb +++ b/packages/glib-2.0/glib-2.0_2.8.1.bb @@ -29,10 +29,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.8.2.bb b/packages/glib-2.0/glib-2.0_2.8.2.bb index d72803b564..d26f248447 100644 --- a/packages/glib-2.0/glib-2.0_2.8.2.bb +++ b/packages/glib-2.0/glib-2.0_2.8.2.bb @@ -29,10 +29,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.8.4.bb b/packages/glib-2.0/glib-2.0_2.8.4.bb index 778e3118d1..c11e8bf887 100644 --- a/packages/glib-2.0/glib-2.0_2.8.4.bb +++ b/packages/glib-2.0/glib-2.0_2.8.4.bb @@ -27,10 +27,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/glib-2.0/glib-2.0_2.8.6.bb b/packages/glib-2.0/glib-2.0_2.8.6.bb index eea05316b1..f28b370f89 100644 --- a/packages/glib-2.0/glib-2.0_2.8.6.bb +++ b/packages/glib-2.0/glib-2.0_2.8.6.bb @@ -26,10 +26,7 @@ S = "${WORKDIR}/glib-${PV}" inherit autotools pkgconfig gettext -python () { - if bb.data.getVar("USE_NLS", d, 1) == "no": - raise bb.parse.SkipPackage("${PN} requires native language support.") -} +require glib-2.0.inc acpaths = "" do_configure_prepend () { diff --git a/packages/grub/grub_0.97.bb b/packages/grub/grub_0.97.bb index d0dddd0189..051296a31a 100644 --- a/packages/grub/grub_0.97.bb +++ b/packages/grub/grub_0.97.bb @@ -8,10 +8,10 @@ S = "${WORKDIR}/grub-${PV}" inherit autotools python __anonymous () { - import re - host = bb.data.getVar('HOST_SYS', d, 1) - if not re.match('i.86.*-linux', host): - raise bb.parse.SkipPackage("incompatible with host %s" % host) + import re + host = bb.data.getVar('HOST_SYS', d, 1) + if not re.match('i.86.*-linux', host): + raise bb.parse.SkipPackage("incompatible with host %s" % host) } do_install_append_vmware() { diff --git a/packages/images/slugos-image.bb b/packages/images/slugos-image.bb index 231dcd8891..388a97583f 100644 --- a/packages/images/slugos-image.bb +++ b/packages/images/slugos-image.bb @@ -98,10 +98,10 @@ IPKG_INSTALL = "${RDEPENDS}" inherit image_ipk python () { - # Don't build slugos images unless the configuration is set up - # for an image build! - if bb.data.getVar("SLUGOS_IMAGENAME", d, 1) == '' or bb.data.getVar("SLUGOS_IMAGESEX", d, 1) == '': - raise bb.parse.SkipPackage("absent or broken SlugOS configuration") + # Don't build slugos images unless the configuration is set up + # for an image build! + if bb.data.getVar("SLUGOS_IMAGENAME", d, 1) == '' or bb.data.getVar("SLUGOS_IMAGESEX", d, 1) == '': + raise bb.parse.SkipPackage("absent or broken SlugOS configuration") } #-------------------------------------------------------------------------------- diff --git a/packages/linux/ixp4xx-kernel.inc b/packages/linux/ixp4xx-kernel.inc index 28c321e079..4e62025083 100644 --- a/packages/linux/ixp4xx-kernel.inc +++ b/packages/linux/ixp4xx-kernel.inc @@ -84,38 +84,38 @@ python () { pref = 10 mmac = 0 for patch in pv[1:]: - name.append(patch) - pname = '-'.join(name) - if patch[0:2] == "rc" or patch[0:3] == "pre": - patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/v%s/testing/patch-%s.bz2;patch=1;pname=%s" % (major, pname, pname)) - kernel[-1] = str(int(kernel[-1]) - 1) - if patch[0:2] == "rc" and pref == 10: - pref = 6 - filepath[0:0] = [ filedir % name[0] ] - filepath[0:0] = [ filedir % (name[0] + "-rc") ] - else: - pref = 2 - elif patch[0:2] == "bk" or patch[0:3] == "git": - patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/v%s/snapshots/patch-%s.bz2;patch=1;pname=%s" % (major, pname, pname)) - pref = 2 - elif patch[0:2] == "ac": - patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/people/alan/linux-%s/%s/patch-%s" % (major, base, pname)) - mmac = 2 - filepath[0:0] = [ filedir % (name[0] + "-ac") ] - elif patch[0:2] == "mm": - patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/%s/%s/%s/%s.bz2;patch=1;pname=%s" % (major, base, pname, pname, pname)) - mmac = 2 - filepath[0:0] = [ filedir % (name[0] + "-mm") ] - else: - raise bb.build.FuncFailed("ixp4xx-kernel: patch %s not recognized in %s" % (patch, '-'.join(pv))) - filepath[0:0] = [ filedir % pname ] - base = pname + name.append(patch) + pname = '-'.join(name) + if patch[0:2] == "rc" or patch[0:3] == "pre": + patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/v%s/testing/patch-%s.bz2;patch=1;pname=%s" % (major, pname, pname)) + kernel[-1] = str(int(kernel[-1]) - 1) + if patch[0:2] == "rc" and pref == 10: + pref = 6 + filepath[0:0] = [ filedir % name[0] ] + filepath[0:0] = [ filedir % (name[0] + "-rc") ] + else: + pref = 2 + elif patch[0:2] == "bk" or patch[0:3] == "git": + patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/v%s/snapshots/patch-%s.bz2;patch=1;pname=%s" % (major, pname, pname)) + pref = 2 + elif patch[0:2] == "ac": + patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/people/alan/linux-%s/%s/patch-%s" % (major, base, pname)) + mmac = 2 + filepath[0:0] = [ filedir % (name[0] + "-ac") ] + elif patch[0:2] == "mm": + patch_uri.append("ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/%s/%s/%s/%s.bz2;patch=1;pname=%s" % (major, base, pname, pname, pname)) + mmac = 2 + filepath[0:0] = [ filedir % (name[0] + "-mm") ] + else: + raise bb.build.FuncFailed("ixp4xx-kernel: patch %s not recognized in %s" % (patch, '-'.join(pv))) + filepath[0:0] = [ filedir % pname ] + base = pname base = '.'.join(kernel) patch_uri[0] = "ftp://ftp.kernel.org/pub/linux/kernel/v%s/linux-%s.tar.bz2" % (major, base) filepath[-1:-1] = [ filedir % base ] if base != minor: - filepath[-1:-1] = [ filedir % minor ] + filepath[-1:-1] = [ filedir % minor ] filepath[-1:-1] = [ filedir % major ] bb.data.setVar("IXP4XX_SRCMAJ", major, d) @@ -395,12 +395,12 @@ do_deploy() { addtask deploy before do_build after do_compile python () { - # check for IXP4XX_SUFFIX - if not set then we don't know what to build, - # also sanity check the SLUGOS_IMAGESEX - sex = bb.data.getVar("SLUGOS_IMAGESEX", d, 1) - if sex != 'little-endian' and sex != 'big-endian': - raise bb.parse.SkipPackage("slugos kernels require SLUGOS_IMAGESEX") - suffix = bb.data.getVar("IXP4XX_SUFFIX", d, 1) - if suffix == '': - raise bb.parse.SkipPackage("slugos kernels require IXP4XX_SUFFIX") + # check for IXP4XX_SUFFIX - if not set then we don't know what to build, + # also sanity check the SLUGOS_IMAGESEX + sex = bb.data.getVar("SLUGOS_IMAGESEX", d, 1) + if sex != 'little-endian' and sex != 'big-endian': + raise bb.parse.SkipPackage("slugos kernels require SLUGOS_IMAGESEX") + suffix = bb.data.getVar("IXP4XX_SUFFIX", d, 1) + if suffix == '': + raise bb.parse.SkipPackage("slugos kernels require IXP4XX_SUFFIX") } diff --git a/packages/linux/linux-amsdelta-2.6_2.6.16-omap2.bb b/packages/linux/linux-amsdelta-2.6_2.6.16-omap2.bb index 9a80ce626f..6906fdd14e 100644 --- a/packages/linux/linux-amsdelta-2.6_2.6.16-omap2.bb +++ b/packages/linux/linux-amsdelta-2.6_2.6.16-omap2.bb @@ -20,10 +20,10 @@ S = "${WORKDIR}/linux-2.6.16" inherit kernel python __anonymous () { - import re - host = bb.data.getVar('HOST_SYS', d, 1) - if not re.match('arm.*-linux', host): - raise bb.parse.SkipPackage("incompatible with host %s" % host) + import re + host = bb.data.getVar('HOST_SYS', d, 1) + if not re.match('arm.*-linux', host): + raise bb.parse.SkipPackage("incompatible with host %s" % host) } KERNEL_IMAGETYPE = "uImage" diff --git a/packages/lockstat/lockstat_1.4.10.bb b/packages/lockstat/lockstat_1.4.10.bb index 7c6c84dd01..61f4a61b0d 100644 --- a/packages/lockstat/lockstat_1.4.10.bb +++ b/packages/lockstat/lockstat_1.4.10.bb @@ -10,9 +10,9 @@ export KERNEL_SOURCE = ${@base_read_file('${STAGING_KERNEL_DIR}/kernel-source')} CFLAGS += " -I${KERNEL_SOURCE}/include" python () { -# NOTE: any target machines with kernels supporting spinlock metering should -# check the MACHINE variable here to prevent the SkipPackage. - raise bb.parse.SkipPackage("The target machine's kernel does not appear able to use spinlock metering.") + # NOTE: any target machines with kernels supporting spinlock metering should + # check the MACHINE variable here to prevent the SkipPackage. + raise bb.parse.SkipPackage("The target machine's kernel does not appear able to use spinlock metering.") } do_compile () { diff --git a/packages/nis/nis.inc b/packages/nis/nis.inc index 479718cf5e..18dd00437a 100644 --- a/packages/nis/nis.inc +++ b/packages/nis/nis.inc @@ -28,7 +28,7 @@ do_install() { # so force the package to be skipped here (this will cause a # 'nothing provides' error) python () { - os = bb.data.getVar("TARGET_OS", d, 1) - if os == "linux-uclibc": - raise bb.parse.SkipPackage("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this") + os = bb.data.getVar("TARGET_OS", d, 1) + if os == "linux-uclibc": + raise bb.parse.SkipPackage("NIS functionality requires rpcsvc/yp.h, uClibC does not provide this") } diff --git a/packages/pam/libpam_0.79.bb b/packages/pam/libpam_0.79.bb index e76903e845..ef66fcf1da 100644 --- a/packages/pam/libpam_0.79.bb +++ b/packages/pam/libpam_0.79.bb @@ -66,7 +66,7 @@ do_stage() { # that those which use YP don't get built on uClibC, this looks # like a big patch... python () { - os = bb.data.getVar("TARGET_OS", d, 1) - if os == "linux-uclibc": - raise bb.parse.SkipPackage("Some PAM modules require rpcsvc/yp.h, uClibC does not provide this") + os = bb.data.getVar("TARGET_OS", d, 1) + if os == "linux-uclibc": + raise bb.parse.SkipPackage("Some PAM modules require rpcsvc/yp.h, uClibC does not provide this") } |