From 3aded69ae48453e4929d42994c9f66abcb2dd47e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Thu, 30 Aug 2007 07:23:50 +0000 Subject: classes: Remove bitbake 1.6 compatibility code --- classes/base.bbclass | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index 9998982bd1..32f7fcbe31 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -864,54 +864,7 @@ def base_after_parse(d): bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d) return -# -# Various backwards compatibility stuff to be removed -# when we switch to bitbake 1.8.2+ as a minimum version -# -def base_oldbitbake_workarounds(d): - import bb - from bb import __version__ - from distutils.version import LooseVersion - - if (LooseVersion(__version__) > "1.8.0"): - return - - pn = bb.data.getVar('PN', d, True) - srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, True) - if srcdate != None: - bb.data.setVar('SRCDATE', srcdate, d) - depends = bb.data.getVar('DEPENDS', d, False) - patchdeps = bb.data.getVar("PATCHTOOL", d, True) - if patchdeps: - patchdeps = "%s-native " % patchdeps - if not patchdeps in bb.data.getVar("PROVIDES", d, True): - depends = patchdeps + depends - if bb.data.inherits_class('rootfs_ipk', d): - depends = "ipkg-native ipkg-utils-native fakeroot-native " + depends - if bb.data.inherits_class('rootfs_deb', d): - depends = "dpkg-native apt-native fakeroot-native " + depends - if bb.data.inherits_class('image', d): - depends = "makedevs-native " + depends - for type in (bb.data.getVar('IMAGE_FSTYPES', d, True) or "").split(): - deps = bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "" - if deps: - depends = depends + " %s" % deps - for dep in (bb.data.getVar('EXTRA_IMAGEDEPENDS', d, True) or "").split(): - depends = depends + " %s" % dep - - packages = bb.data.getVar('PACKAGES', d, True) - if packages != '': - if bb.data.inherits_class('package_ipk', d): - depends = "ipkg-utils-native " + depends - if bb.data.inherits_class('package_deb', d): - depends = "dpkg-native " + depends - if bb.data.inherits_class('package', d): - depends = "${PACKAGE_DEPENDS} fakeroot-native " + depends - - bb.data.setVar('DEPENDS', depends, d) - python () { - base_oldbitbake_workarounds(d) base_after_parse(d) } -- cgit v1.2.3 From eb4534607c691fa07f62c054dea9cc18baf3d9a2 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 1 Sep 2007 15:16:50 +0000 Subject: classes: Convert to PKGDATA_DIR variable (from poky) --- classes/base.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index 32f7fcbe31..23ca444fe6 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -724,7 +724,7 @@ def explode_deps(s): def packaged(pkg, d): import os, bb - return os.access(bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s.packaged' % pkg, d), os.R_OK) + return os.access(bb.data.expand('${PKGDATA_DIR}/runtime/%s.packaged' % pkg, d), os.R_OK) def read_pkgdatafile(fn): pkgdata = {} @@ -750,23 +750,23 @@ def read_pkgdatafile(fn): def has_subpkgdata(pkg, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d) + fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) return os.access(fn, os.R_OK) def read_subpkgdata(pkg, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/runtime/%s' % pkg, d) + fn = bb.data.expand('${PKGDATA_DIR}/runtime/%s' % pkg, d) return read_pkgdatafile(fn) def has_pkgdata(pn, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d) + fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) return os.access(fn, os.R_OK) def read_pkgdata(pn, d): import bb, os - fn = bb.data.expand('${STAGING_DIR}/pkgdata/%s' % pn, d) + fn = bb.data.expand('${PKGDATA_DIR}/%s' % pn, d) return read_pkgdatafile(fn) python read_subpackage_metadata () { -- cgit v1.2.3 From cbd7193c0ca7157d04e0ad0ee9649998a9bb7527 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 1 Sep 2007 15:30:38 +0000 Subject: base.bbclass: Fix SRC_URI overrides handling, lower the priority of local file url checksum messages, correct populate_staging dependencies (from poky) --- classes/base.bbclass | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index 23ca444fe6..1a3739f383 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -482,8 +482,11 @@ python base_do_fetch() { (type,host,path,_,_,_) = bb.decodeurl(url) uri = "%s://%s%s" % (type,host,path) try: - if not base_chk_file(parser, pn, pv,uri, localpath, d): - bb.note("%s-%s-%s has no section, not checking URI" % (pn,pv,uri)) + if not base_chk_file(parser, pn, pv,uri, localpath, d): + if type != "file": + bb.note("%s-%s-%s has no section, not checking URI" % (pn,pv,uri)) + else: + bb.debug("%s-%s-%s has no section, not checking URI" % (pn,pv,uri)) except Exception: raise bb.build.FuncFailed("Checksum of '%s' failed" % uri) } @@ -681,7 +684,8 @@ do_populate_staging[dirs] = "${STAGING_DIR}/${TARGET_SYS}/bin ${STAGING_DIR}/${T ${STAGING_DATADIR} \ ${S} ${B}" -addtask populate_staging after do_package_write +# Could be compile but populate_staging and do_install shouldn't run at the same time +addtask populate_staging after do_install python do_populate_staging () { bb.build.exec_func('do_stage', d) @@ -847,7 +851,6 @@ def base_after_parse(d): paths = [] for p in [ "${PF}", "${P}", "${PN}", "files", "" ]: - paths.append(bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d)) path = bb.data.expand(os.path.join("${FILE_DIRNAME}", p, "${MACHINE}"), d) if os.path.isdir(path): paths.append(path) -- cgit v1.2.3 From e7b5e1602c3e3ce718a5a67a1775ff045a93e81e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 4 Sep 2007 08:22:28 +0000 Subject: base.bbclass: Wipe install directory before running install to make rebuilding packages safer (from poky) --- classes/base.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index 1a3739f383..304eaecb10 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -374,6 +374,12 @@ oe_machinstall() { fi } +# Remove and re-create ${D} so that is it guaranteed to be empty +do_install_prepend() { + rm -rf ${D} + mkdir -p ${D} +} + addtask listtasks do_listtasks[nostamp] = "1" python do_listtasks() { -- cgit v1.2.3 From d50cfb53ec731680c3a7cfb772f27308acff0f06 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 4 Sep 2007 08:24:59 +0000 Subject: classes/conf: Remove bitbake < 1.8.8 compatibility code --- classes/base.bbclass | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index 304eaecb10..9bcf212e95 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -582,10 +582,6 @@ 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) - # dont need any parameters for extraction, strip them off - # RP: Insane. localpath shouldn't have parameters - # RP: Scehdule for removal with bitbake 1.8.8 - local = re.sub(';.*$', '', local) local = os.path.realpath(local) ret = oe_unpack_file(local, localdata, url) if not ret: @@ -877,14 +873,6 @@ python () { base_after_parse(d) } -# Remove me when we switch to bitbake 1.8.8 -def base_get_srcrev(d): - import bb - - if hasattr(bb.fetch, "get_srcrev"): - return bb.fetch.get_srcrev(d) - return "NOT IMPLEMENTED" - # Patch handling inherit patch -- cgit v1.2.3 From b8c7a56f1407155f1df69ce942ebef1a585d47dd Mon Sep 17 00:00:00 2001 From: Graeme Gregory Date: Wed, 5 Sep 2007 09:03:04 +0000 Subject: classes/base.bbclass : change to make sure ${D} gets removed before do_install_prepend. Will activate in a future bitbake version. do_install_prepend became do_install[cleandirs] = "${D}" --- classes/base.bbclass | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index 9bcf212e95..d4b327e266 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -375,10 +375,7 @@ oe_machinstall() { } # Remove and re-create ${D} so that is it guaranteed to be empty -do_install_prepend() { - rm -rf ${D} - mkdir -p ${D} -} +do_install[cleandirs] = "${D}" addtask listtasks do_listtasks[nostamp] = "1" -- cgit v1.2.3 From 8a00555b71e47ee86e8449a8f44b7e16c3cef1ae Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 7 Sep 2007 20:22:38 +0000 Subject: base.bbclass: change message about lack of checksums.ini entry for URI to something easier to understand --- classes/base.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes/base.bbclass') diff --git a/classes/base.bbclass b/classes/base.bbclass index d4b327e266..999d409914 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -487,9 +487,9 @@ python base_do_fetch() { try: if not base_chk_file(parser, pn, pv,uri, localpath, d): if type != "file": - bb.note("%s-%s-%s has no section, not checking URI" % (pn,pv,uri)) + bb.note("%s-%s: %s has no entry in conf/checksums.ini, not checking URI" % (pn,pv,uri)) else: - bb.debug("%s-%s-%s has no section, not checking URI" % (pn,pv,uri)) + bb.debug("%s-%s: %s has no entry in conf/checksums.ini, not checking URI" % (pn,pv,uri)) except Exception: raise bb.build.FuncFailed("Checksum of '%s' failed" % uri) } -- cgit v1.2.3