From 1e677d83dfd89840777e5e458e384df1a2d8bfab Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 7 Mar 2007 23:02:23 +0000 Subject: tinderclient.bbclass: Add hacky workaround for bitbake 1.8.x (pending rewrite in 1.9) --- classes/tinderclient.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'classes') diff --git a/classes/tinderclient.bbclass b/classes/tinderclient.bbclass index 3f5183cc8f..d1d9f49fac 100644 --- a/classes/tinderclient.bbclass +++ b/classes/tinderclient.bbclass @@ -371,6 +371,10 @@ addhandler tinderclient_eventhandler python tinderclient_eventhandler() { from bb import note, error, data from bb.event import NotHandled + + if e.data is None: + return NotHandled + do_tinder_report = data.getVar('TINDER_REPORT', e.data, True) if do_tinder_report and do_tinder_report == "1": tinder_do_tinder_report(e) -- cgit v1.2.3 From 0c6a9f2f931c65df90763850e9b30bb0d913e498 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Fri, 9 Mar 2007 20:29:00 +0000 Subject: classes/insane.bbclass: Use split and make it work with python2.3 again rsplit was introduced in python 2.4 and is like split but starts to split from the right side. The only difference is obviously if you have maxsplit set (which we don't). So it is fine to remove the 'r' --- classes/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index a3ca21d1dc..40f6151f08 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -206,7 +206,7 @@ def package_qa_check_rpath(file,name,d): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") output = os.popen("%s -Byr %s" % (scanelf,file)) - txt = output.readline().rsplit() + txt = output.readline().split() if bad_dir in txt: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, txt, file)) -- cgit v1.2.3 From 21e7506f34e5cc2fc0667ecab73202422f7225cd Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 10 Mar 2007 00:28:54 +0000 Subject: classes/seppuku.bbclass: Switch to HTTP post, attach the build logs instead of using comments The limit of comments is too low. Use attachments to work around this issue. Also start using HTTP post to avoid really long URLs. They lead to a pipe error. To post we use a MultiPartPoster which is licensed LGPL and can be freely downloaded. You need to put it into the PYTHONPATH Add a new variable for creating attachments and document it. --- classes/seppuku.bbclass | 111 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 95 insertions(+), 16 deletions(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 5757df7efb..8d5e234c49 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -5,6 +5,23 @@ # This class requires python2.4 because of the urllib2 usage # +def seppuku_spliturl(url): + """ + Split GET URL to return the host base and the query + as a param dictionary + """ + import urllib + (uri,query) = urllib.splitquery(url) + param = {} + for par in query.split("&"): + (key,value) = urllib.splitvalue(par) + key = urllib.unquote(key) + value = urllib.unquote(value) + param[key] = value + + return (uri,param) + + def seppuku_login(opener, login, user, password): """ @@ -109,7 +126,7 @@ def seppuku_find_bug_report(opener, query, product, component, bugname): (number,status) = scanner.result()[0] return (not status in ["CLOS", "RESO", "VERI"],number) -def seppuku_reopen_bug(opener, file, product, component, bug_number, bugname, text): +def seppuku_reopen_bug(poster, file, product, component, bug_number, bugname, text): """ Reopen a bug report and append to the comment @@ -118,22 +135,34 @@ def seppuku_reopen_bug(opener, file, product, component, bug_number, bugname, te http://bugzilla.openmoko.org/cgi-bin/bugzilla/process_bug.cgi?id=239&bug_file_loc=http%3A%2F%2F&version=2007&longdesclength=2&product=OpenMoko&component=autobuilds&comment=bla&priority=P2&bug_severity=normal&op_sys=Linux&rep_platform=Neo1973&knob=reopen&target_milestone=Phase+0&short_desc=foo """ - import urllib, urllib2 - param = urllib.urlencode( { "product" : product, "component" : component, "longdesclength" : 2, - "short_desc" : bugname, "knob" : "reopen", "id" : bug_number, "comment" : text } ) + import urllib2 + (uri, param) = seppuku_spliturl( file ) + + # Prepare the post + param["product"] = product + param["component"] = component + param["longdesclength"] = 2 + param["short_desc"] = bugname + param["knob"] = "reopen" + param["id"] = bug_number + param["comment"] = text + try: - result = opener.open( file + param ) + result = poster.open( uri, param ) except urllib2.HTTPError, e: print e.geturl() print e.info() return False + except Exception, e: + print e + return False if result.code != 200: return False else: return True -def seppuku_file_bug(opener, file, product, component, bugname, text): +def seppuku_file_bug(poster, file, product, component, bugname, text): """ Create a completely new bug report @@ -150,14 +179,21 @@ def seppuku_file_bug(opener, file, product, component, bugname, text): @param text Text """ - import urllib,urllib2 - param = urllib.urlencode( { "product" : product, "component" : component, "short_desc" : bugname, "comment" : text } ) + import urllib2 + (uri, param) = seppuku_spliturl( file ) + param["product"] = product + param["component"] = component + param["short_desc"] = bugname + param["comment"] = text + try: - result = opener.open( file + param ) + result = poster.open( uri, param ) except urllib2.HTTPError, e: print e.geturl() print e.info() - raise e + return False + except Exception, e: + print e return False if result.code != 200: @@ -165,6 +201,35 @@ def seppuku_file_bug(opener, file, product, component, bugname, text): else: return True +def seppuku_create_attachment(poster, attach_query, product, component, bug_number, text, file): + """ + + Create a new attachment for the failed report + """ + + if not bug_number: + import bb + bb.note("Can't create an attachment, the bug is not present") + return False + + import urllib2 + param = { "bugid" : bug_number, "action" : "insert", "data" : file, "description" : "Build log", "ispatch" : "0", "contenttypemethod" : "list", "contenttypeselection" : "text/plain", "comment" : text } + + try: + result = poster.open( attach_query, param ) + except urllib2.HTTPError, e: + print e.geturl() + print e.info() + return False + except Exception, e: + print e + return False + + print result.read() + if result.code != 200: + return False + else: + return True addhandler seppuku_eventhandler @@ -177,7 +242,12 @@ python seppuku_eventhandler() { from bb import data, mkdirhier, build import bb, os, glob - bb.note( "Ran" ) + # Try to load our exotic libraries + try: + import MultipartPostHandler + except: + bb.note("You need to put the MultipartPostHandler into your PYTHONPATH. Download it from http://pipe.scs.fsu.edu/PostHandler/MultipartPostHandler.py") + return NotHandled try: import urllib2, cookielib @@ -194,10 +264,12 @@ python seppuku_eventhandler() { elif name == "TaskFailed" or name == "NoProvider": cj = cookielib.CookieJar() opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj)) + poster = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj),MultipartPostHandler.MultipartPostHandler) login = bb.data.getVar("SEPPUKU_LOGIN", data, True) query = bb.data.getVar("SEPPUKU_QUERY", data, True) newbug = bb.data.getVar("SEPPUKU_NEWREPORT", data, True) reopen = bb.data.getVar("SEPPUKU_ADDCOMMENT", data, True) + attach = bb.data.getVar("SEPPUKU_ATTACHMENT", data, True) user = bb.data.getVar("SEPPUKU_USER", data, True) passw = bb.data.getVar("SEPPUKU_PASS", data, True) product = bb.data.getVar("SEPPUKU_PRODUCT", data, True) @@ -215,12 +287,12 @@ python seppuku_eventhandler() { "pr" : bb.data.getVar("PR", data, True), "task" : e.task } log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task)) - if len(log_file) != 0: - to_file = bb.data.getVar('TINDER_LOG', event.data, True) - text = "".join(open(log_file[0], 'r').readlines()) + text = "The package failed to build at %s" % bb.data.getVar('DATETIME', data, True) + file = open(log_file[0], 'r') elif name == "NoProvider": bugname = "noprovider for %s runtime: %s" % (event.getItem, event.getisRuntime) text = "Please fix it" + file = None else: assert False @@ -234,10 +306,17 @@ python seppuku_eventhandler() { return NotHandled if bug_number and not bug_open: - if not seppuku_reopen_bug(opener, reopen, product, component, bug_number, bugname, text): + if not seppuku_reopen_bug(poster, reopen, product, component, bug_number, bugname, text): bb.note("Failed to reopen the bug report") - elif not seppuku_file_bug(opener, newbug, product, component, bugname, text): + elif not seppuku_file_bug(poster, newbug, product, component, bugname, text): bb.note("Filing a bugreport failed") + else: + # get the new bug number and create an attachment + (bug_open, bug_number) = seppuku_find_bug_report(opener, query, product, component, bugname) + + if file: + if not seppuku_create_attachment(poster, attach, product, component, bug_number, text, file): + bb.note("Failed to attach the build log") return NotHandled } -- cgit v1.2.3 From 1b661974e3f8f844f6ec4cdb7bb42cef9595b626 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Sat, 10 Mar 2007 14:10:06 +0000 Subject: own-mirrors.bbclass: added class which can be used to set PREMIRRORS from config - SOURCE_MIRROR_URL is new variable which point to source mirror which will be used before fetching from original SRC_URI location. --- classes/own-mirrors.bbclass | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 classes/own-mirrors.bbclass (limited to 'classes') diff --git a/classes/own-mirrors.bbclass b/classes/own-mirrors.bbclass new file mode 100644 index 0000000000..32763ed24f --- /dev/null +++ b/classes/own-mirrors.bbclass @@ -0,0 +1,4 @@ +PREMIRRORS() { +http://.*/.* ${SOURCE_MIRROR_URL} +ftp://.*/.* ${SOURCE_MIRROR_URL} +} -- cgit v1.2.3 From bd13294b484455566e38dc333eb2f098b90cef09 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 10 Mar 2007 20:12:18 +0000 Subject: opie.bbclass: Allow OPIE_CVS_PV to be overriden. --- classes/opie.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/opie.bbclass b/classes/opie.bbclass index c3b9d13226..92cde5487b 100644 --- a/classes/opie.bbclass +++ b/classes/opie.bbclass @@ -15,7 +15,7 @@ inherit palmtop -OPIE_CVS_PV = "1.2.2+cvs${SRCDATE}" +OPIE_CVS_PV ?= "1.2.2+cvs${SRCDATE}" DEPENDS_prepend = "${@["libopie2 ", ""][(bb.data.getVar('PN', d, 1) == 'libopie2')]}" -- cgit v1.2.3 From 2b6c35cc5513a15159e06bd558cf3e84eac146fd Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Thu, 15 Mar 2007 07:32:35 +0000 Subject: insane.bbclass: Add support for sh4. --- classes/insane.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 40f6151f08..1f20fa6614 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -48,6 +48,7 @@ def package_qa_get_machine_dict(): "m68k": ( 4, 0, 0, False, True), "mips": ( 8, 0, 0, False, True), "s390": (22, 0, 0, False, True), + "sh4": (42, 0, 0, True, True), "sparc": ( 2, 0, 0, False, True), }, "linux-uclibc" : { -- cgit v1.2.3 From bff6ed820186d8af5cbe59930f61013d489ad732 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Fri, 16 Mar 2007 20:16:31 +0000 Subject: classes/seppuku.bbclass: Make parsing of OpenEmbedded's bugtracker work OE's bugtracker has different classes for the buglist. I try hard to parse them all. All severities should be handled. --- classes/seppuku.bbclass | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 8d5e234c49..7962cfbeb9 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -65,10 +65,13 @@ def seppuku_find_bug_report_old(): HTMLParser.__init__(self) self.state = self.STATE_NONE self.bugs = [] + self.bug = None def handle_starttag(self, tag, attr): if self.state == self.STATE_NONE and tag.lower() == "tr": - if len(attr) == 1 and attr[0] == ('class', 'bz_normal bz_P2 '): + if len(attr) == 1 and attr[0][0] == 'class' and \ + ('bz_normal' in attr[0][1] or 'bz_blocker' in attr[0][1] or 'bz_enhancement' in attr[0][1] or 'bz_major' in attr[0][1] or 'bz_minor' in attr[0][1] or 'bz_trivial' in attr[0][1] or 'bz_critical' in attr[0][1] or 'bz_wishlist' in attr[0][1]) \ + and 'bz_P' in attr[0][1]: self.state = self.STATE_FOUND_TR elif self.state == self.STATE_FOUND_TR and tag.lower() == "td": self.state += 1 @@ -78,6 +81,7 @@ def seppuku_find_bug_report_old(): if self.state != self.STATE_NONE: self.bugs.append( (self.bug,self.status) ) self.state = self.STATE_NONE + self.bug = None if self.state > 1 and tag.lower() == "td": self.state += 1 @@ -89,7 +93,11 @@ def seppuku_find_bug_report_old(): return if self.state == self.STATE_FOUND_NUMBER: - self.bug = data + """ + #1995 in bugs.oe.org has [SEC] additionally to the number and we want to ignore it + """ + if not self.bug: + self.bug = data elif self.state == self.STATE_FOUND_STATUS: self.status = data -- cgit v1.2.3 From 1977f9a109dac503efc20651adde01c28a92fd4f Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Fri, 16 Mar 2007 21:06:47 +0000 Subject: classes/seppuku.bbclass: Make it work with OpenEmbedded bugtracker Do not error out on python2.5 when splitting the url. We had an empty key and a none value. If there was no output file, do not error. This check is the same as in tinderclient.bbclass --- classes/seppuku.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 7962cfbeb9..4c0d4f9a82 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -15,6 +15,8 @@ def seppuku_spliturl(url): param = {} for par in query.split("&"): (key,value) = urllib.splitvalue(par) + if not key or len(key) == 0 or not value: + continue key = urllib.unquote(key) value = urllib.unquote(value) param[key] = value @@ -289,6 +291,7 @@ python seppuku_eventhandler() { else: print "Logged into the box" + file = None if name == "TaskFailed": bugname = "%(package)s-%(pv)s-%(pr)s-%(task)s" % { "package" : bb.data.getVar("PN", data, True), "pv" : bb.data.getVar("PV", data, True), @@ -296,11 +299,11 @@ python seppuku_eventhandler() { "task" : e.task } log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task)) text = "The package failed to build at %s" % bb.data.getVar('DATETIME', data, True) - file = open(log_file[0], 'r') + if len(log_file) != 0: + file = open(log_file[0], 'r') elif name == "NoProvider": bugname = "noprovider for %s runtime: %s" % (event.getItem, event.getisRuntime) text = "Please fix it" - file = None else: assert False -- cgit v1.2.3 From 5fb7f282ceab4ad5655ef46c04d14fc51bc4c245 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Sun, 18 Mar 2007 23:27:28 +0000 Subject: foonas: Move image-stuff to classes for lsppchg, lsppchd, n2100 and turbostation --- classes/lsppchd-image.bbclass | 1 + classes/lsppchg-image.bbclass | 1 + classes/n2100-image.bbclass | 36 ++++++++++++++++++++++++++++++++++++ classes/turbostation-image.bbclass | 35 +++++++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 classes/lsppchd-image.bbclass create mode 100644 classes/lsppchg-image.bbclass create mode 100644 classes/n2100-image.bbclass create mode 100644 classes/turbostation-image.bbclass (limited to 'classes') diff --git a/classes/lsppchd-image.bbclass b/classes/lsppchd-image.bbclass new file mode 100644 index 0000000000..da280551d4 --- /dev/null +++ b/classes/lsppchd-image.bbclass @@ -0,0 +1 @@ +IMAGE_POSTPROCESS_COMMAND += "" diff --git a/classes/lsppchg-image.bbclass b/classes/lsppchg-image.bbclass new file mode 100644 index 0000000000..da280551d4 --- /dev/null +++ b/classes/lsppchg-image.bbclass @@ -0,0 +1 @@ +IMAGE_POSTPROCESS_COMMAND += "" diff --git a/classes/n2100-image.bbclass b/classes/n2100-image.bbclass new file mode 100644 index 0000000000..811b1d37b7 --- /dev/null +++ b/classes/n2100-image.bbclass @@ -0,0 +1,36 @@ +DEPENDS += "openssl-native" +EXTRA_IMAGECMD = "--little-endian" +ERASEBLOCK_SIZE = "0x20000" +IMAGE_FSTYPES = "jffs2" +IMAGE_POSTPROCESS_COMMAND += '${MACHINE}_pack_image;' + +n2100_pack_image() { + # find latest kernel + KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/zImage* | tail -1` + if [ -z "$KERNEL" ]; then + oefatal "No kernel found in ${DEPLOY_DIR_IMAGE}. Bitbake linux to create one." + exit 1 + fi + ROOTFS=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 + OUTPUT=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flash.img + PADFILE=${DEPLOY_DIR_IMAGE}/padfile.zzz + HEX_MAX_KERN_SIZE=1C0000 + DEC_MAX_KERN_SIZE=`echo "ibase=16; $HEX_MAX_KERN_SIZE" | bc ` + HEX_MAX_ROOT_SIZE=DC0000 + DEC_MAX_ROOT_SIZE=`echo "ibase=16; $HEX_MAX_ROOT_SIZE" | bc ` + KERNEL_SIZE=`ls -l $KERNEL | awk '{print $5}'` + if [ $KERNEL_SIZE -gt $DEC_MAX_KERN_SIZE ]; then + oefatal "Kernel too large at $KERNEL_SIZE bytes. Max is $DEC_MAX_KERN_SIZE." + exit 1 + fi + ROOT_SIZE=`ls -l $ROOTFS | awk '{print $5}'` + if [ $ROOT_SIZE -gt $DEC_MAX_ROOT_SIZE ]; then + oefatal "Rootfs is too large at $ROOT_SIZE bytes. Max is $DEC_MAX_ROOT_SIZE." + exit 1 + fi + PAD_SIZE=`echo "$DEC_MAX_KERN_SIZE - $KERNEL_SIZE" | bc ` + dd if=/dev/zero of=$PADFILE bs=$PAD_SIZE count=1 2>>/dev/null + cat $KERNEL $PADFILE $ROOTFS > $OUTPUT + rm -f $PADFILE + ls -l $OUTPUT +} diff --git a/classes/turbostation-image.bbclass b/classes/turbostation-image.bbclass new file mode 100644 index 0000000000..d82e3996d5 --- /dev/null +++ b/classes/turbostation-image.bbclass @@ -0,0 +1,35 @@ +EXTRA_IMAGECMD = "--big-endian" +ERASEBLOCK_SIZE = "0x20000" +IMAGE_FSTYPES = "jffs2" +IMAGE_POSTPROCESS_COMMAND += '${MACHINE}_pack_image;' + +turbostation_pack_image() { + # find latest kernel + KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/uImage* | tail -1` + if [ -z "$KERNEL" ]; then + oefatal "No kernel found in ${DEPLOY_DIR_IMAGE}. Bitbake linux-turbostation to create one." + exit 1 + fi + ROOTFS=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 + OUTPUT=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flash.img + PADFILE=${DEPLOY_DIR_IMAGE}/padfile.zzz + HEX_MAX_KERN_SIZE=200000 + DEC_MAX_KERN_SIZE=`echo "ibase=16; $HEX_MAX_KERN_SIZE" | bc ` + HEX_MAX_ROOT_SIZE=D00000 + DEC_MAX_ROOT_SIZE=`echo "ibase=16; $HEX_MAX_ROOT_SIZE" | bc ` + KERNEL_SIZE=`ls -l $KERNEL | awk '{print $5}'` + if [ $KERNEL_SIZE -gt $DEC_MAX_KERN_SIZE ]; then + oefatal "Kernel too large at $KERNEL_SIZE bytes. Max is $DEC_MAX_KERN_SIZE." + exit 1 + fi + ROOT_SIZE=`ls -l $ROOTFS | awk '{print $5}'` + if [ $ROOT_SIZE -gt $DEC_MAX_ROOT_SIZE ]; then + oefatal "Rootfs is too large at $ROOT_SIZE bytes. Max is $DEC_MAX_ROOT_SIZE." + exit 1 + fi + PAD_SIZE=`echo "$DEC_MAX_KERN_SIZE - $KERNEL_SIZE" | bc ` + dd if=/dev/zero of=$PADFILE bs=$PAD_SIZE count=1 2>>/dev/null + cat $KERNEL $PADFILE $ROOTFS > $OUTPUT + rm -f $PADFILE + ls -l $OUTPUT +} -- cgit v1.2.3 From cf2e14f1d29dfc2fdcbd0302f94c816b1b927d49 Mon Sep 17 00:00:00 2001 From: Justin Patrin Date: Mon, 19 Mar 2007 05:12:25 +0000 Subject: e.bbclass: remove include hack, add -dev package --- classes/e.bbclass | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/e.bbclass b/classes/e.bbclass index f20c1f8b60..59f2771027 100644 --- a/classes/e.bbclass +++ b/classes/e.bbclass @@ -22,11 +22,12 @@ export ESMART_CONFIG = "${STAGING_BINDIR_CROSS}/esmart-config" export FREETYPE_CONFIG = "${STAGING_BINDIR_CROSS}/freetype-config" export IMLIB2_CONFIG = "${STAGING_BINDIR_CROSS}/imlib2-config" -do_compile_prepend() { - find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:' - find ${S} -name Makefile | xargs sed -i 's:/usr/X11R6/include:${STAGING_INCDIR}:' -} +#do_compile_prepend() { +# find ${S} -name Makefile | xargs sed -i 's:/usr/include:${STAGING_INCDIR}:' +# find ${S} -name Makefile | xargs sed -i 's:/usr/X11R6/include:${STAGING_INCDIR}:' +#} -PACKAGES = "${PN}-dbg ${PN} ${PN}-themes" +PACKAGES = "${PN}-dbg ${PN} ${PN}-themes ${PN}-dev" FILES_${PN} = "${libdir}/lib*.so*" FILES_${PN}-themes = "${datadir}/${PN}/themes ${datadir}/${PN}/data ${datadir}/${PN}/fonts ${datadir}/${PN}/pointers ${datadir}/${PN}/images ${datadir}/${PN}/users ${datadir}/${PN}/images ${datadir}/${PN}/styles" +FILES_${PN}-dev += "${includedir}" \ No newline at end of file -- cgit v1.2.3 From a36eda03cab7dcd78872e03077dddca2aac3499c Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Tue, 20 Mar 2007 19:42:53 +0000 Subject: n2100, turbostation, linkstation: Move machine-stuff out of classes --- classes/lsppchd-image.bbclass | 4 +++- classes/lsppchg-image.bbclass | 4 +++- classes/n2100-image.bbclass | 6 ------ classes/turbostation-image.bbclass | 5 ----- 4 files changed, 6 insertions(+), 13 deletions(-) (limited to 'classes') diff --git a/classes/lsppchd-image.bbclass b/classes/lsppchd-image.bbclass index da280551d4..6aab20127a 100644 --- a/classes/lsppchd-image.bbclass +++ b/classes/lsppchd-image.bbclass @@ -1 +1,3 @@ -IMAGE_POSTPROCESS_COMMAND += "" +lsppchd_pack_image() { +: +} \ No newline at end of file diff --git a/classes/lsppchg-image.bbclass b/classes/lsppchg-image.bbclass index da280551d4..5d9da87c7d 100644 --- a/classes/lsppchg-image.bbclass +++ b/classes/lsppchg-image.bbclass @@ -1 +1,3 @@ -IMAGE_POSTPROCESS_COMMAND += "" +lsppchg_pack_image() { +: +} \ No newline at end of file diff --git a/classes/n2100-image.bbclass b/classes/n2100-image.bbclass index 811b1d37b7..519be213d5 100644 --- a/classes/n2100-image.bbclass +++ b/classes/n2100-image.bbclass @@ -1,9 +1,3 @@ -DEPENDS += "openssl-native" -EXTRA_IMAGECMD = "--little-endian" -ERASEBLOCK_SIZE = "0x20000" -IMAGE_FSTYPES = "jffs2" -IMAGE_POSTPROCESS_COMMAND += '${MACHINE}_pack_image;' - n2100_pack_image() { # find latest kernel KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/zImage* | tail -1` diff --git a/classes/turbostation-image.bbclass b/classes/turbostation-image.bbclass index d82e3996d5..e61ffc825b 100644 --- a/classes/turbostation-image.bbclass +++ b/classes/turbostation-image.bbclass @@ -1,8 +1,3 @@ -EXTRA_IMAGECMD = "--big-endian" -ERASEBLOCK_SIZE = "0x20000" -IMAGE_FSTYPES = "jffs2" -IMAGE_POSTPROCESS_COMMAND += '${MACHINE}_pack_image;' - turbostation_pack_image() { # find latest kernel KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/uImage* | tail -1` -- cgit v1.2.3 From 7263517b3939ba055d443a0ecbaf5ef9a3e91c38 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Wed, 21 Mar 2007 10:36:45 +0000 Subject: storcenter: Add storcenter-image.bbclass --- classes/storcenter-image.bbclass | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 classes/storcenter-image.bbclass (limited to 'classes') diff --git a/classes/storcenter-image.bbclass b/classes/storcenter-image.bbclass new file mode 100644 index 0000000000..de77f1b417 --- /dev/null +++ b/classes/storcenter-image.bbclass @@ -0,0 +1,30 @@ +storcenter_pack_image() { + # find latest kernel + KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/uImage* | tail -1` + if [ -z "$KERNEL" ]; then + oefatal "No kernel found in ${DEPLOY_DIR_IMAGE}. Bitbake linux-storcenter to create one." + exit 1 + fi + ROOTFS=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 + OUTPUT=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.flash.img + PADFILE=${DEPLOY_DIR_IMAGE}/padfile.zzz + HEX_MAX_KERN_SIZE=170000 + DEC_MAX_KERN_SIZE=`echo "ibase=16; $HEX_MAX_KERN_SIZE" | bc ` + HEX_MAX_ROOT_SIZE=590000 + DEC_MAX_ROOT_SIZE=`echo "ibase=16; $HEX_MAX_ROOT_SIZE" | bc ` + KERNEL_SIZE=`ls -l $KERNEL | awk '{print $5}'` + if [ $KERNEL_SIZE -gt $DEC_MAX_KERN_SIZE ]; then + oefatal "Kernel too large at $KERNEL_SIZE bytes. Max is $DEC_MAX_KERN_SIZE." + exit 1 + fi + ROOT_SIZE=`ls -l $ROOTFS | awk '{print $5}'` + if [ $ROOT_SIZE -gt $DEC_MAX_ROOT_SIZE ]; then + oefatal "Rootfs is too large at $ROOT_SIZE bytes. Max is $DEC_MAX_ROOT_SIZE." + exit 1 + fi + PAD_SIZE=`echo "$DEC_MAX_KERN_SIZE - $KERNEL_SIZE" | bc ` + dd if=/dev/zero of=$PADFILE bs=$PAD_SIZE count=1 2>>/dev/null + cat $KERNEL $PADFILE $ROOTFS > $OUTPUT + rm -f $PADFILE + ls -l $OUTPUT +} -- cgit v1.2.3 From a11b05312d81a8ccabd4c8c93de0741d03df8190 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Sat, 24 Mar 2007 10:54:11 +0000 Subject: image.bbclass: Removed wildcard rm as it broke building multiple rootfs image types. --- classes/image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/image.bbclass b/classes/image.bbclass index 5055b5b987..4f870915d0 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -93,7 +93,7 @@ fakeroot do_rootfs () { fi cd ${DEPLOY_DIR_IMAGE}/ - rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.* + rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type ln -s ${IMAGE_NAME}.rootfs.$type ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.$type done -- cgit v1.2.3 From 80e03c31786137c4d72eed1da9f7da7b70434929 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Sun, 25 Mar 2007 05:15:37 +0000 Subject: nslu2-image.bbclass: Made operation conditional upon an nslu2 override. --- classes/nslu2-image.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/nslu2-image.bbclass b/classes/nslu2-image.bbclass index e1af34fa57..14bf989055 100644 --- a/classes/nslu2-image.bbclass +++ b/classes/nslu2-image.bbclass @@ -16,5 +16,5 @@ nslu2_pack_image () { rm -rf ${DEPLOY_DIR_IMAGE}/slug } -EXTRA_IMAGEDEPENDS += 'slugimage-native nslu2-linksys-firmware ixp4xx-npe upslug2-native' -IMAGE_POSTPROCESS_COMMAND += "nslu2_pack_image; " +EXTRA_IMAGEDEPENDS_nslu2 += 'slugimage-native nslu2-linksys-firmware ixp4xx-npe upslug2-native' +IMAGE_POSTPROCESS_COMMAND_nslu2 += "nslu2_pack_image; " -- cgit v1.2.3 From 48c9a98908284963902fc29b4c47aed668bd5432 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Mon, 26 Mar 2007 23:07:52 +0000 Subject: update n2100, lsppchg and lspphcd images --- classes/lsppchd-image.bbclass | 7 ++++++- classes/lsppchg-image.bbclass | 7 ++++++- classes/n2100-image.bbclass | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/lsppchd-image.bbclass b/classes/lsppchd-image.bbclass index 6aab20127a..bb150c7e15 100644 --- a/classes/lsppchd-image.bbclass +++ b/classes/lsppchd-image.bbclass @@ -1,3 +1,8 @@ +IMAGE_PREPROCESS_COMMAND_lsppchd += "export KPATH=`ls -tr ${IMAGE_ROOTFS}/boot/uImage-* | tail -1`; ln -sf /boot/${KPATH##*/} ${IMAGE_ROOTFS}/boot/uImage;" +IMAGE_PREPROCESS_COMMAND_lsppchd += "sed -i -es,^id:5:initdefault:,id:3:initdefault:, ${IMAGE_ROOTFS}/etc/inittab;" +IMAGE_PREPROCESS_COMMAND_lsppchd += "sed -i -es,^root::0,root:BTMzOOAQfESg6:0, ${IMAGE_ROOTFS}/etc/passwd;" +IMAGE_PREPROCESS_COMMAND_lsppchd += "sed -i -es,^VERBOSE=no,VERBOSE=very, ${IMAGE_ROOTFS}/etc/default/rcS;" + lsppchd_pack_image() { : -} \ No newline at end of file +} diff --git a/classes/lsppchg-image.bbclass b/classes/lsppchg-image.bbclass index 5d9da87c7d..9ad0801fe3 100644 --- a/classes/lsppchg-image.bbclass +++ b/classes/lsppchg-image.bbclass @@ -1,3 +1,8 @@ +IMAGE_PREPROCESS_COMMAND_lsppchg += "export KPATH=`ls -tr ${IMAGE_ROOTFS}/boot/uImage-* | tail -1`; ln -sf /boot/${KPATH##*/} ${IMAGE_ROOTFS}/boot/uImage;" +IMAGE_PREPROCESS_COMMAND_lsppchg += "sed -i -es,^id:5:initdefault:,id:3:initdefault:, ${IMAGE_ROOTFS}/etc/inittab;" +IMAGE_PREPROCESS_COMMAND_lsppchg += "sed -i -es,^root::0,root:BTMzOOAQfESg6:0, ${IMAGE_ROOTFS}/etc/passwd;" +IMAGE_PREPROCESS_COMMAND_lsppchg += "sed -i -es,^VERBOSE=no,VERBOSE=very, ${IMAGE_ROOTFS}/etc/default/rcS;" + lsppchg_pack_image() { : -} \ No newline at end of file +} diff --git a/classes/n2100-image.bbclass b/classes/n2100-image.bbclass index 519be213d5..393efae7e1 100644 --- a/classes/n2100-image.bbclass +++ b/classes/n2100-image.bbclass @@ -26,5 +26,5 @@ n2100_pack_image() { dd if=/dev/zero of=$PADFILE bs=$PAD_SIZE count=1 2>>/dev/null cat $KERNEL $PADFILE $ROOTFS > $OUTPUT rm -f $PADFILE - ls -l $OUTPUT + ls -l $OUTPUT } -- cgit v1.2.3 From 0bb019850b4d6e84a81c4b06485280a02e1b5a72 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Thu, 29 Mar 2007 12:48:15 +0000 Subject: package_ipk.bbclass: add epoch support --- classes/package_ipk.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index 70bcdf6b7f..19c082d978 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -142,7 +142,11 @@ python do_package_ipk () { raise bb.build.FuncFailed("unable to open control file for writing.") fields = [] - fields.append(["Version: %s-%s\n", ['PV', 'PR']]) + pe = bb.data.getVar('PE', d, 1) + if pe and int(pe) > 0: + fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']]) + else: + fields.append(["Version: %s-%s\n", ['PV', 'PR']]) fields.append(["Description: %s\n", ['DESCRIPTION']]) fields.append(["Section: %s\n", ['SECTION']]) fields.append(["Priority: %s\n", ['PRIORITY']]) -- cgit v1.2.3 From fa30c973cc72f69f469bfcffb210069ee443351b Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 29 Mar 2007 12:50:18 +0000 Subject: package.bbclass: added support for private libraries (used only in package) - if package contain libraries which are not used outside then add PRIVATE_LIBS variable with names of them to not generate shlibs for them. --- classes/package.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/package.bbclass b/classes/package.bbclass index 07fdb7f890..19c206ae5e 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -573,6 +573,7 @@ python package_do_shlibs() { bb.mkdirhier(shlibs_dir) needed = {} + private_libs = bb.data.getVar('PRIVATE_LIBS', d, 1) for pkg in packages.split(): needs_ldconfig = False bb.debug(2, "calculating shlib provides for %s" % pkg) @@ -596,7 +597,9 @@ python package_do_shlibs() { needed[pkg].append(m.group(1)) m = re.match("\s+SONAME\s+([^\s]*)", l) if m and not m.group(1) in sonames: - sonames.append(m.group(1)) + # if library is private (only used by package) then do not build shlib for it + if private_libs == '' or -1 == private_libs.find(m.group(1)): + sonames.append(m.group(1)) if m and libdir_re.match(root): needs_ldconfig = True shlibs_file = os.path.join(shlibs_dir, pkg + ".list") -- cgit v1.2.3 From 7ca9b39e2634a00c8af78f84f14fca369d946811 Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Thu, 29 Mar 2007 12:57:43 +0000 Subject: package_deb.bbclass: add epoch support --- classes/package_deb.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index 9697426d5d..388f9819bd 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -138,7 +138,11 @@ python do_package_deb () { raise bb.build.FuncFailed("unable to open control file for writing.") fields = [] - fields.append(["Version: %s-%s\n", ['PV', 'PR']]) + pe = bb.data.getVar('PE', d, 1) + if pe and int(pe) > 0: + fields.append(["Version: %s:%s-%s\n", ['PE', 'PV', 'PR']]) + else: + fields.append(["Version: %s-%s\n", ['PV', 'PR']]) fields.append(["Description: %s\n", ['DESCRIPTION']]) fields.append(["Section: %s\n", ['SECTION']]) fields.append(["Priority: %s\n", ['PRIORITY']]) -- cgit v1.2.3 From 5c164a27251aa8be7cbb8916a13919052387c3bd Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 29 Mar 2007 13:25:19 +0000 Subject: package.bbclass: fix build problem related to private libs --- classes/package.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/package.bbclass b/classes/package.bbclass index 19c206ae5e..3e80b2b31c 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -598,7 +598,7 @@ python package_do_shlibs() { m = re.match("\s+SONAME\s+([^\s]*)", l) if m and not m.group(1) in sonames: # if library is private (only used by package) then do not build shlib for it - if private_libs == '' or -1 == private_libs.find(m.group(1)): + if not private_libs or -1 == private_libs.find(m.group(1)): sonames.append(m.group(1)) if m and libdir_re.match(root): needs_ldconfig = True -- cgit v1.2.3 From 53b0ca70e6584fff074ade5bff2863a1bc3c7840 Mon Sep 17 00:00:00 2001 From: Oyvind Repvik Date: Fri, 30 Mar 2007 16:15:03 +0000 Subject: n2100, turbostation, lsppc: Update image --- classes/lsppchd-image.bbclass | 2 ++ classes/lsppchg-image.bbclass | 2 ++ classes/n2100-image.bbclass | 2 ++ classes/turbostation-image.bbclass | 2 ++ 4 files changed, 8 insertions(+) (limited to 'classes') diff --git a/classes/lsppchd-image.bbclass b/classes/lsppchd-image.bbclass index bb150c7e15..cb13222d64 100644 --- a/classes/lsppchd-image.bbclass +++ b/classes/lsppchd-image.bbclass @@ -6,3 +6,5 @@ IMAGE_PREPROCESS_COMMAND_lsppchd += "sed -i -es,^VERBOSE=no,VERBOSE=very, ${IMAG lsppchd_pack_image() { : } + +IMAGE_POSTPROCESS_COMMAND += "lsppchd_pack_image; " diff --git a/classes/lsppchg-image.bbclass b/classes/lsppchg-image.bbclass index 9ad0801fe3..553414224d 100644 --- a/classes/lsppchg-image.bbclass +++ b/classes/lsppchg-image.bbclass @@ -6,3 +6,5 @@ IMAGE_PREPROCESS_COMMAND_lsppchg += "sed -i -es,^VERBOSE=no,VERBOSE=very, ${IMAG lsppchg_pack_image() { : } + +IMAGE_POSTPROCESS_COMMAND += "lsppchg_pack_image; " diff --git a/classes/n2100-image.bbclass b/classes/n2100-image.bbclass index 393efae7e1..bc6c12e1fb 100644 --- a/classes/n2100-image.bbclass +++ b/classes/n2100-image.bbclass @@ -28,3 +28,5 @@ n2100_pack_image() { rm -f $PADFILE ls -l $OUTPUT } + +IMAGE_POSTPROCESS_COMMAND += "n2100_pack_image; " diff --git a/classes/turbostation-image.bbclass b/classes/turbostation-image.bbclass index e61ffc825b..5a0768c687 100644 --- a/classes/turbostation-image.bbclass +++ b/classes/turbostation-image.bbclass @@ -28,3 +28,5 @@ turbostation_pack_image() { rm -f $PADFILE ls -l $OUTPUT } + +IMAGE_POSTPROCESS_COMMAND += "turbostation_pack_image; " -- cgit v1.2.3 From 74f43656a25639eac79ee7d7e373dfc8c0d92126 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 30 Mar 2007 17:48:05 +0000 Subject: opie.bbclass, palmtop.bbclass: Set FILES_* in palmtop.bbclass, so even opie bootstrap libraries use them. Also, to not neat-pick which files go into FILES_${PN}, just change default order of packages. --- classes/opie.bbclass | 4 ---- classes/palmtop.bbclass | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/opie.bbclass b/classes/opie.bbclass index 92cde5487b..915de890cf 100644 --- a/classes/opie.bbclass +++ b/classes/opie.bbclass @@ -19,10 +19,6 @@ OPIE_CVS_PV ?= "1.2.2+cvs${SRCDATE}" DEPENDS_prepend = "${@["libopie2 ", ""][(bb.data.getVar('PN', d, 1) == 'libopie2')]}" -FILES_${PN}-dbg += " ${palmtopdir}/lib/.debug \ - ${palmtopdir}/bin/.debug \ - ${palmtopdir}/plugins/*/.debug " - # to be consistent, put all targets into workdir # NOTE: leave one space at the end, other files are expecting that EXTRA_QMAKEVARS_POST += "DESTDIR=${S} " diff --git a/classes/palmtop.bbclass b/classes/palmtop.bbclass index b4bd21ab25..39b9bd2b60 100644 --- a/classes/palmtop.bbclass +++ b/classes/palmtop.bbclass @@ -17,4 +17,9 @@ EXTRA_QMAKEVARS_POST += '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "ye EXTRA_QMAKEVARS_POST += "${@["LIBS+=-lqpe ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}" DEPENDS_prepend = "${@["virtual/libqpe1 uicmoc-native ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}" -FILES_${PN} = "${palmtopdir}" +PACKAGES = "${PN}-dbg ${PN}-dev ${PN} ${PN}-doc ${PN}-locale" +FILES_${PN} = " ${palmtopdir} " +FILES_${PN}-dev += " ${palmtopdir}/lib/lib*.so " +FILES_${PN}-dbg += " ${palmtopdir}/lib/.debug \ + ${palmtopdir}/bin/.debug \ + ${palmtopdir}/plugins/*/.debug " -- cgit v1.2.3 From f4a53b765a6801f836586b5ee662b5f9392dcfab Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 31 Mar 2007 15:57:22 +0000 Subject: classes/patch.bbclass: Make sure to raise func_failed on any exception from within Import non existing patches raised a IOError by the md5sum method which was not catched at all and lead bitbake to exit due an unhandled exception. This is bad for all autobuilders. --- classes/patch.bbclass | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'classes') diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 0a7b94cffc..07d18470f7 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -3,10 +3,20 @@ def patch_init(d): import os, sys + class NotFoundError(Exception): + def __init__(self, path): + self.path = path + def __str__(self): + return "Error: %s not found." % self.path + def md5sum(fname): import md5, sys - f = file(fname, 'rb') + try: + f = file(fname, 'rb') + except IOError: + raise NotFoundError(fname) + m = md5.new() while True: d = f.read(8096) @@ -24,11 +34,6 @@ def patch_init(d): def __str__(self): return "Command Error: exit status: %d Output:\n%s" % (self.status, self.output) - class NotFoundError(Exception): - def __init__(self, path): - self.path = path - def __str__(self): - return "Error: %s not found." % self.path def runcmd(args, dir = None): import commands @@ -482,7 +487,7 @@ python patch_do_patch() { bb.note("Applying patch '%s'" % pname) try: patchset.Import({"file":unpacked, "remote":url, "strippath": pnum}, True) - except NotFoundError: + except: import sys raise bb.build.FuncFailed(str(sys.exc_value)) resolver.Resolve() -- cgit v1.2.3 From f995e0a4f5a60f4a1b80449d8eb7f64d0efebfef Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 31 Mar 2007 20:15:44 +0000 Subject: classes/base.bbclass: Add checksum.py code to verify md5/sha256 sums on do_fetch This code uses the checksum.py from contrib/qa/checksum to verify md5sum and sha256 on do_fetch task. This code would even allow to checksum certain local patches. --- classes/base.bbclass | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 53139e19fa..1f1766cf11 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -10,6 +10,60 @@ def base_path_join(a, *p): path += '/' + b return path +# for MD5/SHA handling +def base_chk_load_parser(config_path): + import ConfigParser, os + parser = ConfigParser.ConfigParser() + if not len(parser.read(config_path)) == 1: + raise Exception("Can not open the '%s'" % config_path) + + return parser + +def base_chk_file(parser, pn, pv, src_uri, localpath): + import os + # Try PN-PV-SRC_URI first and then try PN-SRC_URI + # we rely on the get method to create errors + pn_pv_src = "%s-%s-%s" % (pn,pv,src_uri) + pn_src = "%s-%s" % (pn,src_uri) + if parser.has_section(pn_pv_src): + md5 = parser.get(pn_pv_src, "md5") + sha256 = parser.get(pn_pv_src, "sha256") + elif parser.has_section(pn_src): + md5 = parser.get(pn_src, "md5") + sha256 = parser.get(pn_src, "sha256") + else: + return False + #raise Exception("Can not find a section for '%s' '%s' and '%s'" % (pn,pv,src_uri)) + + # md5 and sha256 should be valid now + if not os.path.exists(localpath): + raise Exception("The path does not exist '%s'" % localpath) + + + # call md5(sum) and shasum + try: + md5pipe = os.popen('md5sum ' + localpath) + md5data = (md5pipe.readline().split() or [ "" ])[0] + md5pipe.close() + except OSError: + raise Exception("Executing md5sum failed") + + try: + shapipe = os.popen('shasum -a256 -p ' + localpath) + shadata = (shapipe.readline().split() or [ "" ])[0] + shapipe.close() + except OSError: + raise Exception("Executing shasum failed") + + if not md5 == md5data: + raise Exception("MD5 Sums do not match. Wanted: '%s' Got: '%s'" % (md5, md5data)) + + if not sha256 == shadata: + raise Exception("SHA256 Sums do not match. Wanted: '%s' Got: '%s'" % (sha256, shadata)) + + return True + + def base_dep_prepend(d): import bb; # @@ -402,6 +456,41 @@ python base_do_fetch() { except bb.fetch.FetchError: (type, value, traceback) = sys.exc_info() raise bb.build.FuncFailed("Fetch failed: %s" % value) + except bb.fetch.MD5SumError: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("MD5 failed: %s" % value) + except: + (type, value, traceback) = sys.exc_info() + raise bb.build.FuncFailed("Unknown fetch Error: %s" % value) + + + # Verify the SHA and MD5 sums we have in OE and check what do + # in + check_sum = bb.which(bb.data.getVar('BBPATH', d, True), "conf/checksums.ini") + if not check_sum: + bb.note("No conf/checksums.ini found, not checking checksums") + return + + try: + parser = base_chk_load_parser(ckeck_sum) + except: + bb.note("Creating the CheckSum parser failed") + return + + pv = bb.data.getVar('PV', d, True) + pn = bb.data.getVar('PN', d, True) + + # Check each URI + for url in src_uri.split(): + localpath = bb.fetch.localpath(url,localdata) + (type,host,path,_,_,_) = bb.decodeurl(url) + print type, host, path + uri = "%s://%s%s" % (type,host,path) + try: + if not base_chk_file(parser, pn, pv,uri, localpath): + bb.note("%s-%s-%s has no section, not checking URI" % pn,pv,uri) + except Exception, e: + raise bb.func.FuncFailed("Checksum of '%s' failed", uri) } addtask fetchall after do_fetch -- cgit v1.2.3 From 8e2d1b42f56902f87817efed2a8df169d31014a4 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 31 Mar 2007 20:31:20 +0000 Subject: classes/base.bbclass: Make the checksum code work and test it with file-native conf/checksums.ini: Provide an example on how this can be used --- classes/base.bbclass | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 1f1766cf11..880295fc30 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -12,15 +12,16 @@ def base_path_join(a, *p): # for MD5/SHA handling def base_chk_load_parser(config_path): - import ConfigParser, os + import ConfigParser, os, bb parser = ConfigParser.ConfigParser() if not len(parser.read(config_path)) == 1: + bb.note("Can not open the '%s' ini file" % config_path) raise Exception("Can not open the '%s'" % config_path) return parser def base_chk_file(parser, pn, pv, src_uri, localpath): - import os + import os, bb # Try PN-PV-SRC_URI first and then try PN-SRC_URI # we rely on the get method to create errors pn_pv_src = "%s-%s-%s" % (pn,pv,src_uri) @@ -37,6 +38,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath): # md5 and sha256 should be valid now if not os.path.exists(localpath): + bb.note("The locapath does not exist '%s'" % localpath) raise Exception("The path does not exist '%s'" % localpath) @@ -56,9 +58,11 @@ def base_chk_file(parser, pn, pv, src_uri, localpath): raise Exception("Executing shasum failed") if not md5 == md5data: + bb.note("The MD5Sums did not match. Wanted: '%s' and Got: '%s'" % (md5,md5data)) raise Exception("MD5 Sums do not match. Wanted: '%s' Got: '%s'" % (md5, md5data)) if not sha256 == shadata: + bb.note("The SHA256 Sums do not match. Wanted: '%s' Got: '%s'" % (sha256,shadata)) raise Exception("SHA256 Sums do not match. Wanted: '%s' Got: '%s'" % (sha256, shadata)) return True @@ -472,7 +476,7 @@ python base_do_fetch() { return try: - parser = base_chk_load_parser(ckeck_sum) + parser = base_chk_load_parser(check_sum) except: bb.note("Creating the CheckSum parser failed") return @@ -484,13 +488,12 @@ python base_do_fetch() { for url in src_uri.split(): localpath = bb.fetch.localpath(url,localdata) (type,host,path,_,_,_) = bb.decodeurl(url) - print type, host, path uri = "%s://%s%s" % (type,host,path) try: - if not base_chk_file(parser, pn, pv,uri, localpath): - bb.note("%s-%s-%s has no section, not checking URI" % pn,pv,uri) - except Exception, e: - raise bb.func.FuncFailed("Checksum of '%s' failed", uri) + if not base_chk_file(parser, pn, pv,uri, localpath): + bb.note("%s-%s-%s has no section, not checking URI" % (pn,pv,uri)) + except Exception: + raise bb.build.FuncFailed("Checksum of '%s' failed" % uri) } addtask fetchall after do_fetch -- cgit v1.2.3 From 5c87ad99c417011884ce00518eae54a082761427 Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Sat, 31 Mar 2007 04:19:30 +0000 Subject: insane.bbclass: Support armeb EABI. --- classes/insane.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 1f20fa6614..e5a1cd03d4 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -59,6 +59,7 @@ def package_qa_get_machine_dict(): }, "linux-gnueabi" : { "arm" : (40, 0, 0, True, True), + "armeb" : (40, 0, 0, False, True), }, } -- cgit v1.2.3 From 3cb20b35af93a7b0df80cd0ae87704c73a8c57dc Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Sun, 1 Apr 2007 10:50:27 +0000 Subject: packages/perl/perl_5.8.7.bb: A set of patches to make perl usable on powerpc targets. Thanks to Jamie Lenahan for the help --- classes/cpan.bbclass | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 74bbebf882..a566f0fa42 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -26,6 +26,12 @@ cpan_do_compile () { if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" fi + + if test ${TARGET_ARCH} = "powerpc" ; then + OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" + fi + + oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS } -- cgit v1.2.3 From afc9dea14ffb67902060f32fda79290727b74bec Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sun, 1 Apr 2007 13:20:07 +0000 Subject: classes/base.bbclass: [ftp://ftp.trolltech.com/qt/source/qtopia-core-4.3.0beta.tar.gz] is good enough src_uri as section/groups are unique enough as well. Most of the time (almost always) scoping PN (or PN+PV) is not necessary and in this case the SRC_URI is good enough. Richard thank you for saying the obvious --- classes/base.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 880295fc30..2ea5251609 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -32,6 +32,9 @@ def base_chk_file(parser, pn, pv, src_uri, localpath): elif parser.has_section(pn_src): md5 = parser.get(pn_src, "md5") sha256 = parser.get(pn_src, "sha256") + elif parser.has_section(src_uri): + md5 = parser.get(src_uri, "md5") + sha256 = parser.get(src_uri, "sha256") else: return False #raise Exception("Can not find a section for '%s' '%s' and '%s'" % (pn,pv,src_uri)) -- cgit v1.2.3 From 9ac0b134bc70feb2aa31422df3e4360deebbcedd Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sun, 1 Apr 2007 17:26:11 +0000 Subject: classes/sanity.bblcass: Require shasum since base.bbclass is calling it --- classes/sanity.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index 958ab91fa6..580475a9af 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -86,7 +86,7 @@ def check_sanity(e): if not check_app_exists('${BUILD_PREFIX}g++', e.data): missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk" + required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk shasum" for util in required_utilities.split(): if not check_app_exists( util, e.data ): -- cgit v1.2.3 From 9b6d6f02b176f0080a7352876bd25d4dc3ad5d5c Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sun, 1 Apr 2007 17:31:33 +0000 Subject: classes/sanity.bbclass: md5sum is required as well --- classes/sanity.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index 580475a9af..edef2805d4 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -86,7 +86,7 @@ def check_sanity(e): if not check_app_exists('${BUILD_PREFIX}g++', e.data): missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk shasum" + required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk shasum md5sum" for util in required_utilities.split(): if not check_app_exists( util, e.data ): -- cgit v1.2.3 From 7870e6d52d38140b0789176e98aa658f8e52ed5a Mon Sep 17 00:00:00 2001 From: Philipp Zabel Date: Sun, 1 Apr 2007 21:42:48 +0000 Subject: base.bbclass, sanity.bbclass: use sha256sum instead of shasum -a256 --- classes/base.bbclass | 2 +- classes/sanity.bbclass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 2ea5251609..6f8196cf80 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -54,7 +54,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath): raise Exception("Executing md5sum failed") try: - shapipe = os.popen('shasum -a256 -p ' + localpath) + shapipe = os.popen('sha256sum -b ' + localpath) shadata = (shapipe.readline().split() or [ "" ])[0] shapipe.close() except OSError: diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index edef2805d4..f38644b6cb 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -86,7 +86,7 @@ def check_sanity(e): if not check_app_exists('${BUILD_PREFIX}g++', e.data): missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk shasum md5sum" + required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk sha256sum md5sum" for util in required_utilities.split(): if not check_app_exists( util, e.data ): -- cgit v1.2.3 From 6c93f6c3ad999372433fd112bb6339957f1d2d09 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Mon, 2 Apr 2007 15:52:30 +0000 Subject: classes/openmoko-base.bbclass: add support for inputmethods --- classes/openmoko-base.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/openmoko-base.bbclass b/classes/openmoko-base.bbclass index 35243c9752..8643daa7a4 100644 --- a/classes/openmoko-base.bbclass +++ b/classes/openmoko-base.bbclass @@ -9,6 +9,7 @@ def openmoko_base_get_subdir(d): if section == 'base' or section == 'libs': return "" elif section in 'apps tools pim'.split(): return "applications" elif section == "panel-plugin": return "panel-plugins" + elif section == "inputmethods": return "inputmethods" else: return section SUBDIR = "${@openmoko_base_get_subdir(d)}" -- cgit v1.2.3 From 745c67ffc5c79fe08cd5460ded6317d17517799a Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Mon, 2 Apr 2007 20:42:15 +0000 Subject: classes/base.bbclass: place shasum-native as the first package to build classes/base.bbclass: Make sure shasum-native does not depend on quilt classes/sanity.bbclass: No need to require sha256sum as we use oe_sha256sum packages/shasum: Change the name, make the -native version not have any deps --- classes/base.bbclass | 19 +++++++++++++------ classes/sanity.bbclass | 2 +- 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 6f8196cf80..6011790ebe 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -20,7 +20,7 @@ def base_chk_load_parser(config_path): return parser -def base_chk_file(parser, pn, pv, src_uri, localpath): +def base_chk_file(parser, pn, pv, src_uri, localpath, data): import os, bb # Try PN-PV-SRC_URI first and then try PN-SRC_URI # we rely on the get method to create errors @@ -54,7 +54,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath): raise Exception("Executing md5sum failed") try: - shapipe = os.popen('sha256sum -b ' + localpath) + shapipe = os.popen('PATH=%s oe_sha256sum %s' % (bb.data.getVar('PATH', data, True), localpath)) shadata = (shapipe.readline().split() or [ "" ])[0] shapipe.close() except OSError: @@ -78,16 +78,22 @@ def base_dep_prepend(d): # the case where host == build == target, for now we don't work in # that case though. # - deps = "" + if bb.data.getVar('PN', d, True) == "shasum-native": + deps = "" + else: + deps = "shasum-native " + + # INHIBIT_PATCH_TOOL don't apply the patch tool dependency + inhibit_patch = (bb.data.getVar("INHIBIT_PATCH_TOOL", d, True) == "1") or False # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not # we need that built is the responsibility of the patch function / class, not # the application. patchdeps = bb.data.getVar("PATCHTOOL", d, 1) - if patchdeps: + if patchdeps and not inhibit_patch: patchdeps = "%s-native" % patchdeps if not patchdeps in bb.data.getVar("PROVIDES", d, 1): - deps = patchdeps + deps += patchdeps if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d): if (bb.data.getVar('HOST_SYS', d, 1) != @@ -439,6 +445,7 @@ python base_do_mrproper() { addtask fetch do_fetch[dirs] = "${DL_DIR}" +do_fetch[depends] = "shasum-native:do_populate_staging" python base_do_fetch() { import sys @@ -493,7 +500,7 @@ 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): + 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)) except Exception: raise bb.build.FuncFailed("Checksum of '%s' failed" % uri) diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index f38644b6cb..ec73e0cab7 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -86,7 +86,7 @@ def check_sanity(e): if not check_app_exists('${BUILD_PREFIX}g++', e.data): missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk sha256sum md5sum" + required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum" for util in required_utilities.split(): if not check_app_exists( util, e.data ): -- cgit v1.2.3 From cd0eba2a4ed708a7439b36b3b2f0fef0eb451da2 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 4 Apr 2007 23:06:24 +0000 Subject: meta packages: Create a new class, clean up the code and add correct dependencies for bitbake 1.8 --- classes/meta.bbclass | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 classes/meta.bbclass (limited to 'classes') diff --git a/classes/meta.bbclass b/classes/meta.bbclass new file mode 100644 index 0000000000..f7d41eec26 --- /dev/null +++ b/classes/meta.bbclass @@ -0,0 +1,5 @@ + +PACKAGES = "" + +BUILD_ALL_DEPS = "1" +do_build[recrdeptask] = "do_build" \ No newline at end of file -- cgit v1.2.3 From 6a7674dd3d52c00063b5ec4468a75bfa05ef22bd Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 6 Apr 2007 13:30:27 +0000 Subject: insane.bbclass: short circuit architecture check for cross packages (e.g. gcc-cross-sdk) --- classes/insane.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index e5a1cd03d4..21348a8bb6 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -255,6 +255,10 @@ def package_qa_check_arch(path,name,d): import bb, os target_os = bb.data.getVar('TARGET_OS', d, True) target_arch = bb.data.getVar('TARGET_ARCH', d, True) + + # FIXME: Cross package confuse this check, so just skip them + if bb.data.inherits_class('cross', d): + return True # avoid following links to /usr/bin (e.g. on udev builds) # we will check the files pointed to anyway... -- cgit v1.2.3 From cd59d6f7582d4ba5c7bce31ec46da02ee2d9c77f Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Sat, 7 Apr 2007 22:25:12 +0000 Subject: dsmg600-image.bbclass, nas100d-image.bbclass, nslu2le.conf, nslu2be.conf: Added support for building dsmg600 and nas100d images back into the nslu2 machine configuration. --- classes/dsmg600-image.bbclass | 3 ++- classes/nas100d-image.bbclass | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/dsmg600-image.bbclass b/classes/dsmg600-image.bbclass index 6920fe5dbd..5ccf49267b 100644 --- a/classes/dsmg600-image.bbclass +++ b/classes/dsmg600-image.bbclass @@ -16,4 +16,5 @@ dsmg600_pack_image () { rm -rf ${DEPLOY_DIR_IMAGE}/firmupgrade } -IMAGE_POSTPROCESS_COMMAND += "dsmg600_pack_image; " +# dsmg600 is not a separate machine - use the nslu2 machine override. +IMAGE_POSTPROCESS_COMMAND_nslu2 += "dsmg600_pack_image; " diff --git a/classes/nas100d-image.bbclass b/classes/nas100d-image.bbclass index 0d48ebd476..1150116bdb 100644 --- a/classes/nas100d-image.bbclass +++ b/classes/nas100d-image.bbclass @@ -16,4 +16,5 @@ nas100d_pack_image () { rm -rf ${DEPLOY_DIR_IMAGE}/firmupgrade } -IMAGE_POSTPROCESS_COMMAND += "nas100d_pack_image; " +# nas100d is not a separate machine - use the nslu2 machine override. +IMAGE_POSTPROCESS_COMMAND_nslu2 += "nas100d_pack_image; " -- cgit v1.2.3 From 161e164dd087fecf82614aa7f5515f7d46b3ebad Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 9 Apr 2007 21:17:21 +0000 Subject: kernel.bbclass: Add kernel-base package which kernel modules depend on instead of kernel-image. This allows machines to specify that the kernel-image shouldn't be included in a default rootfs, without needing kernel-image to be empty. Set RDEPENDS_kernel-base_MACHINE = for machines that need this as per a discussion on the mailing list. --- classes/kernel.bbclass | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 2434ca1f0a..4cc3784b6f 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -169,13 +169,18 @@ inherit cml1 EXPORT_FUNCTIONS do_compile do_install do_stage do_configure -PACKAGES = "kernel kernel-image kernel-dev" +# kernel-base becomes kernel-${KERNEL_VERSION} +# kernel-image becomes kernel-image-${KERNEL_VERISON} +PACKAGES = "kernel kernel-base kernel-image kernel-dev" FILES = "" FILES_kernel-image = "/boot/${KERNEL_IMAGETYPE}*" FILES_kernel-dev = "/boot/System.map* /boot/config*" -RDEPENDS_kernel = "kernel-image-${KERNEL_VERSION}" +RDEPENDS_kernel = "kernel-base" +RDEPENDS_kernel-base = "kernel-image" PKG_kernel-image = "kernel-image-${KERNEL_VERSION}" +PKG_kernel-base = "kernel-${KERNEL_VERSION}" ALLOW_EMPTY_kernel = "1" +ALLOW_EMPTY_kernel-base = "1" ALLOW_EMPTY_kernel-image = "1" pkg_postinst_kernel-image () { @@ -362,13 +367,13 @@ python populate_packages_prepend () { postinst = bb.data.getVar('pkg_postinst_modules', d, 1) postrm = bb.data.getVar('pkg_postrm_modules', d, 1) - do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-image-%s' % bb.data.getVar("KERNEL_VERSION", d, 1)) + do_split_packages(d, root='/lib/modules', file_regex=module_regex, output_pattern=module_pattern, description='%s kernel module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, extra_depends='update-modules kernel-%s' % bb.data.getVar("KERNEL_VERSION", d, 1)) import re, os metapkg = "kernel-modules" bb.data.setVar('ALLOW_EMPTY_' + metapkg, "1", d) bb.data.setVar('FILES_' + metapkg, "", d) - blacklist = [ 'kernel-dev', 'kernel-image' ] + blacklist = [ 'kernel-dev', 'kernel-image', 'kernel-base' ] for l in module_deps.values(): for i in l: pkg = module_pattern % legitimize_package_name(re.match(module_regex, os.path.basename(i)).group(1)) -- cgit v1.2.3 From c89f99d26d4c54205988d91ca2417075ba737bc8 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 9 Apr 2007 21:50:12 +0000 Subject: patch.bbclass/devshell.bbclass: Switch to new form of interactive task handling as per RFC which is more compatible with bitbake 1.8+ --- classes/devshell.bbclass | 5 +++-- classes/patch.bbclass | 52 ++++++++++++++++++++++++++++++++++-------------- 2 files changed, 40 insertions(+), 17 deletions(-) (limited to 'classes') diff --git a/classes/devshell.bbclass b/classes/devshell.bbclass index 14f957e12b..06152ef8bc 100644 --- a/classes/devshell.bbclass +++ b/classes/devshell.bbclass @@ -2,9 +2,10 @@ EXTRA_OEMAKE[export] = "1" do_devshell[dirs] = "${S}" do_devshell[nostamp] = "1" -do_devshell[interactive] = "1" + devshell_do_devshell() { - bash -i + export TERMWINDOWTITLE="Bitbake Developer Shell" + ${TERMCMD} } addtask devshell after do_patch diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 07d18470f7..a28f8896c9 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -128,11 +128,14 @@ def patch_init(d): i = 0 self.patches.insert(i, patch) - def _applypatch(self, patch, force = None, reverse = None): + def _applypatch(self, patch, force = False, reverse = False, run = True): shellcmd = ["cat", patch['file'], "|", "patch", "-p", patch['strippath']] if reverse: shellcmd.append('-R') + if not run: + return "sh" + "-c" + " ".join(shellcmd) + if not force: shellcmd.append('--dry-run') @@ -145,7 +148,7 @@ def patch_init(d): output = runcmd(["sh", "-c", " ".join(shellcmd)], self.dir) return output - def Push(self, force = None, all = None): + def Push(self, force = False, all = False, run = True): bb.note("self._current is %s" % self._current) bb.note("patches is %s" % self.patches) if all: @@ -162,7 +165,7 @@ def patch_init(d): else: self._current = 0 bb.note("applying patch %s" % self.patches[self._current]) - self._applypatch(self.patches[self._current], force) + return self._applypatch(self.patches[self._current], force) def Pop(self, force = None, all = None): @@ -176,7 +179,9 @@ def patch_init(d): """""" class QuiltTree(PatchSet): - def _runcmd(self, args): + def _runcmd(self, args, run = True): + if not run: + return ["quilt"] + args runcmd(["quilt"] + args, self.dir) def _quiltpatchpath(self, file): @@ -251,7 +256,7 @@ def patch_init(d): self.patches.insert(self._current or 0, patch) - def Push(self, force = None, all = None): + def Push(self, force = False, all = False, run = True): # quilt push [-f] args = ["push"] @@ -259,6 +264,8 @@ def patch_init(d): args.append("-f") if all: args.append("-a") + if not run: + return self._runcmd(args, run) self._runcmd(args) @@ -345,16 +352,31 @@ def patch_init(d): olddir = os.path.abspath(os.curdir) os.chdir(self.patchset.dir) - try: - self.patchset.Push(True) - except CmdError, v: - # Patch application failed - if sys.exc_value.output.strip() == "No patches applied": - return - print(sys.exc_value) - print('NOTE: dropping user into a shell, so that patch rejects can be fixed manually.') - - os.system('/bin/sh') + try: + self.patchset.Push(False) + except CmdError, v: + # Patch application failed + patchcmd = self.patchset.Push(True, False, False) + + t = bb.data.getVar('T', d, 1) + if not t: + bb.msg.fatal(bb.msg.domain.Build, "T not set") + bb.mkdirhier(t) + import random + rcfile = "%s/bashrc.%s.%s" % (t, str(os.getpid()), random.random()) + f = open(rcfile, "w") + f.write("echo '*** Manual patch resolution mode ***'\n") + f.write("echo 'Dropping to a shell, so patch rejects can be fixed manually.'\n") + f.write("echo 'Run \"quilt refresh\" when patch is corrected, press CTRL+D to exit.'\n") + f.write("echo ''\n") + f.write(" ".join(patchcmd) + "\n") + f.write("#" + bb.data.getVar('TERMCMDRUN', d, 1)) + f.close() + os.chmod(rcfile, 0775) + + os.environ['TERMWINDOWTITLE'] = "Bitbake: Please fix patch rejects manually" + os.environ['TERMRCFILE'] = rcfile + os.system(bb.data.getVar('TERMCMDRUN', d, 1)) # Construct a new PatchSet after the user's changes, compare the # sets, checking patches for modifications, and doing a remote -- cgit v1.2.3 From 632770e8d2beca177f1e492f5940c0a66a84bb09 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 9 Apr 2007 22:16:40 +0000 Subject: base.bbclass: Merge two after parse functions --- classes/base.bbclass | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 6011790ebe..aa693cd4c6 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -798,9 +798,9 @@ python read_subpackage_metadata () { bb.data.setVar(key, sdata[key], d) } -def base_after_parse_two(d): - import bb - import exceptions +def base_after_parse(d): + import bb, os, exceptions + source_mirror_fetch = bb.data.getVar('SOURCE_MIRROR_FETCH', d, 0) if not source_mirror_fetch: need_host = bb.data.getVar('COMPATIBLE_HOST', d, 1) @@ -828,9 +828,6 @@ def base_after_parse_two(d): if use_nls != None: bb.data.setVar('USE_NLS', use_nls, d) -def base_after_parse(d): - import bb, os - # Make sure MACHINE *isn't* exported bb.data.delVarFlag('MACHINE', 'export', d) bb.data.setVarFlag('MACHINE', 'unexport', 1, d) @@ -855,7 +852,6 @@ def base_after_parse(d): python () { - base_after_parse_two(d) base_after_parse(d) } -- cgit v1.2.3 From 2893993b5767a8d3980f16b7e4b5bf596eb977a8 Mon Sep 17 00:00:00 2001 From: Rodrigo Vivi Date: Thu, 12 Apr 2007 14:10:48 +0000 Subject: package_deb.bbclass: add shebang, closes #2086 --- classes/package_deb.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index 388f9819bd..0c83e58a37 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -209,6 +209,7 @@ python do_package_deb () { scriptfile = file(os.path.join(controldir, script), 'w') except OSError: raise bb.build.FuncFailed("unable to open %s script file for writing." % script) + scriptfile.write("#!/bin/sh\n") scriptfile.write(scriptvar) scriptfile.close() os.chmod(os.path.join(controldir, script), 0755) -- cgit v1.2.3 From 41582932aea12ea9dfec41b1ce75386f00c5e160 Mon Sep 17 00:00:00 2001 From: Martin Dietze Date: Wed, 18 Apr 2007 16:51:50 +0000 Subject: conf/distro/nylon.conf, conf/machine/mtx-3a.conf, classes/nylon-image.bbclass: * formally added (experimental, ARM-based) mtx-3a hardware platform used by nylon --- classes/nylon-image.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/nylon-image.bbclass b/classes/nylon-image.bbclass index e24aa33cf4..6d867eab48 100644 --- a/classes/nylon-image.bbclass +++ b/classes/nylon-image.bbclass @@ -20,4 +20,7 @@ nylon_create_imgz() { rm -r ${DEPLOY_DIR_IMAGE}/tmp } -IMAGE_POSTPROCESS_COMMAND += "nylon_create_imgz;" +IMAGE_POSTPROCESS_COMMAND += "kldsköa" +IMAGE_POSTPROCESS_COMMAND_mtx-1 += "nylon_create_imgz;" +IMAGE_POSTPROCESS_COMMAND_mtx-2 += "nylon_create_imgz;" +IMAGE_POSTPROCESS_COMMAND_mtx-3a += "nylon_create_initrd_uimage;" -- cgit v1.2.3 From 1a7cff6077b770083062952ef6f6f7517bfd2c07 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 18 Apr 2007 21:22:03 +0000 Subject: classes: Add support for intertask dependencies to be specified, needed for correct operation with bitbake 1.8.x. Old behaviour is maintained in a special legacy anonymous function in base.bbclass. The patch is an improved version of the one discussed on the mailing list. --- classes/base.bbclass | 66 ++++++++++++++++++++++++++++++++------------- classes/image.bbclass | 22 ++++++++------- classes/package.bbclass | 21 ++++++++++++--- classes/package_deb.bbclass | 4 ++- classes/package_ipk.bbclass | 4 ++- classes/package_tar.bbclass | 2 ++ classes/patch.bbclass | 11 ++++++++ classes/rootfs_deb.bbclass | 4 +-- classes/rootfs_ipk.bbclass | 5 ++-- 9 files changed, 100 insertions(+), 39 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index aa693cd4c6..d78bd3cec3 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -78,22 +78,9 @@ def base_dep_prepend(d): # the case where host == build == target, for now we don't work in # that case though. # + deps = "shasum-native " if bb.data.getVar('PN', d, True) == "shasum-native": deps = "" - else: - deps = "shasum-native " - - # INHIBIT_PATCH_TOOL don't apply the patch tool dependency - inhibit_patch = (bb.data.getVar("INHIBIT_PATCH_TOOL", d, True) == "1") or False - - # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not - # we need that built is the responsibility of the patch function / class, not - # the application. - patchdeps = bb.data.getVar("PATCHTOOL", d, 1) - if patchdeps and not inhibit_patch: - patchdeps = "%s-native" % patchdeps - if not patchdeps in bb.data.getVar("PROVIDES", d, 1): - deps += patchdeps if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d): if (bb.data.getVar('HOST_SYS', d, 1) != @@ -819,11 +806,6 @@ def base_after_parse(d): 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) @@ -850,8 +832,54 @@ def base_after_parse(d): bb.data.setVar('PACKAGE_ARCH', mach_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) } diff --git a/classes/image.bbclass b/classes/image.bbclass index 4f870915d0..2954dcdf39 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -13,19 +13,21 @@ USE_DEVFS ?= "0" PID = "${@os.getpid()}" -DEPENDS += "makedevs-native" PACKAGE_ARCH = "${MACHINE_ARCH}" -def get_image_deps(d): - import bb - str = "" - for type in (bb.data.getVar('IMAGE_FSTYPES', d, 1) or "").split(): - deps = bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "" - if deps: - str += " %s" % deps - return str +do_rootfs[depends] += "makedevs-native:do_populate_staging fakeroot-native:do_populate_staging" -DEPENDS += "${@get_image_deps(d)}" +python () { + import bb + + deps = bb.data.getVarFlag('do_rootfs', 'depends', d) or "" + for type in (bb.data.getVar('IMAGE_FSTYPES', d, True) or "").split(): + for dep in ((bb.data.getVar('IMAGE_DEPENDS_%s' % type, d) or "").split() or []): + deps += " %s:do_populate_staging" % dep + for dep in (bb.data.getVar('EXTRA_IMAGEDEPENDS', d, True) or "").split(): + deps += " %s:do_populate_staging" % dep + bb.data.setVarFlag('do_rootfs', 'depends', deps, d) +} # # Get a list of files containing device tables to create. diff --git a/classes/package.bbclass b/classes/package.bbclass index 3e80b2b31c..e044395347 100644 --- a/classes/package.bbclass +++ b/classes/package.bbclass @@ -116,8 +116,23 @@ def do_split_packages(d, root, file_regex, output_pattern, description, postinst bb.data.setVar('PACKAGES', ' '.join(packages), d) -PACKAGE_DEPENDS ?= "file-native fakeroot-native" -DEPENDS_prepend =+ "${PACKAGE_DEPENDS} " +PACKAGE_DEPENDS += "file-native" + +python () { + import bb + + if bb.data.getVar('PACKAGES', d, True) != '': + deps = bb.data.getVarFlag('do_package', 'depends', d) or "" + for dep in (bb.data.getVar('PACKAGE_DEPENDS', d, True) or "").split(): + deps += " %s:do_populate_staging" % dep + bb.data.setVarFlag('do_package', 'depends', deps, d) + + deps = bb.data.getVarFlag('do_package_write', 'depends', d) or "" + for dep in (bb.data.getVar('PACKAGE_EXTRA_DEPENDS', d, True) or "").split(): + deps += " %s:do_populate_staging" % dep + bb.data.setVarFlag('do_package_write', 'depends', deps, d) +} + # file(1) output to match to consider a file an unstripped executable FILE_UNSTRIPPED_MATCH ?= "not stripped" #FIXME: this should be "" when any errors are gone! @@ -126,7 +141,7 @@ IGNORE_STRIP_ERRORS ?= "1" runstrip() { # Function to strip a single file, called from RUNSTRIP in populate_packages below # A working 'file' (one which works on the target architecture) - # is necessary for this stuff to work, hence the addition to PACKAGES_DEPENDS + # is necessary for this stuff to work, hence the addition to do_package[depends] local ro st diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index 0c83e58a37..d172fb1766 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -1,5 +1,7 @@ inherit package -DEPENDS_prepend="${@["dpkg-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" + +PACKAGE_EXTRA_DEPENDS += "dpkg-native fakeroot-native" + BOOTSTRAP_EXTRA_RDEPENDS += "dpkg" DISTRO_EXTRA_RDEPENDS += "dpkg" PACKAGE_WRITE_FUNCS += "do_package_deb" diff --git a/classes/package_ipk.bbclass b/classes/package_ipk.bbclass index 19c082d978..b5cc6af3bb 100644 --- a/classes/package_ipk.bbclass +++ b/classes/package_ipk.bbclass @@ -1,5 +1,7 @@ inherit package -DEPENDS_prepend="${@["ipkg-utils-native ", ""][(bb.data.getVar('PACKAGES', d, 1) == '')]}" + +PACKAGE_EXTRA_DEPENDS += "ipkg-utils-native fakeroot-native" + BOOTSTRAP_EXTRA_RDEPENDS += "ipkg-collateral ipkg" PACKAGE_WRITE_FUNCS += "do_package_ipk" IMAGE_PKGTYPE ?= "ipk" diff --git a/classes/package_tar.bbclass b/classes/package_tar.bbclass index b048b08ebe..e94e763150 100644 --- a/classes/package_tar.bbclass +++ b/classes/package_tar.bbclass @@ -1,5 +1,7 @@ inherit package +PACKAGE_EXTRA_DEPENDS += "tar-native" + PACKAGE_WRITE_FUNCS += "do_package_tar" IMAGE_PKGTYPE ?= "tar" diff --git a/classes/patch.bbclass b/classes/patch.bbclass index a28f8896c9..84cca7f5a0 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -417,6 +417,17 @@ def patch_init(d): addtask patch after do_unpack do_patch[dirs] = "${WORKDIR}" + +python () { + import bb + # do_patch tasks require PATCHTOOL-native to have staged + patchdeps = bb.data.getVar("PATCHTOOL", d, True) + if patchdeps: + patchdeps = "%s-native" % patchdeps + if not patchdeps in bb.data.getVar("PROVIDES", d, True): + bb.data.setVarFlag('do_patch', 'depends', patchdeps + ":do_populate_staging", d) +} + python patch_do_patch() { import re import bb.fetch diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass index 59909d6852..f444541509 100644 --- a/classes/rootfs_deb.bbclass +++ b/classes/rootfs_deb.bbclass @@ -1,5 +1,5 @@ -DEPENDS_prepend = "dpkg-native apt-native fakeroot-native " -DEPENDS_append = " ${EXTRA_IMAGEDEPENDS}" + +do_rootfs[depends] += "dpkg-native:do_populate_staging apt-native:do_populate_staging" fakeroot rootfs_deb_do_rootfs () { set +e diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index fdd42ee429..26eca34da9 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -5,12 +5,11 @@ # See image.bbclass for a usage of this. # -DEPENDS_prepend="ipkg-native ipkg-utils-native fakeroot-native " -DEPENDS_append=" ${EXTRA_IMAGEDEPENDS}" -RDEPENDS += "ipkg ipkg-collateral" +do_rootfs[depends] += "ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging" IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS}" +RDEPENDS += "ipkg ipkg-collateral" PACKAGE_INSTALL += "ipkg ipkg-collateral" rootfs_ipk_do_indexes () { -- cgit v1.2.3 From ff81f5be6bc505a8597da1cd6b2ddf4e205eadf9 Mon Sep 17 00:00:00 2001 From: Martin Dietze Date: Thu, 19 Apr 2007 10:29:58 +0000 Subject: base.bbclass: fixed bug #2082 (Checksum doesn't expand "localpath" with "localdata") as proposed by bug reporter --- classes/base.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index d78bd3cec3..1dd3a488b3 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -41,7 +41,7 @@ def base_chk_file(parser, pn, pv, src_uri, localpath, data): # md5 and sha256 should be valid now if not os.path.exists(localpath): - bb.note("The locapath does not exist '%s'" % localpath) + bb.note("The localpath does not exist '%s'" % localpath) raise Exception("The path does not exist '%s'" % localpath) @@ -483,7 +483,7 @@ python base_do_fetch() { # Check each URI for url in src_uri.split(): - localpath = bb.fetch.localpath(url,localdata) + localpath = bb.data.expand(bb.fetch.localpath(url, localdata), localdata) (type,host,path,_,_,_) = bb.decodeurl(url) uri = "%s://%s%s" % (type,host,path) try: -- cgit v1.2.3 From 6a7c1a204eedc618616ac7c2a0b1d88b5f4e7274 Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Sun, 22 Apr 2007 14:15:51 +0000 Subject: insane.bbclass: support mipsel - close #2119 --- classes/insane.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 21348a8bb6..8ef4858aa4 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -47,6 +47,7 @@ def package_qa_get_machine_dict(): "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), -- cgit v1.2.3 From ed8a6dd0ff4503b51e1eb2bf94cec518f2ba0fe2 Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Tue, 24 Apr 2007 20:15:45 +0000 Subject: base.bbclass: fix depency problem, closes #2137 (and some others) --- classes/base.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 1dd3a488b3..36ccbd6438 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -804,6 +804,8 @@ def base_after_parse(d): 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) use_nls = bb.data.getVar('USE_NLS_%s' % pn, d, 1) @@ -874,7 +876,7 @@ def base_oldbitbake_workarounds(d): 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 + depends = "${PACKAGE_DEPENDS} fakeroot-native " + depends bb.data.setVar('DEPENDS', depends, d) -- cgit v1.2.3 From d913f5b4b1e54abf761348e9a444c63818d04de7 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Wed, 25 Apr 2007 01:16:14 +0000 Subject: cpan.bbclass: Update to enable the building cpan modules for perl 5.8.8. This uses the installed perl configuration to determine if we are building for the old or the new perl layout. Currently this just changes the installation paths and always uses gcc to link, but more changes will be added later to make the perl module building process a lot more reliable. --- classes/cpan.bbclass | 74 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 19 deletions(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index a566f0fa42..9915bf6f67 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -1,38 +1,74 @@ # # This is for perl modules that use the old Makefile.PL build system # -FILES_${PN} += '${libdir}/perl5' -EXTRA_CPANFLAGS = "" +FILES_${PN} += '${libdir}/perl5 ${datadir}/perl5' +EXTRA_CPANFLAGS ?= "" DEPENDS += "perl-native" RDEPENDS += "perl" +# Determine the staged version of perl from the perl configuration file +def get_perl_version(d): + import os, bb, re + cfg = bb.data.expand('${STAGING_DIR}/${HOST_SYS}/perl/config.sh', d) + try: + f = open(cfg, 'r') + except IOError: + return None + l = f.readlines(); + f.close(); + r = re.compile("version='(\d\.\d\.\d)'") + for s in l: + m = r.match(s) + if m: + return m.group(1) + return None + +# Only 5.8.7 and 5.8.4 existed at the time we moved to the new layout +def is_new_perl(d): + ver = get_perl_version(d) + if ver == "5.8.4" or ver == "5.8.7": + return "no" + return "yes" + +IS_NEW_PERL = "${@is_new_perl(d)}" + cpan_do_configure () { perl Makefile.PL ${EXTRA_CPANFLAGS} if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh - sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \ - -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \ - -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ - -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ - -e "s:\(LDDLFLAGS.*\)${STAGING_DIR}/${BUILD_SYS}/lib:\1${STAGING_LIBDIR}:" \ - Makefile + if [ "${IS_NEW_PERL}" = "yes" ]; then + sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \ + -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \ + -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${datadir}/perl5:" \ + -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5:" \ + -e "s:\(LDDLFLAGS.*\)${STAGING_DIR}/${BUILD_SYS}/lib:\1${STAGING_LIBDIR}:" \ + Makefile + else + sed -i -e "s:\(SITELIBEXP = \).*:\1${sitelibexp}:" \ + -e "s:\(SITEARCHEXP = \).*:\1${sitearchexp}:" \ + -e "s:\(INSTALLVENDORLIB = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ + -e "s:\(INSTALLVENDORARCH = \).*:\1${D}${libdir}/perl5/site_perl/${version}:" \ + -e "s:\(LDDLFLAGS.*\)${STAGING_DIR}/${BUILD_SYS}/lib:\1${STAGING_LIBDIR}:" \ + Makefile + fi fi } cpan_do_compile () { - # You must use gcc to link on sh - OPTIONS="" - if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then - OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" + if [ "${IS_NEW_PERL}" = "yes" ]; then + oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD=${TARGET_SYS}-gcc + else + # You must use gcc to link on sh + OPTIONS="" + if test ${TARGET_ARCH} = "sh3" -o ${TARGET_ARCH} = "sh4"; then + OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" + fi + if test ${TARGET_ARCH} = "powerpc" ; then + OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" + fi + oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS fi - - if test ${TARGET_ARCH} = "powerpc" ; then - OPTIONS="LD=${TARGET_ARCH}-${TARGET_OS}-gcc" - fi - - - oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" $OPTIONS } cpan_do_install () { -- cgit v1.2.3 From e085d81e48df8bdeec11ff552245a40dfa008889 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 26 Apr 2007 10:57:45 +0000 Subject: base.bbclass: add back a snipped of obsolete code to fix SRCDATES problems, seems to fix #2133 --- classes/base.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 36ccbd6438..9752a1116c 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -807,6 +807,10 @@ def base_after_parse(d): 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: -- cgit v1.2.3 From 04bcbc425723c1ba332e2aa8efa31533f278a32b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 26 Apr 2007 16:12:58 +0000 Subject: gconf.bbclass: depend on gconf-native --- classes/gconf.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/gconf.bbclass b/classes/gconf.bbclass index 686f8e6596..99f33e433a 100644 --- a/classes/gconf.bbclass +++ b/classes/gconf.bbclass @@ -1,4 +1,4 @@ -DEPENDS += "gconf" +DEPENDS += "gconf gconf-native" gconf_postinst() { if [ "$1" = configure ]; then -- cgit v1.2.3 From 908abeae497d81c0afd6381c08311aa45555157b Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 16:42:07 +0000 Subject: insane.bbclass: Fix check for bad RPATHs. This is gonna break builds. Needs fixes in the shared library handling. --- classes/insane.bbclass | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 8ef4858aa4..15e2061239 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -210,11 +210,11 @@ def package_qa_check_rpath(file,name,d): output = os.popen("%s -Byr %s" % (scanelf,file)) txt = output.readline().split() - if bad_dir in txt: - package_qa_write_error( 1, name, file, d) - bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, txt, file)) - return False - + for line in txt: + if bad_dir in line: + package_qa_write_error( 1, name, file, d) + bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) + return False return True def package_qa_check_devdbg(path, name,d): -- cgit v1.2.3 From 7b5dda2b674bff1ec9bf0f58bbbf402b8a66d481 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 16:54:09 +0000 Subject: insane.bbclass: Broaden check for RPATHs by removing work/ path component. --- classes/insane.bbclass | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 15e2061239..9f1ec3b000 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -203,6 +203,7 @@ def package_qa_check_rpath(file,name,d): import bb, os scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf') bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work" + bad_dir_test = bb.data.getVar('TMPDIR', d, True) if not os.path.exists(scanelf): bb.fatal("Can not check RPATH scanelf not found") if not bad_dir in bb.data.getVar('WORKDIR', d, True): @@ -211,7 +212,7 @@ def package_qa_check_rpath(file,name,d): output = os.popen("%s -Byr %s" % (scanelf,file)) txt = output.readline().split() for line in txt: - if bad_dir in line: + if bad_dir_test in line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) return False @@ -405,7 +406,7 @@ python do_package_qa () { rdepends_sane = False if not walk_sane or not rdepends_sane: - bb.fatal("QA ran found fatal errors. Please consider fixing them") + bb.fatal("QA run found fatal errors. Please consider fixing them.") bb.note("DONE with PACKAGE QA") } -- cgit v1.2.3 From e67b351f7ebef166cc11e1c231d0b577a49888b9 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 26 Apr 2007 19:00:47 +0000 Subject: insane.bbclass: depend on chrpath-native --- classes/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 9f1ec3b000..c424a573d3 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -21,7 +21,7 @@ # We play a special package function inherit package -PACKAGE_DEPENDS += "pax-utils-native" +PACKAGE_DEPENDS += "pax-utils-native chrpath-native" PACKAGEFUNCS += " do_package_qa " -- cgit v1.2.3 From 84470181159bb115156f64726d4342148d091998 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 22:19:39 +0000 Subject: insane.bbclass: RPATH check was always true due to scanelf output including the file path. --- classes/insane.bbclass | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index c424a573d3..d07b181dbd 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -21,7 +21,8 @@ # We play a special package function inherit package -PACKAGE_DEPENDS += "pax-utils-native chrpath-native" +PACKAGE_DEPENDS += "pax-utils-native" +#PACKAGE_DEPENDS += chrpath-native" PACKAGEFUNCS += " do_package_qa " @@ -202,19 +203,25 @@ def package_qa_check_rpath(file,name,d): """ import bb, os scanelf = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'scanelf') + #chrpath = os.path.join(bb.data.getVar('STAGING_BINDIR_NATIVE',d,True),'chrpath') bad_dir = bb.data.getVar('TMPDIR', d, True) + "/work" bad_dir_test = bb.data.getVar('TMPDIR', d, True) if not os.path.exists(scanelf): - bb.fatal("Can not check RPATH scanelf not found") + bb.fatal("Can not check RPATH, scanelf (part of pax-utils-native) not found") + #if not os.path.exists(chrpath): + # bb.fatal("Can not fix RPATH, chrpath (part of chrpath-native) not found") if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") - output = os.popen("%s -Byr %s" % (scanelf,file)) + bb.note("%s -F%%r#F %s" % (scanelf,file)) + output = os.popen("%s -F%%r#F %s" % (scanelf,file)) txt = output.readline().split() for line in txt: if bad_dir_test in line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) + #bb.note("Fixing RPATH for you in %s" % file) + #os.popen("%s -r /lib %s" % (chrpath,file)) return False return True -- cgit v1.2.3 From 5da8ac500c38c2a0f7c2d7f104061be482c7b7d2 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Thu, 26 Apr 2007 23:24:09 +0000 Subject: insane.bbclass: Commented out scanelf format debugging. --- classes/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index d07b181dbd..7454957e5b 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -213,7 +213,7 @@ def package_qa_check_rpath(file,name,d): if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") - bb.note("%s -F%%r#F %s" % (scanelf,file)) + #bb.note("%s -F%%r#F %s" % (scanelf,file)) output = os.popen("%s -F%%r#F %s" % (scanelf,file)) txt = output.readline().split() for line in txt: -- cgit v1.2.3 From 7e8aca6f9c3cedf040cd58e4f565361bfcded9f9 Mon Sep 17 00:00:00 2001 From: Leon Woestenberg Date: Fri, 27 Apr 2007 00:12:23 +0000 Subject: insane.bbclass: Re-add -B to scanelf to make it correctly check single RPATH occurences. --- classes/insane.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 7454957e5b..30b164b734 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -213,10 +213,12 @@ def package_qa_check_rpath(file,name,d): if not bad_dir in bb.data.getVar('WORKDIR', d, True): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") - #bb.note("%s -F%%r#F %s" % (scanelf,file)) - output = os.popen("%s -F%%r#F %s" % (scanelf,file)) + #bb.note("%s -B -F%%r#F %s" % (scanelf,file)) + output = os.popen("%s -B -F%%r#F %s" % (scanelf,file)) txt = output.readline().split() + #bb.note("???%s???" % bad_dir_test) for line in txt: + #bb.note("===%s===" % line) if bad_dir_test in line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) -- cgit v1.2.3 From bf3453c3ea3858a857d44c5cbc4f4a48069652da Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Fri, 27 Apr 2007 02:06:22 +0000 Subject: perl 5.8.8/cpan: Fix the installation paths for cpan modules. The installed files for perl modules built using cpan will end up in different places depending on which version of perl they are being built with. Modules that explicitly set various FILES_ values were using the paths that are only valid for the older versions of perl. Calculate and set the correct path in cpan.bbclass and use that in the FILES_ variables so that it'll be correct for all versions of perl. --- classes/cpan.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 9915bf6f67..52430560ea 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -31,7 +31,18 @@ def is_new_perl(d): return "no" return "yes" +# Determine where the library directories are +def perl_get_libdirs(d): + import bb + libdir = bb.data.getVar('libdir', d, 1) + if is_new_perl(d) == "yes": + libdirs = libdir + '/perl5' + else: + libdirs = libdir + '/*/*/perl5' + return libdirs + IS_NEW_PERL = "${@is_new_perl(d)}" +PERLLIBDIRS = "${@perl_get_libdirs(d)}" cpan_do_configure () { perl Makefile.PL ${EXTRA_CPANFLAGS} -- cgit v1.2.3 From 3cc9d5463dac0412d5591b506e308f3e9cde0494 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Fri, 27 Apr 2007 02:22:26 +0000 Subject: cpan: Use CCLD for the linking instead of ${TARGET_SYS}-gcc. Without this native packages break because -gcc doesn't exist, just gcc. CCLD gets us the correct CC to be used for linking in both cases, so we use that. --- classes/cpan.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 52430560ea..00709f7e18 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -68,7 +68,7 @@ cpan_do_configure () { cpan_do_compile () { if [ "${IS_NEW_PERL}" = "yes" ]; then - oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD=${TARGET_SYS}-gcc + oe_runmake PASTHRU_INC="${CFLAGS}" CCFLAGS="${CFLAGS}" LD="${CCLD}" else # You must use gcc to link on sh OPTIONS="" -- cgit v1.2.3 From c935e9da83222ba31a5323f0a05c334ad6911d68 Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Sun, 29 Apr 2007 09:41:48 +0000 Subject: site/powerpc-common: Add a common site fike for powerpc arch Still needs work, especially uclibc part --- classes/siteinfo.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index 80e6e32af7..6868750d2d 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -40,9 +40,9 @@ def get_siteinfo_list(d): "mipsel-linux": "endian-little bit-32 common-glibc",\ "mipsel-linux-uclibc": "endian-little bit-32 common-uclibc",\ "powerpc-darwin": "endian-big bit-32 common-darwin",\ - "ppc-linux": "endian-big bit-32 common-glibc",\ - "powerpc-linux": "endian-big bit-32 common-glibc",\ - "powerpc-linux-uclibc": "endian-big bit-32 common-uclibc",\ + "ppc-linux": "endian-big bit-32 common-glibc powerpc-common",\ + "powerpc-linux": "endian-big bit-32 common-glibc powerpc-common",\ + "powerpc-linux-uclibc": "endian-big bit-32 common-uclibc powerpc-common",\ "sh3-linux": "endian-little bit-32 common-glibc sh-common",\ "sh4-linux": "endian-little bit-32 common-glibc sh-common",\ "sh4-linux-uclibc": "endian-little bit-32 common-uclibc sh-common",\ -- cgit v1.2.3 From bca1af865658a00eb25d22c0fb22b8fecc745813 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Mon, 30 Apr 2007 04:06:31 +0000 Subject: perl 5.8.8: Improvements for cpan modules: * Modify perl to install a copy of it's configuration during staging. This will allow us to get at the perl settings for the target when building cpan modules. * Modify perl-native to allow selection of the host or target configuration based on an environment variable. This will allow the cpan class to select the appropriate configuration based on if we are building the native package or not. * Modify cpan.bbclass to set the environment variable to an appropriate value to tell perl native to select the appropriate settings based on if we are building native or target modules. This change fixes some modules that were compiled for the host instead of the target (libversion-perl for example) and fixes up some of cpan modules that include additional subdirectories with their own makefiles. --- classes/cpan.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 00709f7e18..687dbcd1cb 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -41,9 +41,18 @@ def perl_get_libdirs(d): libdirs = libdir + '/*/*/perl5' return libdirs +def is_target(d): + import bb + if not bb.data.inherits_class('native', d): + return "yes" + return "no" + IS_NEW_PERL = "${@is_new_perl(d)}" PERLLIBDIRS = "${@perl_get_libdirs(d)}" +# Env var which tells perl if it should use host (no) or target (yes) settings +export PERLCONFIGTARGET = "${@is_target(d)}" + cpan_do_configure () { perl Makefile.PL ${EXTRA_CPANFLAGS} if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then -- cgit v1.2.3 From e9d12e48f9c41ee5c0f9ddb82c387a5ce2a17c9a Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Wed, 2 May 2007 02:10:55 +0000 Subject: cpan.bbclass: Building cpan modules needs to depend on both perl and perl-native. They are built with perl-native but use the configuration information from perl. This issue wasn't showing up with bitbake 1.6 but is with 1.8.2 where perl is configured and compiled perl but not staged prior to moving on. --- classes/cpan.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 687dbcd1cb..410a1c6502 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -4,7 +4,7 @@ FILES_${PN} += '${libdir}/perl5 ${datadir}/perl5' EXTRA_CPANFLAGS ?= "" -DEPENDS += "perl-native" +DEPENDS += "perl perl-native" RDEPENDS += "perl" # Determine the staged version of perl from the perl configuration file -- cgit v1.2.3 From e4804a842235fe27e5bac51d9908933cdb3dd40e Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Wed, 2 May 2007 02:14:14 +0000 Subject: cpan.bbclass: Stop the cpan modules which ask you to confirm the configuration from hanging bitbake. They expect you to press y to indicate that you are ok with the configuration. For some reason there was no problem in bitbake 1.6 but this caused hangs in do_configure with bitbake 1.8. --- classes/cpan.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 410a1c6502..be08c84379 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -54,7 +54,7 @@ PERLLIBDIRS = "${@perl_get_libdirs(d)}" export PERLCONFIGTARGET = "${@is_target(d)}" cpan_do_configure () { - perl Makefile.PL ${EXTRA_CPANFLAGS} + yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS} if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh if [ "${IS_NEW_PERL}" = "yes" ]; then -- cgit v1.2.3 From 57b3d83e6a2c8951db18a7a47e67075f5cd58f53 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 2 May 2007 10:48:17 +0000 Subject: image.bbclass: remove *all* IPKG list files --- classes/image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/image.bbclass b/classes/image.bbclass index 2954dcdf39..5f1dfa2dce 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -80,7 +80,7 @@ fakeroot do_rootfs () { insert_feed_uris - rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/lists/oe + rm -f ${IMAGE_ROOTFS}${libdir}/ipkg/lists/* ${IMAGE_PREPROCESS_COMMAND} -- cgit v1.2.3 From 55764a7c52979405d4d7c07fd92c3c5f64744494 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Fri, 4 May 2007 01:24:59 +0000 Subject: perl: Extract common functionality from cpan and cpan_build classes into a cpan-base class and update cpan_build to work with the new perl layout that was added with perl 5.8.8. --- classes/cpan-base.bbclass | 51 ++++++++++++++++++++++++++++++++++++++++++++++ classes/cpan.bbclass | 49 ++------------------------------------------ classes/cpan_build.bbclass | 47 ++++++++++++++++++++++-------------------- 3 files changed, 78 insertions(+), 69 deletions(-) create mode 100644 classes/cpan-base.bbclass (limited to 'classes') diff --git a/classes/cpan-base.bbclass b/classes/cpan-base.bbclass new file mode 100644 index 0000000000..e10148aba8 --- /dev/null +++ b/classes/cpan-base.bbclass @@ -0,0 +1,51 @@ +# +# This is for perl modules that use the old Makefile.PL build system +# +FILES_${PN} += '${libdir}/perl5 ${datadir}/perl5' +EXTRA_CPANFLAGS ?= "" + +DEPENDS += "perl perl-native" +RDEPENDS += "perl" + +# Determine the staged version of perl from the perl configuration file +def get_perl_version(d): + import os, bb, re + cfg = bb.data.expand('${STAGING_DIR}/${HOST_SYS}/perl/config.sh', d) + try: + f = open(cfg, 'r') + except IOError: + return None + l = f.readlines(); + f.close(); + r = re.compile("version='(\d\.\d\.\d)'") + for s in l: + m = r.match(s) + if m: + return m.group(1) + return None + +# Only 5.8.7 and 5.8.4 existed at the time we moved to the new layout +def is_new_perl(d): + ver = get_perl_version(d) + if ver == "5.8.4" or ver == "5.8.7": + return "no" + return "yes" + +# Determine where the library directories are +def perl_get_libdirs(d): + import bb + libdir = bb.data.getVar('libdir', d, 1) + if is_new_perl(d) == "yes": + libdirs = libdir + '/perl5' + else: + libdirs = libdir + '/*/*/perl5' + return libdirs + +def is_target(d): + import bb + if not bb.data.inherits_class('native', d): + return "yes" + return "no" + +IS_NEW_PERL = "${@is_new_perl(d)}" +PERLLIBDIRS = "${@perl_get_libdirs(d)}" diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index be08c84379..3b1a2b72ca 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -1,54 +1,9 @@ # # This is for perl modules that use the old Makefile.PL build system # -FILES_${PN} += '${libdir}/perl5 ${datadir}/perl5' -EXTRA_CPANFLAGS ?= "" - -DEPENDS += "perl perl-native" -RDEPENDS += "perl" - -# Determine the staged version of perl from the perl configuration file -def get_perl_version(d): - import os, bb, re - cfg = bb.data.expand('${STAGING_DIR}/${HOST_SYS}/perl/config.sh', d) - try: - f = open(cfg, 'r') - except IOError: - return None - l = f.readlines(); - f.close(); - r = re.compile("version='(\d\.\d\.\d)'") - for s in l: - m = r.match(s) - if m: - return m.group(1) - return None - -# Only 5.8.7 and 5.8.4 existed at the time we moved to the new layout -def is_new_perl(d): - ver = get_perl_version(d) - if ver == "5.8.4" or ver == "5.8.7": - return "no" - return "yes" +inherit cpan-base -# Determine where the library directories are -def perl_get_libdirs(d): - import bb - libdir = bb.data.getVar('libdir', d, 1) - if is_new_perl(d) == "yes": - libdirs = libdir + '/perl5' - else: - libdirs = libdir + '/*/*/perl5' - return libdirs - -def is_target(d): - import bb - if not bb.data.inherits_class('native', d): - return "yes" - return "no" - -IS_NEW_PERL = "${@is_new_perl(d)}" -PERLLIBDIRS = "${@perl_get_libdirs(d)}" +EXTRA_CPANFLAGS ?= "" # Env var which tells perl if it should use host (no) or target (yes) settings export PERLCONFIGTARGET = "${@is_target(d)}" diff --git a/classes/cpan_build.bbclass b/classes/cpan_build.bbclass index 0660ef9b82..63e716c099 100644 --- a/classes/cpan_build.bbclass +++ b/classes/cpan_build.bbclass @@ -1,16 +1,14 @@ # # This is for perl modules that use the new Build.PL build system # -INHIBIT_NATIVE_STAGE_INSTALL = "1" -FILES_${PN} += '${libdir}/perl5' +inherit cpan-base -DEPENDS += "perl-native" -RDEPENDS += "perl" +INHIBIT_NATIVE_STAGE_INSTALL = "1" # # We also need to have built libmodule-build-perl-native for # everything except libmodule-build-perl-native itself (which uses -# this class, but uses itself as the probider of +# this class, but uses itself as the provider of # libmodule-build-perl) # def cpan_build_dep_prepend(d): @@ -24,24 +22,29 @@ def cpan_build_dep_prepend(d): DEPENDS_prepend = "${@cpan_build_dep_prepend(d)}" -def is_crosscompiling(d): - import bb - if not bb.data.inherits_class('native', d): - return "yes" - return "no" - cpan_build_do_configure () { - if [ ${@is_crosscompiling(d)} == "yes" ]; then + if [ ${@is_target(d)} == "yes" ]; then # build for target . ${STAGING_DIR}/${TARGET_SYS}/perl/config.sh - perl Build.PL --installdirs vendor \ - --destdir ${D} \ - --install_path lib="${libdir}/perl5/site_perl/${version}" \ - --install_path arch="${libdir}/perl5/site_perl/${version}/${TARGET_SYS}" \ - --install_path script=${bindir} \ - --install_path bin=${bindir} \ - --install_path bindoc=${mandir}/man1 \ - --install_path libdoc=${mandir}/man3 + if [ "${IS_NEW_PERL}" = "yes" ]; then + perl Build.PL --installdirs vendor \ + --destdir ${D} \ + --install_path lib="${datadir}/perl5" \ + --install_path arch="${libdir}/perl5" \ + --install_path script=${bindir} \ + --install_path bin=${bindir} \ + --install_path bindoc=${mandir}/man1 \ + --install_path libdoc=${mandir}/man3 + else + perl Build.PL --installdirs vendor \ + --destdir ${D} \ + --install_path lib="${libdir}/perl5/site_perl/${version}" \ + --install_path arch="${libdir}/perl5/site_perl/${version}/${TARGET_SYS}" \ + --install_path script=${bindir} \ + --install_path bin=${bindir} \ + --install_path bindoc=${mandir}/man1 \ + --install_path libdoc=${mandir}/man3 + fi else # build for host perl Build.PL --installdirs site @@ -53,13 +56,13 @@ cpan_build_do_compile () { } cpan_build_do_install () { - if [ ${@is_crosscompiling(d)} == "yes" ]; then + if [ ${@is_target(d)} == "yes" ]; then perl Build install fi } do_stage_append () { - if [ ${@is_crosscompiling(d)} == "no" ]; then + if [ ${@is_target(d)} == "no" ]; then perl Build install fi } -- cgit v1.2.3 From bafa9b3ec1bd91cd710d587a31b58db4c1e2a503 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Fri, 4 May 2007 02:09:42 +0000 Subject: perl: Add the .debug directories that to FILES_${PN}-dbg in the cpan-base.bbclass, and then update the cpan modules to no longer manually specify this. Also remove references to the new removed .packlist files. --- classes/cpan-base.bbclass | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/cpan-base.bbclass b/classes/cpan-base.bbclass index e10148aba8..a5fdb33895 100644 --- a/classes/cpan-base.bbclass +++ b/classes/cpan-base.bbclass @@ -1,8 +1,8 @@ # -# This is for perl modules that use the old Makefile.PL build system +# cpan-base providers various perl related information needed for building +# cpan modules # -FILES_${PN} += '${libdir}/perl5 ${datadir}/perl5' -EXTRA_CPANFLAGS ?= "" +FILES_${PN} += "${libdir}/perl5 ${datadir}/perl5" DEPENDS += "perl perl-native" RDEPENDS += "perl" @@ -49,3 +49,7 @@ def is_target(d): IS_NEW_PERL = "${@is_new_perl(d)}" PERLLIBDIRS = "${@perl_get_libdirs(d)}" + +FILES_${PN}-dbg += "${PERLLIBDIRS}/auto/*/.debug \ + ${PERLLIBDIRS}/auto/*/*/.debug \ + ${PERLLIBDIRS}/auto/*/*/*/.debug" -- cgit v1.2.3 From 42ddc315311e58bb3bbb75db06ef5743466a62a5 Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Fri, 4 May 2007 08:43:23 +0000 Subject: classes/magicbox-image.bbclass: Add a class that handles the generation of flash images for Magicbox It creates "ready-to-burn" squashfs and squashfs-lza images and a single file kernel+jffs2 image --- classes/magicbox-image.bbclass | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 classes/magicbox-image.bbclass (limited to 'classes') diff --git a/classes/magicbox-image.bbclass b/classes/magicbox-image.bbclass new file mode 100644 index 0000000000..05de28b76b --- /dev/null +++ b/classes/magicbox-image.bbclass @@ -0,0 +1,37 @@ +magicbox_gen_images() { + # find latest kernel + KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/uImage* | tail -1` + if [ -z "$KERNEL" ]; then + oefatal "No kernel found in ${DEPLOY_DIR_IMAGE}. Exiting !" + exit 1 + fi + + #squashfs + #We need to prep the image so that u-boot recognizes it + mv ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs.bin + ${STAGING_BINDIR_NATIVE}/mkimage -A ppc -O linux -T ramdisk -C none -n "OPLinux-uclibc-squashfs" \ + -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs.bin ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs + rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs.bin + + + #squashfs-lzma + #same as squashfs + mv ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs-lzma.bin + ${STAGING_BINDIR_NATIVE}/mkimage -A ppc -O linux -T ramdisk -C none -n "OPLinux-uclibc-squashfs-lzma" \ + -d ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs-lzma.bin ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.squashfs-lzma + rm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.squashfs-lzma.bin + + #kernel+jffs2 in a single image + #Add jffs2 marker at the end of the rootfs file + echo -ne '\xde\xad\xc0\xde' >> ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 + + + ( dd if=$KERNEL bs=65536 conv=sync; \ + dd if=${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.rootfs.jffs2 bs=65536 conv=sync; \ + ) > ${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.jffs2.flash.bin + +} + + + +IMAGE_POSTPROCESS_COMMAND += "magicbox_gen_images; " -- cgit v1.2.3 From 6701d4dcba6e603f861418cc8d309079bddde001 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 5 May 2007 16:34:06 +0000 Subject: insane.bbclass: on check for references to WORKDIR in RPATH, instead of WORKDIR and STAGING [18:23] likewise: would be my proposed fix for now, until we figure out if cross tooling need to RPATH to it's own libs. --- classes/insane.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 30b164b734..b39ac130a7 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -219,12 +219,12 @@ def package_qa_check_rpath(file,name,d): #bb.note("???%s???" % bad_dir_test) for line in txt: #bb.note("===%s===" % line) - if bad_dir_test in line: + if bad_dirin line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) #bb.note("Fixing RPATH for you in %s" % file) #os.popen("%s -r /lib %s" % (chrpath,file)) - return False + return True return True def package_qa_check_devdbg(path, name,d): -- cgit v1.2.3 From 54114230ff254768881b7b63de2a6cbcf9fa59e3 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 5 May 2007 16:38:42 +0000 Subject: insane.bbclass: repair last commit --- classes/insane.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index b39ac130a7..c3a211eefd 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -219,12 +219,12 @@ def package_qa_check_rpath(file,name,d): #bb.note("???%s???" % bad_dir_test) for line in txt: #bb.note("===%s===" % line) - if bad_dirin line: + if bad_dir in line: package_qa_write_error( 1, name, file, d) bb.error("QA Issue package %s contains bad RPATH %s in file %s" % (name, line, file)) #bb.note("Fixing RPATH for you in %s" % file) #os.popen("%s -r /lib %s" % (chrpath,file)) - return True + return False return True def package_qa_check_devdbg(path, name,d): -- cgit v1.2.3 From 9dcd087a0fbe2866a0a002bf9a21415eeca66e36 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 10 May 2007 13:49:06 +0000 Subject: xfce.bbclass: update for 4.4.1 --- classes/xfce.bbclass | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'classes') diff --git a/classes/xfce.bbclass b/classes/xfce.bbclass index 8124dc877c..ecc00825bc 100644 --- a/classes/xfce.bbclass +++ b/classes/xfce.bbclass @@ -6,14 +6,9 @@ HOMEPAGE = "http://www.xfce.org" LICENSE = "LGPL-2" +DEPENDS += "startup-notification" -def xfce_extension(ver): - ext = "gz" - if ver == "4.3.99.2": - ext = "bz2" - return ext - -SRC_URI = "http://www.us.xfce.org/archive/xfce-${PV}/src/${PN}-${PV}.tar.${@xfce_extension("${PV}")}" +SRC_URI = "http://www.us.xfce.org/archive/xfce-${PV}/src/${PN}-${PV}.tar.bz2" inherit autotools -- cgit v1.2.3 From 2e2348dbf283fe186a7e45a4823b56fed70d47f0 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 11 May 2007 11:43:28 +0000 Subject: devshell.bbclass, patch.bbclass: Check exit code of TERMCMD* commands to see if they were found at all. * Fixes #2274. --- classes/devshell.bbclass | 4 ++++ classes/patch.bbclass | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/devshell.bbclass b/classes/devshell.bbclass index 06152ef8bc..09ce100fc4 100644 --- a/classes/devshell.bbclass +++ b/classes/devshell.bbclass @@ -6,6 +6,10 @@ do_devshell[nostamp] = "1" devshell_do_devshell() { export TERMWINDOWTITLE="Bitbake Developer Shell" ${TERMCMD} + if [ $? -eq 127 ]; then + echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable." + exit 1 + fi } addtask devshell after do_patch diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 84cca7f5a0..7a5dcac57a 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -376,7 +376,10 @@ def patch_init(d): os.environ['TERMWINDOWTITLE'] = "Bitbake: Please fix patch rejects manually" os.environ['TERMRCFILE'] = rcfile - os.system(bb.data.getVar('TERMCMDRUN', d, 1)) + rc = os.system(bb.data.getVar('TERMCMDRUN', d, 1)) + if os.WIFEXITED(rc) and os.WEXITSTATUS(rc) == 127: + bb.msg.fatal(bb.msg.domain.Build, ("Cannot proceed with manual patch resolution - '%s' not found. " \ + + "Check TERMCMDRUN variable.") % bb.data.getVar('TERMCMDRUN', d, 1)) # Construct a new PatchSet after the user's changes, compare the # sets, checking patches for modifications, and doing a remote -- cgit v1.2.3 From 500967160d58626953ec52c4f927445aed6150b2 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 11 May 2007 11:45:42 +0000 Subject: devshell.bbclass, patch.bbclass: Error on any non-zero rc from TERMCMD*. * Suggested by Richard Purdie. * Closes #2274. --- classes/devshell.bbclass | 2 +- classes/patch.bbclass | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/devshell.bbclass b/classes/devshell.bbclass index 09ce100fc4..35456b517b 100644 --- a/classes/devshell.bbclass +++ b/classes/devshell.bbclass @@ -6,7 +6,7 @@ do_devshell[nostamp] = "1" devshell_do_devshell() { export TERMWINDOWTITLE="Bitbake Developer Shell" ${TERMCMD} - if [ $? -eq 127 ]; then + if [ $? -ne 0 ]; then echo "Fatal: '${TERMCMD}' not found. Check TERMCMD variable." exit 1 fi diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 7a5dcac57a..12657fa0f6 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -377,7 +377,7 @@ def patch_init(d): os.environ['TERMWINDOWTITLE'] = "Bitbake: Please fix patch rejects manually" os.environ['TERMRCFILE'] = rcfile rc = os.system(bb.data.getVar('TERMCMDRUN', d, 1)) - if os.WIFEXITED(rc) and os.WEXITSTATUS(rc) == 127: + if os.WIFEXITED(rc) and os.WEXITSTATUS(rc) != 0: bb.msg.fatal(bb.msg.domain.Build, ("Cannot proceed with manual patch resolution - '%s' not found. " \ + "Check TERMCMDRUN variable.") % bb.data.getVar('TERMCMDRUN', d, 1)) -- cgit v1.2.3 From e53ffad76b4b9c487da1610585927dbb1af7fe12 Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Sat, 12 May 2007 08:45:28 +0000 Subject: classes/oplinux-mirrors.bbclass: Add mirrors for OPLinux distro --- classes/oplinux-mirrors.bbclass | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 classes/oplinux-mirrors.bbclass (limited to 'classes') diff --git a/classes/oplinux-mirrors.bbclass b/classes/oplinux-mirrors.bbclass new file mode 100644 index 0000000000..6e9d051c3f --- /dev/null +++ b/classes/oplinux-mirrors.bbclass @@ -0,0 +1,21 @@ +MIRRORS_append () { +ftp://.*/.*/ http://www.ifaistos.awmn/oplinux/stable/sources/ +http://.*/.*/ http://www.ifaistos.awmn/oplinux/stable/sources/ +ftp://.*/.*/ http://www.ifaistos.awmn/oplinux/unstable/sources/ +http://.*/.*/ http://www.ifaistos.awmn/oplinux/unstable/sources/ + +ftp://.*/.*/ http://www.ifaistos.awmn/oplinux-uclibc/stable/sources/ +http://.*/.*/ http://www.ifaistos.awmn/oplinux-uclibc/stable/sources/ +ftp://.*/.*/ http:///www.ifaistos.awmn/oplinux-uclibc/unstable/sources/ +http://.*/.*/ http://www.ifaistos.awmn/oplinux-uclibc/unstable/sources/ + +ftp://.*/.*/ http://digital-opsis.com/oplinux/stable/sources/ +http://.*/.*/ http://digital-opsis.com/oplinux/stable/sources/ +ftp://.*/.*/ http://digital-opsis.com/oplinux/unstable/sources/ +http://.*/.*/ http://digital-opsis.com/oplinux/unstable/sources/ + +ftp://.*/.*/ http://digital-opsis.com/oplinux-uclibc/stable/sources/ +http://.*/.*/ http://digital-opsis.com/oplinux-uclibc/stable/sources/ +ftp://.*/.*/ http://digital-opsis.com/oplinux-uclibc/unstable/sources/ +http://.*/.*/ http://digital-opsis.com/oplinux-uclibc/unstable/sources/ +} -- cgit v1.2.3 From 3cdb79fe03305424a9101c897719bacbd4620ca1 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 12 May 2007 19:51:53 +0000 Subject: insane.bbclass: add support for ARM EABI/uclibc --- classes/insane.bbclass | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index c3a211eefd..385db31784 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -63,7 +63,12 @@ def package_qa_get_machine_dict(): "arm" : (40, 0, 0, True, True), "armeb" : (40, 0, 0, False, True), }, - } + "linux-uclibcgnueabi" : { + "arm" : (40, 0, 0, True, True), + "armeb" : (40, 0, 0, False, True), + }, + + } # factory for a class, embedded in a method def package_qa_get_elf(path, bits32): -- cgit v1.2.3 From 002caab239157d1062a3f49b62efb06ef0489280 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 15 May 2007 12:52:57 +0000 Subject: libtool, autotools.bbclass: merge fixes for 1.5.10 from poky * NOTE: 1.5.22 has to be updated as well --- classes/autotools.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'classes') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 33546e0eb6..3c555751da 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -15,6 +15,10 @@ def autotools_dep_prepend(d): if not pn in ['libtool', 'libtool-native', 'libtool-cross']: deps += 'libtool-native ' + if not bb.data.inherits_class('native', d) \ + and not bb.data.inherits_class('cross', d) \ + and not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d, 1): + deps += 'libtool-cross ' return deps + 'gnu-config-native ' -- cgit v1.2.3 From 6c644a5c61dd3b814db20de7deefbe7485a7142a Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 16 May 2007 11:33:13 +0000 Subject: gtk-icon-cache.bbclass: postinst scripts need hicolor-icon-theme (bunch of directories + 1 small textfile), so add it to RDEPENDS --- classes/gtk-icon-cache.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/gtk-icon-cache.bbclass b/classes/gtk-icon-cache.bbclass index 0f68e6812b..855a72a2f7 100644 --- a/classes/gtk-icon-cache.bbclass +++ b/classes/gtk-icon-cache.bbclass @@ -1,4 +1,5 @@ FILES_${PN} += "${datadir}/icons/hicolor" +RDEPENDS += " hicolor-icon-theme " gtk-icon-cache_postinst() { if [ "x$D" != "x" ]; then -- cgit v1.2.3 From 9df6b90150a759edd06afae0ea5f362650cff8cd Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 17 May 2007 08:04:19 +0000 Subject: insane.bbclass: fix sdk builds --- classes/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 385db31784..9f243c8c9a 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -273,7 +273,7 @@ def package_qa_check_arch(path,name,d): target_arch = bb.data.getVar('TARGET_ARCH', d, True) # FIXME: Cross package confuse this check, so just skip them - if bb.data.inherits_class('cross', d): + if bb.data.inherits_class('cross', d) or bb.data.inherits_class('sdk', d): return True # avoid following links to /usr/bin (e.g. on udev builds) -- cgit v1.2.3 From 0426f652aa877ed70e4a974a2be5048eebba4382 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 17 May 2007 08:31:26 +0000 Subject: sdk.bbclass: also package debug files --- classes/sdk.bbclass | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass index bcabbc79bd..834081fccc 100644 --- a/classes/sdk.bbclass +++ b/classes/sdk.bbclass @@ -20,7 +20,11 @@ prefix = "/usr/local/${SDK_NAME}" exec_prefix = "${prefix}" base_prefix = "${exec_prefix}" -FILES_${PN} = "${prefix}" +PACKAGES =+ "${PN}-dbg" +FILES_${PN} = "${prefix}" +FILES_${PN}-dbg += "${prefix}/bin/.debug \ + ${prefix}/sbin/.debug \ + " -- cgit v1.2.3 From 052a3d9788c209d84bd60a13d2f3c7c940816c9f Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 19 May 2007 13:02:02 +0000 Subject: seppuku.bbclass: start removing openmoko crap --- classes/seppuku.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 4c0d4f9a82..6034c0262c 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -32,7 +32,7 @@ def seppuku_login(opener, login, user, password): the resulting page then @param opened = cookie enabled urllib2 opener - @param login = http://bugzilla.openmoko.org/cgi-bin/bugzilla/query.cgi? + @param login = http://bugs.openembedded.org/query.cgi? @param user = Your username @param password = Your password """ @@ -142,7 +142,7 @@ def seppuku_reopen_bug(poster, file, product, component, bug_number, bugname, te Same as with opening a new report, some bits need to be inside the url - http://bugzilla.openmoko.org/cgi-bin/bugzilla/process_bug.cgi?id=239&bug_file_loc=http%3A%2F%2F&version=2007&longdesclength=2&product=OpenMoko&component=autobuilds&comment=bla&priority=P2&bug_severity=normal&op_sys=Linux&rep_platform=Neo1973&knob=reopen&target_milestone=Phase+0&short_desc=foo + http://bugs.openembedded.org/process_bug.cgi?id=239&bug_file_loc=http%3A%2F%2F&version=2007&longdesclength=2&product=OpenMoko&component=autobuilds&comment=bla&priority=P2&bug_severity=normal&op_sys=Linux&rep_platform=Neo1973&knob=reopen&target_milestone=Phase+0&short_desc=foo """ import urllib2 @@ -177,7 +177,7 @@ def seppuku_file_bug(poster, file, product, component, bugname, text): Create a completely new bug report - http://bugzilla.openmoko.org/cgi-bin/bugzilla/post_bug.cgi?bug_file_loc=http%3A%2F%2F&version=2007&product=OpenMoko&component=autobuilds&short_desc=foo&comment=bla&priority=P2&bug_severity=normal&op_sys=Linux&rep_platform=Neo1973 + http://bugs.openembedded.org/post_bug.cgi?bug_file_loc=http%3A%2F%2F&version=2007&product=OpenMoko&component=autobuilds&short_desc=foo&comment=bla&priority=P2&bug_severity=normal&op_sys=Linux&rep_platform=Neo1973 You are forced to add some default values to the bugzilla query and stop with '&' -- cgit v1.2.3 From be570b857c1610b616a5a635f0fa233eab9ed242 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 19 May 2007 14:54:30 +0000 Subject: seppuku.bbclass: replace all examples with OE examples --- classes/seppuku.bbclass | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 6034c0262c..84dff92504 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -116,12 +116,12 @@ def seppuku_find_bug_report(opener, query, product, component, bugname): and the status. @param opener = urllib2 opener - @param query = e.g. https://bugzilla.openmoko.org/cgi-bin/bugzilla/query.cgi? + @param query = e.g. http://bugs.openembedded.org/query.cgi? @param product = search for this product @param component = search for this component @param bugname = the bug to search for - https://bugzilla.openmoko.org/cgi-bin/bugzilla/buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=OpenMoko&emailreporter2=1&emailtype2=substring&email2=freyther%40yahoo.com + http://bugs.openembedded.org/buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=Openembedded&emailreporter2=1&emailtype2=substring&email2=freyther%40yahoo.com but it does not support ctype=csv... """ result = opener.open("%(query)s?product=%(product)s&component=%(component)s&short_desc_type=substring&short_desc=%(bugname)s" % vars()) @@ -142,7 +142,7 @@ def seppuku_reopen_bug(poster, file, product, component, bug_number, bugname, te Same as with opening a new report, some bits need to be inside the url - http://bugs.openembedded.org/process_bug.cgi?id=239&bug_file_loc=http%3A%2F%2F&version=2007&longdesclength=2&product=OpenMoko&component=autobuilds&comment=bla&priority=P2&bug_severity=normal&op_sys=Linux&rep_platform=Neo1973&knob=reopen&target_milestone=Phase+0&short_desc=foo + http://bugs.openembedded.org/process_bug.cgi?id=239&bug_file_loc=http%3A%2F%2F&version=Angstrom&longdesclength=2&product=Openembedded&component=Build&comment=bla&priority=P2&bug_severity=normal&op_sys=Linux&rep_platform=Other&knob=reopen&short_desc=foo """ import urllib2 @@ -177,7 +177,7 @@ def seppuku_file_bug(poster, file, product, component, bugname, text): Create a completely new bug report - http://bugs.openembedded.org/post_bug.cgi?bug_file_loc=http%3A%2F%2F&version=2007&product=OpenMoko&component=autobuilds&short_desc=foo&comment=bla&priority=P2&bug_severity=normal&op_sys=Linux&rep_platform=Neo1973 + http://bugs.openembedded.org/post_bug.cgi?bug_file_loc=http%3A%2F%2F&version=Angstrom&product=Openembedded&component=Build&short_desc=foo&comment=bla&priority=P2&bug_severity=normal&op_sys=Linux&rep_platform=Other You are forced to add some default values to the bugzilla query and stop with '&' -- cgit v1.2.3 From 5ca297a37b711cba71317fd82292d3fb8fccf3f3 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Sat, 19 May 2007 19:42:56 +0000 Subject: classes/seppuku.bbclass: Merge with the one used at openmoko's autobuilder -Properly quote the PR, PV and such. -Log communication with the bugzilla to a log file for inspection. --- classes/seppuku.bbclass | 66 +++++++++++++++++++++++++++++++++++-------------- 1 file changed, 47 insertions(+), 19 deletions(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 84dff92504..937c973ad5 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -110,7 +110,7 @@ def seppuku_find_bug_report_old(): -def seppuku_find_bug_report(opener, query, product, component, bugname): +def seppuku_find_bug_report(debug_file, opener, query, product, component, bugname): """ Find a bug report with the sane name and return the bug id and the status. @@ -124,6 +124,11 @@ def seppuku_find_bug_report(opener, query, product, component, bugname): http://bugs.openembedded.org/buglist.cgi?short_desc_type=substring&short_desc=manual+test+bug&product=Openembedded&emailreporter2=1&emailtype2=substring&email2=freyther%40yahoo.com but it does not support ctype=csv... """ + import urllib + product = urllib.quote(product) + component = urllib.quote(component) + bugname = urllib.quote(bugname) + result = opener.open("%(query)s?product=%(product)s&component=%(component)s&short_desc_type=substring&short_desc=%(bugname)s" % vars()) if result.code != 200: raise "Can not query the bugzilla at all" @@ -131,8 +136,13 @@ def seppuku_find_bug_report(opener, query, product, component, bugname): scanner = seppuku_find_bug_report_old() scanner.feed(txt) if len(scanner.result()) == 0: + print >> debug_file, "Scanner failed to scan the html site" + print >> debug_file, "%(query)s?product=%(product)s&component=%(component)s&short_desc_type=substring&short_desc=%(bugname)s" % vars() + print >> debug_file, txt return (False,None) else: # silently pick the first result + print >> debug_file, "Result of bug search is " + print >> debug_file, txt (number,status) = scanner.result()[0] return (not status in ["CLOS", "RESO", "VERI"],number) @@ -206,12 +216,17 @@ def seppuku_file_bug(poster, file, product, component, bugname, text): print e return False - if result.code != 200: - return False + # scan the result for a bug number + # it will look like + # 'Back To BUG# 308' + import re + res = re.findall(("\>Back To BUG\# (?P\d+)\"), result.read() ) + if result.code != 200 or len(res) != 1: + return None else: - return True + return res[0] -def seppuku_create_attachment(poster, attach_query, product, component, bug_number, text, file): +def seppuku_create_attachment(debug, poster, attach_query, product, component, bug_number, text, file): """ Create a new attachment for the failed report @@ -235,7 +250,7 @@ def seppuku_create_attachment(poster, attach_query, product, component, bug_numb print e return False - print result.read() + print >> debug, result.read() if result.code != 200: return False else: @@ -284,12 +299,15 @@ python seppuku_eventhandler() { passw = bb.data.getVar("SEPPUKU_PASS", data, True) product = bb.data.getVar("SEPPUKU_PRODUCT", data, True) component = bb.data.getVar("SEPPUKU_COMPONENT", data, True) + # evil hack to figure out what is going on + debug_file = open(os.path.join(bb.data.getVar("TMPDIR", data, True),"..","seppuku-log"),"a") if not seppuku_login(opener, login, user, passw): bb.note("Login to bugzilla failed") + print >> debug_file, "Login to bugzilla failed" return NotHandled else: - print "Logged into the box" + print >> debug_file, "Logged into the box" file = None if name == "TaskFailed": @@ -300,34 +318,44 @@ python seppuku_eventhandler() { log_file = glob.glob("%s/log.%s.*" % (bb.data.getVar('T', event.data, True), event.task)) text = "The package failed to build at %s" % bb.data.getVar('DATETIME', data, True) if len(log_file) != 0: - file = open(log_file[0], 'r') + print >> debug_file, "Adding log file %s" % log_file[0] + file = open(log_file[0], 'r') + else: + print >> debug_file, "No log file found for the glob" elif name == "NoProvider": bugname = "noprovider for %s runtime: %s" % (event.getItem, event.getisRuntime) text = "Please fix it" else: + print >> debug_file, "Unknown name '%s'" % name assert False - (bug_open, bug_number) = seppuku_find_bug_report(opener, query, product, component, bugname) - - bb.note("Bug is open: %s and bug number: %s" % (bug_open, bug_number)) + (bug_open, bug_number) = seppuku_find_bug_report(debug_file, opener, query, product, component, bugname) + print >> debug_file, "Bug is open: %s and bug number: %s" % (bug_open, bug_number) # The bug is present and still open, no need to attach an error log if bug_number and bug_open: - bb.note("The bug is known as '%s'" % bug_number) + print >> debug_file, "The bug is known as '%s'" % bug_number return NotHandled if bug_number and not bug_open: if not seppuku_reopen_bug(poster, reopen, product, component, bug_number, bugname, text): - bb.note("Failed to reopen the bug report") - elif not seppuku_file_bug(poster, newbug, product, component, bugname, text): - bb.note("Filing a bugreport failed") + print >> debug_file, "Failed to reopen the bug report" + else: + print >> debug_file, "Reopened the bug report" + else: + bug_number = seppuku_file_bug(poster, newbug, product, component, bugname, text) + if not bug_number: + print >> debug_file, "Filing a bugreport failed" else: - # get the new bug number and create an attachment - (bug_open, bug_number) = seppuku_find_bug_report(opener, query, product, component, bugname) + print >> debug_file, "The new bug_number: '%s'" % bug_number if file: - if not seppuku_create_attachment(poster, attach, product, component, bug_number, text, file): - bb.note("Failed to attach the build log") + if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file): + print >> debug_file, "Failed to attach the build log" + else: + print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, component, bug_number) + else: + print >> debug_file, "Not trying to create an attachment" return NotHandled } -- cgit v1.2.3 From 9375e3001c13e0ebe5290a024dc7c61d6696d4f6 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 19 May 2007 23:03:37 +0000 Subject: native.bbclass: Unset CONFIG_SITE since we shouldn't be using site files for native builds --- classes/native.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'classes') diff --git a/classes/native.bbclass b/classes/native.bbclass index 556c0e17e2..43000f96bf 100644 --- a/classes/native.bbclass +++ b/classes/native.bbclass @@ -39,6 +39,9 @@ LDFLAGS_build-darwin = "-L${STAGING_DIR}/${BUILD_SYS}/lib " STAGING_BINDIR = "${STAGING_BINDIR_NATIVE}" STAGING_BINDIR_CROSS = "${STAGING_BINDIR_NATIVE}" +# Don't use site files for native builds +export CONFIG_SITE = "" + # set the compiler as well. It could have been set to something else export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}" export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}" -- cgit v1.2.3 From db6f1c786efb1b7ffec5f84b8a11c6066370c59c Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Thu, 24 May 2007 19:49:06 +0000 Subject: classes/icecc.bbclass : Make sure that PARALLEL_MAKE is set to null if the package is not to use the icecc scheduler. In this way you don't end up with -jX to be handled by a single cpu/machine Remove glibc and add glibc-intermediate in the list of packages not use the icecc scheduler --- classes/icecc.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/icecc.bbclass b/classes/icecc.bbclass index 5fadee4ab6..446e78ae1a 100644 --- a/classes/icecc.bbclass +++ b/classes/icecc.bbclass @@ -253,10 +253,11 @@ def icc_path(bb,d,compile): #"system" package blacklist contains a list of packages that can not distribute compile tasks #for one reason or the other - system_package_blacklist = [ "uclibc", "glibc", "qemu" ] + system_package_blacklist = [ "uclibc", "glibc-intermediate", "qemu" ] for black in system_package_blacklist: if black in package_tmp: + bb.data.setVar('PARALLEL_MAKE' , '', d) return "" #user defined exclusion list @@ -265,6 +266,7 @@ def icc_path(bb,d,compile): for black in user_package_blacklist: if black in package_tmp: + bb.data.setVar('PARALLEL_MAKE' , '', d) return "" -- cgit v1.2.3 From cf36873df36aaef19f37b16a1786d8c060b26932 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Tue, 29 May 2007 09:06:02 +0000 Subject: classes/qpf.bbclass: removed set -e from postinst/prerm scripts so that it doesn't fail on sourcing in /etc/profile. Closes #2388 --- classes/qpf.bbclass | 4 ---- 1 file changed, 4 deletions(-) (limited to 'classes') diff --git a/classes/qpf.bbclass b/classes/qpf.bbclass index d6e58871d5..67761bd4be 100644 --- a/classes/qpf.bbclass +++ b/classes/qpf.bbclass @@ -9,15 +9,11 @@ do_compile() { } pkg_postinst_fonts() { -#!/bin/sh -set -e . /etc/profile ${sbindir}/update-qtfontdir } pkg_postrm_fonts() { -#!/bin/sh -set -e . /etc/profile ${sbindir}/update-qtfontdir -f } -- cgit v1.2.3 From 4718993d8fb5bd0ee58d7de3c47cefd6b055cdf1 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Tue, 29 May 2007 19:19:06 +0000 Subject: classes/insane.bbclass: quote filenames to avoid problems with funny characters. Closes bug #2227 --- classes/insane.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 9f243c8c9a..bea11305a7 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -219,7 +219,7 @@ def package_qa_check_rpath(file,name,d): bb.fatal("This class assumed that WORKDIR is ${TMPDIR}/work... Not doing any check") #bb.note("%s -B -F%%r#F %s" % (scanelf,file)) - output = os.popen("%s -B -F%%r#F %s" % (scanelf,file)) + output = os.popen("%s -B -F%%r#F '%s'" % (scanelf,file)) txt = output.readline().split() #bb.note("???%s???" % bad_dir_test) for line in txt: -- cgit v1.2.3 From 39611c22b7715ebba0f61c7a32a237373243d699 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Wed, 30 May 2007 06:55:33 +0000 Subject: perl 5.8.8: Patch MakeMaker in perl-native to check for PERL_INC in the environment and use that instead of the configured location of PERL_INC. Without this PERL_INC for non-native recipes ends up pointing at where the headers will be located on the target. In theory we could override this in cpan class when calling build.PL but for some packages, such as libxml-parser-perl, that only fixes the top-level makefile and is not propagated to the sub-makefiles. This change results in MakeMaker always picking up the correct staged location of the include files without effecting where they expect to be found on the target. --- classes/cpan.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 3b1a2b72ca..4fff5974c1 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -8,6 +8,9 @@ EXTRA_CPANFLAGS ?= "" # Env var which tells perl if it should use host (no) or target (yes) settings export PERLCONFIGTARGET = "${@is_target(d)}" +# Env var which tells perl where the perl include files are +export PERL_INC = "${STAGING_DIR}/${BUILD_SYS}/lib/perl/${@get_perl_version(d)}/CORE" + cpan_do_configure () { yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS} if [ "${BUILD_SYS}" != "${HOST_SYS}" ]; then -- cgit v1.2.3 From 4845fa55fc30c9660261fe49f645829824a40753 Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Wed, 30 May 2007 12:48:58 +0000 Subject: perl 5.8.8: Fixes for uclibc and libxml-parser-perl. * Stage the headers from perl * Modify cpan.bbclass to use the appropriate headers. * Remove prototypes as well as disabling functions that uclibc doesn't support. * Bump PR on libxml-parser-perl to force it to be rebuilt. Previously it was always using the headers from native-perl, since the headers were the same for native and target... but that's only true in the case of glibc, for uclibc the headers are different. --- classes/cpan.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/cpan.bbclass b/classes/cpan.bbclass index 4fff5974c1..3250528c7a 100644 --- a/classes/cpan.bbclass +++ b/classes/cpan.bbclass @@ -9,7 +9,7 @@ EXTRA_CPANFLAGS ?= "" export PERLCONFIGTARGET = "${@is_target(d)}" # Env var which tells perl where the perl include files are -export PERL_INC = "${STAGING_DIR}/${BUILD_SYS}/lib/perl/${@get_perl_version(d)}/CORE" +export PERL_INC = "${STAGING_LIBDIR}/perl/${@get_perl_version(d)}/CORE" cpan_do_configure () { yes '' | perl Makefile.PL ${EXTRA_CPANFLAGS} -- cgit v1.2.3 From 80ca3b81c1abf44a356604814ba859c7f833248f Mon Sep 17 00:00:00 2001 From: Jamie Lenehan Date: Wed, 30 May 2007 22:10:32 +0000 Subject: cpan-base.bbclass: Update the perl depenedencies: * For native modules DEPEND on perl-native and for others DEPEND on perl (which in turn depends on perl-native) rather then always depending on both perl and perl-native. * Only RDEPEND for non-native modules rather then both native and non-native. These changes are to allow you to build native modules without have to build perl. Previously the dependencies would result in perl being built even though it didn't actually need to. Thanks to hrw for pointing out what was happening here. --- classes/cpan-base.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/cpan-base.bbclass b/classes/cpan-base.bbclass index a5fdb33895..cc0d11e515 100644 --- a/classes/cpan-base.bbclass +++ b/classes/cpan-base.bbclass @@ -4,8 +4,8 @@ # FILES_${PN} += "${libdir}/perl5 ${datadir}/perl5" -DEPENDS += "perl perl-native" -RDEPENDS += "perl" +DEPENDS += "${@["perl", "perl-native"][(bb.data.inherits_class('native', d))]}" +RDEPENDS += "${@["perl", ""][(bb.data.inherits_class('native', d))]}" # Determine the staged version of perl from the perl configuration file def get_perl_version(d): -- cgit v1.2.3 From bcc112c6a2a46860a90c96234d0756977cfeebc6 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 31 May 2007 19:29:54 +0000 Subject: siteinfo.bbclass: add rudimentary avr32 support --- classes/siteinfo.bbclass | 2 ++ 1 file changed, 2 insertions(+) (limited to 'classes') diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index 6868750d2d..43a9b55b28 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -29,6 +29,8 @@ def get_siteinfo_list(d): "arm-linux-gnueabi": "endian-little bit-32 common-glibc arm-common arm-linux",\ "arm-linux-uclibc": "endian-little bit-32 common-uclibc arm-common",\ "arm-linux-uclibcgnueabi": "endian-little bit-32 common-uclibc arm-common arm-linux-uclibc",\ + "avr32-linux": "endian-big bit-32 common-glibc",\ + "avr32-linux-uclibc": "endian-big bit-32 common-uclibc",\ "i386-linux": "endian-little bit-32 common-glibc ix86-common",\ "i486-linux": "endian-little bit-32 common-glibc ix86-common",\ "i586-linux": "endian-little bit-32 common-glibc ix86-common",\ -- cgit v1.2.3 From 23b1fb4403958090bd98650eb5d779215ae7c46f Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 1 Jun 2007 15:29:05 +0000 Subject: insane.bbclass: add avr32 support --- classes/insane.bbclass | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index bea11305a7..963ace4221 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -54,10 +54,11 @@ def package_qa_get_machine_dict(): "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), - "mipsel": ( 8, 0, 0, True, True), + "arm" : ( 40, 97, 0, True, True), + "armeb": ( 40, 97, 0, False, True), + "powerpc": ( 20, 0, 0, False, True), + "mipsel": ( 8, 0, 0, True, True), + "avr32": (6317, 0, 0, False, True), }, "linux-gnueabi" : { "arm" : (40, 0, 0, True, True), -- cgit v1.2.3 From e4084dd86eb3baae39d015628f2ae7b4f5c5526f Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 2 Jun 2007 08:38:31 +0000 Subject: kernel-arch.bbclass: add avr32 support --- classes/kernel-arch.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/kernel-arch.bbclass b/classes/kernel-arch.bbclass index c50a7d5ebf..3804cd71b8 100644 --- a/classes/kernel-arch.bbclass +++ b/classes/kernel-arch.bbclass @@ -11,7 +11,8 @@ valid_archs = "alpha cris ia64 \ arm arm26 \ m32r mips \ sh sh64 um h8300 \ - parisc s390 v850" + parisc s390 v850 \ + avr32" def map_kernel_arch(a, d): import bb, re -- cgit v1.2.3 From 43c0e490400a24a50edf8f7ec50a7532ba691523 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sun, 3 Jun 2007 13:02:05 +0000 Subject: classes/insane: fixed a bug with undefined 'name' and improved output a bit. --- classes/insane.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 963ace4221..e6f4f1440d 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -393,9 +393,9 @@ def package_qa_check_rdepends(pkg, workdir, d): # Now do the sanity check!!! for rdepend in rdepends: if "-dbg" in rdepend: - package_qa_write_error( 2, name, rdepend, d ) - bb.error("QA issue, koen give us a better msg!!!") - if package_qa_make_fatal_error( 2, name, rdepend, d ): + package_qa_write_error( 2, pkgname, rdepend, d ) + bb.error("QA issue: %s rdepends on %s" % (pkgname,rdepend)) + if package_qa_make_fatal_error( 2, pkgname, rdepend, d ): sane = False return sane -- cgit v1.2.3 From 77df7f179c2f4ea1c86f350173c486ed14d4040b Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 6 Jun 2007 21:41:23 +0000 Subject: palmtop.bbclass: Finally, set qte library variant (MT vs non-MT) at the proper place. --- classes/palmtop.bbclass | 1 + classes/qmake-base.bbclass | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/palmtop.bbclass b/classes/palmtop.bbclass index 39b9bd2b60..e99b31aaa3 100644 --- a/classes/palmtop.bbclass +++ b/classes/palmtop.bbclass @@ -16,6 +16,7 @@ EXTRA_QMAKEVARS_POST += "DEFINES+=QWS CONFIG+=qt ${CPP_SUPPORT_LIB}" EXTRA_QMAKEVARS_POST += '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "CONFIG+=thread", "CONFIG-=thread",d)}' EXTRA_QMAKEVARS_POST += "${@["LIBS+=-lqpe ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}" DEPENDS_prepend = "${@["virtual/libqpe1 uicmoc-native ", ""][(bb.data.getVar('PN', d, 1) == 'libqpe-opie')]}" +QT_LIBRARY = '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte", d)}' PACKAGES = "${PN}-dbg ${PN}-dev ${PN} ${PN}-doc ${PN}-locale" FILES_${PN} = " ${palmtopdir} " diff --git a/classes/qmake-base.bbclass b/classes/qmake-base.bbclass index 09694e97b8..5ca3ee2904 100644 --- a/classes/qmake-base.bbclass +++ b/classes/qmake-base.bbclass @@ -23,7 +23,7 @@ export OE_QMAKE_RPATH="-Wl,-rpath-link," # default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11 export OE_QMAKE_INCDIR_QT="${QTDIR}/include" export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib" -export OE_QMAKE_LIBS_QT="qte" +export OE_QMAKE_LIBS_QT="${QT_LIBRARY}" export OE_QMAKE_LIBS_X11="" oe_qmake_mkspecs () { -- cgit v1.2.3 From bd9c5903008e3852c0fbc0862cf59a17e77e870b Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Thu, 7 Jun 2007 23:21:13 +0000 Subject: classes/oplinux-mirrors.bbclass : Set mirrors to correct url. Remove local (i.e awmn) mirrors. --- classes/oplinux-mirrors.bbclass | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'classes') diff --git a/classes/oplinux-mirrors.bbclass b/classes/oplinux-mirrors.bbclass index 6e9d051c3f..076cd6f1fe 100644 --- a/classes/oplinux-mirrors.bbclass +++ b/classes/oplinux-mirrors.bbclass @@ -1,14 +1,7 @@ -MIRRORS_append () { -ftp://.*/.*/ http://www.ifaistos.awmn/oplinux/stable/sources/ -http://.*/.*/ http://www.ifaistos.awmn/oplinux/stable/sources/ -ftp://.*/.*/ http://www.ifaistos.awmn/oplinux/unstable/sources/ -http://.*/.*/ http://www.ifaistos.awmn/oplinux/unstable/sources/ - -ftp://.*/.*/ http://www.ifaistos.awmn/oplinux-uclibc/stable/sources/ -http://.*/.*/ http://www.ifaistos.awmn/oplinux-uclibc/stable/sources/ -ftp://.*/.*/ http:///www.ifaistos.awmn/oplinux-uclibc/unstable/sources/ -http://.*/.*/ http://www.ifaistos.awmn/oplinux-uclibc/unstable/sources/ +# Copyright (C) 2007, Stelios Koroneos - Digital OPSiS, All Rights Reserved +# Released under the MIT license (see packages/COPYING) +MIRRORS_append () { ftp://.*/.*/ http://digital-opsis.com/oplinux/stable/sources/ http://.*/.*/ http://digital-opsis.com/oplinux/stable/sources/ ftp://.*/.*/ http://digital-opsis.com/oplinux/unstable/sources/ -- cgit v1.2.3 From 3600fdc734db0d88d138e95073355046a61cc3ee Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Fri, 8 Jun 2007 14:32:52 +0000 Subject: distutils.bbclass: add some magic to remove paths pointing to buildsystems directories --- classes/distutils.bbclass | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'classes') diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass index 5f57a9ea19..db15cebdd7 100644 --- a/classes/distutils.bbclass +++ b/classes/distutils.bbclass @@ -10,6 +10,23 @@ distutils_do_install() { BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${D}/${prefix} --install-data=${D}/${datadir} || \ oefatal "python setup.py install execution failed." + + for i in `find ${D} -name "*.py"` ; do \ + sed -i -e s:${D}::g $i + done + + if test -e ${D}${bindir} ; then + for i in ${D}${bindir}/* ; do \ + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i + done + fi + + if test -e ${D}${sbindir} ; then + for i in ${D}${sbindir}/* ; do \ + sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i + done + fi + } EXPORT_FUNCTIONS do_compile do_install -- cgit v1.2.3 From 3d1cc5fa4517ab0cb65cec2be719d50bcbb5f6df Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sun, 10 Jun 2007 13:09:25 +0000 Subject: classes/qmake-base: reverted half a patch in order to fix qmake-based qte[-mt] builds. --- classes/qmake-base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/qmake-base.bbclass b/classes/qmake-base.bbclass index 5ca3ee2904..09694e97b8 100644 --- a/classes/qmake-base.bbclass +++ b/classes/qmake-base.bbclass @@ -23,7 +23,7 @@ export OE_QMAKE_RPATH="-Wl,-rpath-link," # default to qte2 via bb.conf, inherit qt3x11 to configure for qt3x11 export OE_QMAKE_INCDIR_QT="${QTDIR}/include" export OE_QMAKE_LIBDIR_QT="${QTDIR}/lib" -export OE_QMAKE_LIBS_QT="${QT_LIBRARY}" +export OE_QMAKE_LIBS_QT="qte" export OE_QMAKE_LIBS_X11="" oe_qmake_mkspecs () { -- cgit v1.2.3 From 03e9eca55c12eec52c8b9888d103a8d2dd2b1c86 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 10 Jun 2007 22:32:49 +0000 Subject: rootfs_ipk.bbclass: Add new option, PACKAGE_INSTALL_NO_DEPS. If set to 1, list of packages in PACKAGE_INSTALL installed as is, without any dependencies. * Useful for initrds, etc. * Closes #2469. --- classes/rootfs_ipk.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index 26eca34da9..210563aed1 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -7,10 +7,11 @@ do_rootfs[depends] += "ipkg-native:do_populate_staging ipkg-utils-native:do_populate_staging" -IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS}" +IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}" RDEPENDS += "ipkg ipkg-collateral" PACKAGE_INSTALL += "ipkg ipkg-collateral" +PACKAGE_INSTALL_NO_DEPS ?= "0" rootfs_ipk_do_indexes () { set -x -- cgit v1.2.3 From ef828c09c96cdc47f0b6901f2ee83cdb4bbcc8ec Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 11 Jun 2007 12:51:28 +0000 Subject: Blackfin support: * siteinfo.bbclass, bfin-common: autofoo support * kernel-arch.bbclass, linux-libc-headers_2.6.20.bb: bfin -> blackfin mapping for the kernel * insane.bbclass: stubs for bfin arch, needs proper number, but that will get reported when it encounters the first binary * uclibc: config for adsp-bf537-stamp machine * adsp-bf537-stamp.conf: machine description for adsp-bf537-stamp board (http://www.analog.com/en/prod/0%2C2877%2CBF537%25252DSTAMP%2C00.html) The build currently stops in binutils cross with the "ld not supported on this archicture" message --- classes/insane.bbclass | 3 ++- classes/kernel-arch.bbclass | 5 +++-- classes/siteinfo.bbclass | 5 +++-- 3 files changed, 8 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index e6f4f1440d..d983af3f9f 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -58,7 +58,8 @@ def package_qa_get_machine_dict(): "armeb": ( 40, 97, 0, False, True), "powerpc": ( 20, 0, 0, False, True), "mipsel": ( 8, 0, 0, True, True), - "avr32": (6317, 0, 0, False, True), + "avr32": (6317, 0, 0, False, True), + "bfin": ( 0, 0, 0, True, True), }, "linux-gnueabi" : { "arm" : (40, 0, 0, True, True), diff --git a/classes/kernel-arch.bbclass b/classes/kernel-arch.bbclass index 3804cd71b8..9208c3507a 100644 --- a/classes/kernel-arch.bbclass +++ b/classes/kernel-arch.bbclass @@ -12,7 +12,7 @@ valid_archs = "alpha cris ia64 \ m32r mips \ sh sh64 um h8300 \ parisc s390 v850 \ - avr32" + avr32 blackfin" def map_kernel_arch(a, d): import bb, re @@ -24,7 +24,8 @@ def map_kernel_arch(a, d): elif re.match('armeb$', a): return 'arm' elif re.match('mipsel$', a): return 'mips' elif re.match('sh(3|4)$', a): return 'sh' - elif a in valid_archs: return a + elif re.match('bfin', a): return 'blackfin' + elif a in valid_archs: return a else: bb.error("cannot map '%s' to a linux kernel architecture" % a) diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index 43a9b55b28..db1dbf19b4 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -29,8 +29,9 @@ def get_siteinfo_list(d): "arm-linux-gnueabi": "endian-little bit-32 common-glibc arm-common arm-linux",\ "arm-linux-uclibc": "endian-little bit-32 common-uclibc arm-common",\ "arm-linux-uclibcgnueabi": "endian-little bit-32 common-uclibc arm-common arm-linux-uclibc",\ - "avr32-linux": "endian-big bit-32 common-glibc",\ - "avr32-linux-uclibc": "endian-big bit-32 common-uclibc",\ + "avr32-linux": "endian-big bit-32 common-glibc avr32-common",\ + "avr32-linux-uclibc": "endian-big bit-32 common-uclibc avr32-common",\ + "bfin-linux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\ "i386-linux": "endian-little bit-32 common-glibc ix86-common",\ "i486-linux": "endian-little bit-32 common-glibc ix86-common",\ "i586-linux": "endian-little bit-32 common-glibc ix86-common",\ -- cgit v1.2.3 From 95a9f53c62fd89cf46c02682f71b1e58df894022 Mon Sep 17 00:00:00 2001 From: Jake Morrison Date: Mon, 11 Jun 2007 16:27:22 +0000 Subject: distutils-base: improve packaging of debug packages (approved by Mickeyl) - close #2443 and probably few others --- classes/distutils-base.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/distutils-base.bbclass b/classes/distutils-base.bbclass index 15e945d518..db006b8c77 100644 --- a/classes/distutils-base.bbclass +++ b/classes/distutils-base.bbclass @@ -11,4 +11,5 @@ def python_dir(d): PYTHON_DIR = "${@python_dir(d)}" FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}" +FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/${SRCNAME}/.debug" -- cgit v1.2.3 From e2c51316c4d0aaa08b54f20c37506a78559c31f3 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 12 Jun 2007 07:55:55 +0000 Subject: siteinfo,insane: blackfin is uclinux, not linux --- classes/insane.bbclass | 4 +++- classes/siteinfo.bbclass | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index d983af3f9f..08c1058edf 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -59,8 +59,10 @@ def package_qa_get_machine_dict(): "powerpc": ( 20, 0, 0, False, True), "mipsel": ( 8, 0, 0, True, True), "avr32": (6317, 0, 0, False, True), - "bfin": ( 0, 0, 0, True, True), }, + "uclinux-uclibc" : { + "bfin": ( 0, 0, 0, True, True), + }, "linux-gnueabi" : { "arm" : (40, 0, 0, True, True), "armeb" : (40, 0, 0, False, True), diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index db1dbf19b4..4191f4edc1 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -31,7 +31,7 @@ def get_siteinfo_list(d): "arm-linux-uclibcgnueabi": "endian-little bit-32 common-uclibc arm-common arm-linux-uclibc",\ "avr32-linux": "endian-big bit-32 common-glibc avr32-common",\ "avr32-linux-uclibc": "endian-big bit-32 common-uclibc avr32-common",\ - "bfin-linux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\ + "bfin-uclinux-uclibc": "endian-little bit-32 common-uclibc bfin-common",\ "i386-linux": "endian-little bit-32 common-glibc ix86-common",\ "i486-linux": "endian-little bit-32 common-glibc ix86-common",\ "i586-linux": "endian-little bit-32 common-glibc ix86-common",\ -- cgit v1.2.3 From 6dfd134e423f7a33fdf1e48069890fb8fc4a41db Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Thu, 14 Jun 2007 03:02:08 +0000 Subject: distutils-base.bbclass: * add support for python 2.5 * catch more .debug files --- classes/distutils-base.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/distutils-base.bbclass b/classes/distutils-base.bbclass index db006b8c77..993ad7964e 100644 --- a/classes/distutils-base.bbclass +++ b/classes/distutils-base.bbclass @@ -7,9 +7,11 @@ def python_dir(d): staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 ) if os.path.exists( "%s/python2.3" % staging_incdir ): return "python2.3" if os.path.exists( "%s/python2.4" % staging_incdir ): return "python2.4" + if os.path.exists( "%s/python2.5" % staging_incdir ): return "python2.5" raise "No Python in STAGING_INCDIR. Forgot to build python-native ?" PYTHON_DIR = "${@python_dir(d)}" -FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}" -FILES_${PN}-dbg += "${libdir}/${PYTHON_DIR}/site-packages/${SRCNAME}/.debug" +FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" +FILES_${PN}-dbg = "${libdir}/${PYTHON_DIR}/site-packages/${SRCNAME}/.debug \ + ${libdir}/${PYTHON_DIR}/site-packages/.debug" -- cgit v1.2.3 From dd93941fb352cdb677139768974edcaa4980b45a Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 16 Jun 2007 11:51:26 +0000 Subject: sdk.bbclass: Remove unneeded PACKAGES, use DISTRO in SDK_NAME, set PACKAGE_ARCH to something which doesn't conflict with normal packages (from Poky) --- classes/sdk.bbclass | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'classes') diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass index 834081fccc..38df66eb4d 100644 --- a/classes/sdk.bbclass +++ b/classes/sdk.bbclass @@ -2,8 +2,10 @@ # or indirectly via dependency. No need to be in 'world'. EXCLUDE_FROM_WORLD = "1" -SDK_NAME = "${TARGET_ARCH}/oe" -PACKAGE_ARCH = "${BUILD_ARCH}" +SDK_NAME = "${DISTRO}/${TARGET_ARCH}" + +OLD_PACKAGE_ARCH := ${PACKAGE_ARCH} +PACKAGE_ARCH = "${BUILD_ARCH}-${OLD_PACKAGE_ARCH}-sdk" HOST_ARCH = "${BUILD_ARCH}" HOST_VENDOR = "${BUILD_VENDOR}" @@ -20,11 +22,7 @@ prefix = "/usr/local/${SDK_NAME}" exec_prefix = "${prefix}" base_prefix = "${exec_prefix}" -PACKAGES =+ "${PN}-dbg" - FILES_${PN} = "${prefix}" FILES_${PN}-dbg += "${prefix}/bin/.debug \ ${prefix}/sbin/.debug \ " - - -- cgit v1.2.3 From 17c5e701a1eb2969aab3bb5f29ada08e3b10544e Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 16 Jun 2007 14:57:49 +0000 Subject: e.bbclass: unbreak packaging --- classes/e.bbclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/e.bbclass b/classes/e.bbclass index 59f2771027..431171c95e 100644 --- a/classes/e.bbclass +++ b/classes/e.bbclass @@ -27,7 +27,7 @@ export IMLIB2_CONFIG = "${STAGING_BINDIR_CROSS}/imlib2-config" # find ${S} -name Makefile | xargs sed -i 's:/usr/X11R6/include:${STAGING_INCDIR}:' #} -PACKAGES = "${PN}-dbg ${PN} ${PN}-themes ${PN}-dev" -FILES_${PN} = "${libdir}/lib*.so*" +PACKAGES = "{PN}-dbg ${PN}-themes ${PN} ${PN}-dev" +FILES_${PN} += "${libdir}/lib*.so.*" FILES_${PN}-themes = "${datadir}/${PN}/themes ${datadir}/${PN}/data ${datadir}/${PN}/fonts ${datadir}/${PN}/pointers ${datadir}/${PN}/images ${datadir}/${PN}/users ${datadir}/${PN}/images ${datadir}/${PN}/styles" -FILES_${PN}-dev += "${includedir}" \ No newline at end of file +FILES_${PN}-dev += "${includedir}" -- cgit v1.2.3 From ae9ebc2b9d0d5e130e463f2af60d51019c593ef2 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 16 Jun 2007 14:59:52 +0000 Subject: e.bbclass: fix typo --- classes/e.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/e.bbclass b/classes/e.bbclass index 431171c95e..efbc13633f 100644 --- a/classes/e.bbclass +++ b/classes/e.bbclass @@ -27,7 +27,7 @@ export IMLIB2_CONFIG = "${STAGING_BINDIR_CROSS}/imlib2-config" # find ${S} -name Makefile | xargs sed -i 's:/usr/X11R6/include:${STAGING_INCDIR}:' #} -PACKAGES = "{PN}-dbg ${PN}-themes ${PN} ${PN}-dev" +PACKAGES = "${PN}-dbg ${PN}-themes ${PN} ${PN}-dev" FILES_${PN} += "${libdir}/lib*.so.*" FILES_${PN}-themes = "${datadir}/${PN}/themes ${datadir}/${PN}/data ${datadir}/${PN}/fonts ${datadir}/${PN}/pointers ${datadir}/${PN}/images ${datadir}/${PN}/users ${datadir}/${PN}/images ${datadir}/${PN}/styles" FILES_${PN}-dev += "${includedir}" -- cgit v1.2.3 From 6bf558d5065297cb8e4c0b11b7aa39779e89253b Mon Sep 17 00:00:00 2001 From: Justin Patrin Date: Sat, 16 Jun 2007 18:00:25 +0000 Subject: efl, e: update for better packaging --- classes/e.bbclass | 3 ++- classes/efl.bbclass | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/e.bbclass b/classes/e.bbclass index efbc13633f..9bac65fd9c 100644 --- a/classes/e.bbclass +++ b/classes/e.bbclass @@ -30,4 +30,5 @@ export IMLIB2_CONFIG = "${STAGING_BINDIR_CROSS}/imlib2-config" PACKAGES = "${PN}-dbg ${PN}-themes ${PN} ${PN}-dev" FILES_${PN} += "${libdir}/lib*.so.*" FILES_${PN}-themes = "${datadir}/${PN}/themes ${datadir}/${PN}/data ${datadir}/${PN}/fonts ${datadir}/${PN}/pointers ${datadir}/${PN}/images ${datadir}/${PN}/users ${datadir}/${PN}/images ${datadir}/${PN}/styles" -FILES_${PN}-dev += "${includedir}" +FILES_${PN}-dev += "${includedir} ${libdir}/lib*.so" + diff --git a/classes/efl.bbclass b/classes/efl.bbclass index 9b0345a5b8..808bf2eaae 100644 --- a/classes/efl.bbclass +++ b/classes/efl.bbclass @@ -48,6 +48,5 @@ do_stage_append () { } PACKAGES = "${PN}-dbg ${PN} ${PN}-themes ${PN}-dev ${PN}-examples" -FILES_${PN}-dev = "${bindir}/${PN}-config ${libdir}/pkgconfig ${libdir}/lib*.?a ${libdir}/lib*.a ${includedir}" +FILES_${PN}-dev += "${bindir}/${PN}-config ${libdir}/pkgconfig ${libdir}/lib*.?a ${libdir}/lib*.a" FILES_${PN}-examples = "${bindir} ${datadir}" - -- cgit v1.2.3 From b3cf95431b7d23a2e3bec34d2203f343e08fe5e2 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 19 Jun 2007 06:18:02 +0000 Subject: distutils-base: package even more debug files --- classes/distutils-base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/distutils-base.bbclass b/classes/distutils-base.bbclass index 993ad7964e..a66d845858 100644 --- a/classes/distutils-base.bbclass +++ b/classes/distutils-base.bbclass @@ -12,6 +12,6 @@ def python_dir(d): PYTHON_DIR = "${@python_dir(d)}" FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" -FILES_${PN}-dbg = "${libdir}/${PYTHON_DIR}/site-packages/${SRCNAME}/.debug \ +FILES_${PN}-dbg = "${libdir}/${PYTHON_DIR}/site-packages/*/.debug \ ${libdir}/${PYTHON_DIR}/site-packages/.debug" -- cgit v1.2.3 From 9e92b09feb313bd682ebb47d801e0e6f657b9684 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Thu, 21 Jun 2007 03:44:22 +0000 Subject: classes: update efl1 and e for E revamp --- classes/e.bbclass | 1 + classes/efl1.bbclass | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 classes/efl1.bbclass (limited to 'classes') diff --git a/classes/e.bbclass b/classes/e.bbclass index 9bac65fd9c..84d85f5542 100644 --- a/classes/e.bbclass +++ b/classes/e.bbclass @@ -1,5 +1,6 @@ HOMEPAGE = "http://www.enlightenment.org" SECTION = "e/apps" +SRC_URI = "http://download.enlightenment.org/snapshots/2007-06-17/${PN}-${PV}.tar.gz" inherit autotools pkgconfig binconfig diff --git a/classes/efl1.bbclass b/classes/efl1.bbclass new file mode 100644 index 0000000000..9fc5f2c44e --- /dev/null +++ b/classes/efl1.bbclass @@ -0,0 +1,36 @@ +inherit autotools pkgconfig + +do_prepsources () { + make clean distclean || true +} +addtask prepsources after do_fetch before do_unpack + +SECTION = "e/libs" +HOMEPAGE = "http://www.enlightenment.org" +SRCNAME = "${@bb.data.getVar('PN', d, 1).replace('-native', '')}" +SRC_URI = "http://download.enlightenment.org/snapshots/2007-06-17/${SRCNAME}-${PV}.tar.gz" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +libdirectory = "src/lib" +libraries = "lib${SRCNAME}" +headers = "${@bb.data.getVar('SRCNAME',d,1).capitalize()}.h" + +def efl_is_native(d): + import bb + return ["","-native"][bb.data.inherits_class('native', d)] + +do_stage() { + autotools_stage_all +} + +efl_stage_bin() { + rm -rf ${STAGE_TEMP} + mkdir -p ${STAGE_TEMP} + make DESTDIR="${STAGE_TEMP}" install + cp -pPR ${STAGE_TEMP}/${bindir}/* ${STAGING_BINDIR_CROSS} + rm -rf ${STAGE_TEMP} +} + +PACKAGES = "${PN}-dbg ${PN} ${PN}-themes ${PN}-dev ${PN}-examples" +FILES_${PN}-dev += "${bindir}/${PN}-config ${libdir}/pkgconfig/* ${libdir}/lib*.?a ${libdir}/lib*.a" +FILES_${PN}-examples = "${bindir} ${datadir}" -- cgit v1.2.3 From bdb62917622bbb63dc57c3535be15ca9dea4c13a Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Thu, 21 Jun 2007 03:55:38 +0000 Subject: move older efl stuff to nonworking --- classes/efl.bbclass | 52 ---------------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 classes/efl.bbclass (limited to 'classes') diff --git a/classes/efl.bbclass b/classes/efl.bbclass deleted file mode 100644 index 808bf2eaae..0000000000 --- a/classes/efl.bbclass +++ /dev/null @@ -1,52 +0,0 @@ -inherit e - -SECTION = "e/libs" - -SRCNAME = "${@bb.data.getVar('PN', d, 1).replace('-native', '')}" -SRC_URI = "${E_URI}/${SRCNAME}-${PV}.tar.gz" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -INHIBIT_AUTO_STAGE_INCLUDES = "1" -INHIBIT_NATIVE_STAGE_INSTALL = "1" - -libdirectory = "src/lib" -libraries = "lib${SRCNAME}" -headers = "${@bb.data.getVar('SRCNAME',d,1).capitalize()}.h" - -def efl_is_native(d): - import bb - return ["","-native"][bb.data.inherits_class('native', d)] - -do_stage_append () { - for i in ${libraries} - do - oe_libinstall -C ${libdirectory} $i ${STAGING_LIBDIR} - done - for i in ${headers} - do - install -m 0644 ${libdirectory}/$i ${STAGING_INCDIR} - done - - # Install binaries automatically for native builds - if [ "${@efl_is_native(d)}" = "-native" ] - then - - # Most EFL binaries start with the package name - for i in src/bin/${SRCNAME}* - do - if [ -x $i -a -f $i ] - then - - # Don't install anything with an extension (.so, etc) - if echo $i | grep -v \\. - then - ${HOST_SYS}-libtool --mode=install install -m 0755 $i ${STAGING_BINDIR} - fi - fi - done - fi -} - -PACKAGES = "${PN}-dbg ${PN} ${PN}-themes ${PN}-dev ${PN}-examples" -FILES_${PN}-dev += "${bindir}/${PN}-config ${libdir}/pkgconfig ${libdir}/lib*.?a ${libdir}/lib*.a" -FILES_${PN}-examples = "${bindir} ${datadir}" -- cgit v1.2.3 From 91b1ac83d75dffc0e2edbc8e454bb96d250a968d Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 24 Jun 2007 11:04:21 +0000 Subject: rootfs_ipk.bbclass: Do not hardcode ipkg RDEPENDency. * Instead, ad dit to DISTRO_EXTRA_RDEPENDS, so full-fledged images bsed on task-base will get it automagically, while adhoc images (initrds, etc.) can leave it out. * This corresponds with how dpkg is handled, and how it is done in poky. * Closes #2484. --- classes/rootfs_ipk.bbclass | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/rootfs_ipk.bbclass b/classes/rootfs_ipk.bbclass index 210563aed1..75c85e8f3d 100644 --- a/classes/rootfs_ipk.bbclass +++ b/classes/rootfs_ipk.bbclass @@ -9,8 +9,7 @@ do_rootfs[depends] += "ipkg-native:do_populate_staging ipkg-utils-native:do_popu IPKG_ARGS = "-f ${T}/ipkg.conf -o ${IMAGE_ROOTFS} ${@base_conditional("PACKAGE_INSTALL_NO_DEPS", "1", "-nodeps", "", d)}" -RDEPENDS += "ipkg ipkg-collateral" -PACKAGE_INSTALL += "ipkg ipkg-collateral" +DISTRO_EXTRA_RDEPENDS += " ipkg ipkg-collateral " PACKAGE_INSTALL_NO_DEPS ?= "0" rootfs_ipk_do_indexes () { -- cgit v1.2.3 From d5038851f7eefdc18071faee8b40f936db7ddd46 Mon Sep 17 00:00:00 2001 From: Patrik Gfeller Date: Sat, 30 Jun 2007 09:25:23 +0000 Subject: sanity: also check for bison, closes #2580 --- classes/sanity.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index ec73e0cab7..b84efb0848 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -86,7 +86,7 @@ def check_sanity(e): if not check_app_exists('${BUILD_PREFIX}g++', e.data): missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum" + required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum bison" for util in required_utilities.split(): if not check_app_exists( util, e.data ): -- cgit v1.2.3 From d8022111c8787f65ce252430c05368074b3f490e Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 2 Jul 2007 11:04:53 +0000 Subject: qmake-base.bbclass: don't strip binaries, that breaks debug builds, let OE take care of it --- classes/qmake-base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/qmake-base.bbclass b/classes/qmake-base.bbclass index 09694e97b8..b623b34aaa 100644 --- a/classes/qmake-base.bbclass +++ b/classes/qmake-base.bbclass @@ -13,7 +13,7 @@ export OE_QMAKE_CXXFLAGS="-fno-exceptions -fno-rtti ${CXXFLAGS}" export OE_QMAKE_LDFLAGS="${LDFLAGS}" export OE_QMAKE_LINK="${CCLD}" export OE_QMAKE_AR="${AR}" -export OE_QMAKE_STRIP="${STRIP}" +export OE_QMAKE_STRIP="echo" export OE_QMAKE_UIC="${STAGING_BINDIR_NATIVE}/uic" export OE_QMAKE_MOC="${STAGING_BINDIR_NATIVE}/moc" export OE_QMAKE_RCC="non-existant" -- cgit v1.2.3 From bc1da01a9070ec7d6aa642e7fc7dc71903b97671 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Tue, 3 Jul 2007 02:02:47 +0000 Subject: opie.bbclass: Bother to expand palmtopdir. --- classes/opie.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/opie.bbclass b/classes/opie.bbclass index 915de890cf..916a8a4a30 100644 --- a/classes/opie.bbclass +++ b/classes/opie.bbclass @@ -79,7 +79,7 @@ python opie_do_opie_install() { S = bb.data.getVar( "S", d, 1 ) D = "%s/image" % bb.data.getVar( "WORKDIR", d, True ) WORKDIR = bb.data.getVar( "WORKDIR", d, True ) - palmtopdir = bb.data.getVar( "palmtopdir", d ) + palmtopdir = bb.data.getVar( "palmtopdir", d, True ) APPDESKTOP = bb.data.getVar( "APPDESKTOP", d, True ) or "%s/%s" % ( WORKDIR, desktopdir ) if desktopdir is not None: -- cgit v1.2.3 From 6f93111dc360ddf9dcb2b10fd8e010f0fcb4338b Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Wed, 4 Jul 2007 08:11:45 +0000 Subject: sanity: if OE is used by root user (userid 0) then raise error (from Poky) --- classes/sanity.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'classes') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index b84efb0848..d2fd4b0b04 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -49,6 +49,9 @@ def check_sanity(e): print "Foo %s" % minversion return + if 0 == os.getuid(): + raise_sanity_error("Do not use Bitbake as root.") + messages = "" if (LooseVersion(__version__) < LooseVersion(minversion)): -- cgit v1.2.3 From eddbe46d0af712f5a42bc1b85837fa4f00adef6a Mon Sep 17 00:00:00 2001 From: Florian Boor Date: Wed, 4 Jul 2007 11:52:03 +0000 Subject: sdk.bbclass: Add function to create sdk pacakge indices. --- classes/sdk.bbclass | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'classes') diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass index 38df66eb4d..0050b2e48e 100644 --- a/classes/sdk.bbclass +++ b/classes/sdk.bbclass @@ -26,3 +26,23 @@ FILES_${PN} = "${prefix}" FILES_${PN}-dbg += "${prefix}/bin/.debug \ ${prefix}/sbin/.debug \ " + +sdk_ipk_do_indexes () { + set -x + + ipkgarchs="${PACKAGE_ARCHS}" + + if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then + touch ${DEPLOY_DIR_IPK}/Packages + ipkg-make-index -r ${DEPLOY_DIR_IPK}/Packages -p ${DEPLOY_DIR_IPK}/Packages -l ${DEPLOY_DIR_IPK}/Packages.filelist -m ${DEPLOY_DIR_IPK} + fi + + for arch in $ipkgarchs; do + if [ -z "${DEPLOY_KEEP_PACKAGES}" ]; then + if [ -e ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/ ] ; then + touch ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages + ipkg-make-index -r ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -p ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages -l ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/Packages.filelist -m ${DEPLOY_DIR_IPK}/${BUILD_ARCH}-$arch-sdk/ + fi + fi + done +} -- cgit v1.2.3 From bfd1efbf726e591303a6da689c8dbc86342c483e Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 4 Jul 2007 17:22:20 +0000 Subject: opie.bbclass: Install binaries to $bindir. * Per #2254. --- classes/opie.bbclass | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/opie.bbclass b/classes/opie.bbclass index 916a8a4a30..c11cf0b4de 100644 --- a/classes/opie.bbclass +++ b/classes/opie.bbclass @@ -80,6 +80,7 @@ python opie_do_opie_install() { D = "%s/image" % bb.data.getVar( "WORKDIR", d, True ) WORKDIR = bb.data.getVar( "WORKDIR", d, True ) palmtopdir = bb.data.getVar( "palmtopdir", d, True ) + gnubindir = bb.data.getVar( "bindir", d, True ) APPDESKTOP = bb.data.getVar( "APPDESKTOP", d, True ) or "%s/%s" % ( WORKDIR, desktopdir ) if desktopdir is not None: @@ -89,11 +90,12 @@ python opie_do_opie_install() { os.system( "install -d %s%s%s/" % ( D, palmtopdir, bindir ) ) if APPTYPE == "binary": - os.system( "install -m 0755 %s/%s %s%s%s/" % ( S, APPNAME, D, palmtopdir, bindir ) ) + os.system( "install -d %s%s/" % ( D, gnubindir ) ) + os.system( "install -m 0755 %s/%s %s%s/" % ( S, APPNAME, D, gnubindir ) ) elif APPTYPE == "quicklaunch": os.system( "install -m 0755 %s/lib%s.so %s%s%s/" % ( S, APPNAME, D, palmtopdir, bindir ) ) - os.system( "install -d %s%s/bin/" % ( D, palmtopdir ) ) - os.system( "ln -sf %s/bin/quicklauncher %s%s/bin/%s" % ( palmtopdir, D, palmtopdir, APPNAME ) ) + os.system( "install -d %s%s/" % ( D, gnubindir ) ) + os.system( "ln -sf %s/quicklauncher %s%s/%s" % ( gnubindir, D, gnubindir, APPNAME ) ) elif APPTYPE == "plugin": os.system( "install -m 0755 %s/lib%s.so %s%s%s/" % ( S, APPNAME, D, palmtopdir, bindir ) ) } -- cgit v1.2.3 From d8f8c8ae824998c9e7b886f0a6c3e0488e998cde Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 4 Jul 2007 17:41:46 +0000 Subject: palmtop.bbclass: Update for FHS-compatible layout. --- classes/palmtop.bbclass | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/palmtop.bbclass b/classes/palmtop.bbclass index e99b31aaa3..fa25d598e9 100644 --- a/classes/palmtop.bbclass +++ b/classes/palmtop.bbclass @@ -19,8 +19,7 @@ DEPENDS_prepend = "${@["virtual/libqpe1 uicmoc-native ", ""][(bb.data.getVar('PN QT_LIBRARY = '${@base_conditional("PALMTOP_USE_MULTITHREADED_QT", "yes", "qte-mt", "qte", d)}' PACKAGES = "${PN}-dbg ${PN}-dev ${PN} ${PN}-doc ${PN}-locale" -FILES_${PN} = " ${palmtopdir} " -FILES_${PN}-dev += " ${palmtopdir}/lib/lib*.so " +FILES_${PN} += " ${palmtopdir} " FILES_${PN}-dbg += " ${palmtopdir}/lib/.debug \ ${palmtopdir}/bin/.debug \ ${palmtopdir}/plugins/*/.debug " -- cgit v1.2.3 From e45268ec831c439a5159e147a02dccce7a6b4d0e Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 4 Jul 2007 23:34:18 +0000 Subject: bluez: Stop 02dtl1_cs.sh the nasty hack from breaking everyone's BT connection. * This sloppily written script just unconditionally breaks a BT connection on suspend. * So, instead, make only DTL1 victims suffer it thru: 1. Make a separate package for it. 2. Make kernel-module-dtl1-cs and nothing else RDEPENDS on it. --- classes/kernel.bbclass | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 4cc3784b6f..3a95fa787a 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -183,6 +183,10 @@ ALLOW_EMPTY_kernel = "1" ALLOW_EMPTY_kernel-base = "1" ALLOW_EMPTY_kernel-image = "1" +# Userspace workarounds for kernel modules issues +# This is shame, fix the kernel instead! +RDEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" + pkg_postinst_kernel-image () { if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then mkdir -p $D/lib/modules/${KERNEL_VERSION} -- cgit v1.2.3 From 725d9b9289e84ad450fe9a037bd78eaa50c1206f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 5 Jul 2007 11:24:00 +0000 Subject: kernel.bbclass: DEPEND on bluez-dtl1-workaround, not just RDEPEND. --- classes/kernel.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 3a95fa787a..afbea42391 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -185,7 +185,7 @@ ALLOW_EMPTY_kernel-image = "1" # Userspace workarounds for kernel modules issues # This is shame, fix the kernel instead! -RDEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" +DEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" pkg_postinst_kernel-image () { if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then -- cgit v1.2.3 From 2ed2875b6c56be3a2f2b9db557e22024d3e92dd6 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 5 Jul 2007 12:48:04 +0000 Subject: kernel.bbclass: Oh ok, we need both DEPENDS and RDEPENDS. --- classes/kernel.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index afbea42391..658bbbf675 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -186,6 +186,7 @@ ALLOW_EMPTY_kernel-image = "1" # Userspace workarounds for kernel modules issues # This is shame, fix the kernel instead! DEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" +RDEPENDS_kernel-module-dtl1-cs = "bluez-dtl1-workaround" pkg_postinst_kernel-image () { if [ ! -e "$D/lib/modules/${KERNEL_VERSION}" ]; then -- cgit v1.2.3 From 02d56a96831449e75a168d1615616f3146f09532 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sat, 7 Jul 2007 16:51:39 +0000 Subject: opie-alarm: adjust for the new filesystem layout --- classes/opie.bbclass | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/opie.bbclass b/classes/opie.bbclass index c11cf0b4de..6324dbf522 100644 --- a/classes/opie.bbclass +++ b/classes/opie.bbclass @@ -21,7 +21,8 @@ DEPENDS_prepend = "${@["libopie2 ", ""][(bb.data.getVar('PN', d, 1) == 'libopie2 # to be consistent, put all targets into workdir # NOTE: leave one space at the end, other files are expecting that -EXTRA_QMAKEVARS_POST += "DESTDIR=${S} " +EXTRA_QMAKEVARS_POST += " DESTDIR=${S} " +EXTRA_QMAKEVARS_POST += " DEFINES+=OPIE_BINDIR='\"${bindir}\"' DEFINES+=OPIE_LIBDIR='\"${libdir}/opie/lib\"' DEFINES+=OPIE_QTDIR='\"${libdir}/opie\"' " # Opie standard TAG value TAG = "${@'v' + bb.data.getVar('PV',d,1).replace('.', '_')}" -- cgit v1.2.3 From bf04ecd27db85ee9372420f1d84710b16f7cc320 Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Wed, 11 Jul 2007 19:40:40 +0000 Subject: classes/qt4x11.bbclass, uicmoc4-native: add qt3support --- classes/qt4x11.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/qt4x11.bbclass b/classes/qt4x11.bbclass index cb836cc362..7046ef1cb9 100644 --- a/classes/qt4x11.bbclass +++ b/classes/qt4x11.bbclass @@ -6,6 +6,7 @@ DEPENDS_prepend = "${@["qt4x11 ", ""][(bb.data.getVar('PN', d, 1) == 'qt4-x11-fr export QTDIR = "${STAGING_DIR}/${HOST_SYS}/qt4" export QMAKESPEC = "${QTDIR}/mkspecs/${TARGET_OS}-oe-g++" export OE_QMAKE_UIC = "${STAGING_BINDIR_NATIVE}/uic4" +export OE_QMAKE_UIC3 = "${STAGING_BINDIR_NATIVE}/uic34" export OE_QMAKE_MOC = "${STAGING_BINDIR_NATIVE}/moc4" export OE_QMAKE_RCC = "${STAGING_BINDIR_NATIVE}/rcc4" export OE_QMAKE_QMAKE = "${STAGING_BINDIR_NATIVE}/qmake2" -- cgit v1.2.3 From 57df5bd6b9573d8c9b28e4c0f2d9615fdc390fcc Mon Sep 17 00:00:00 2001 From: Daniel Willmann Date: Thu, 12 Jul 2007 20:08:32 +0000 Subject: =?UTF-8?q?classes/base.bbclass:=20Fallback=20to=20archive.apache.?= =?UTF-8?q?org=20for=20older=20versions=20(Patch=20from=20Jan=20'Shoragan'?= =?UTF-8?q?=20L=C3=BCbbe)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/base.bbclass | 1 + 1 file changed, 1 insertion(+) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 9752a1116c..d0083bdc54 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -953,6 +953,7 @@ ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://ftp.tux.org/pub/sites/vic ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://gd.tuwien.ac.at/utils/admin-tools/lsof/ ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://sunsite.ualberta.ca/pub/Mirror/lsof/ ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/ ftp://the.wiretapped.net/pub/security/host-security/lsof/ +http://www.apache.org/dist http://archive.apache.org/dist } -- cgit v1.2.3 From 65d1a7413f9f40230da93b31f9a399ada56e14db Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 16 Jul 2007 07:33:24 +0000 Subject: rm_work: add rmall command that recursively rm_works (e.g. bitbake angstrom-x11-image -c rmall) --- classes/rm_work.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'classes') diff --git a/classes/rm_work.bbclass b/classes/rm_work.bbclass index 1b87004143..e3c92b8572 100644 --- a/classes/rm_work.bbclass +++ b/classes/rm_work.bbclass @@ -18,5 +18,12 @@ do_rm_work () { done } +addtask rmall after do_rm_work +do_rmall[recrdeptask] = "do_rm_work" +do_rmall() { + : +} + + addtask rm_work before do_build addtask rm_work after do_populate_staging -- cgit v1.2.3 From 1c3a7b4dd773ad3fd5dd4ec79ddfbd95539ac15f Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Wed, 18 Jul 2007 13:47:46 +0000 Subject: efl.bbclass: update snapshot date --- classes/efl1.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/efl1.bbclass b/classes/efl1.bbclass index 9fc5f2c44e..2c8470e5e0 100644 --- a/classes/efl1.bbclass +++ b/classes/efl1.bbclass @@ -8,7 +8,7 @@ addtask prepsources after do_fetch before do_unpack SECTION = "e/libs" HOMEPAGE = "http://www.enlightenment.org" SRCNAME = "${@bb.data.getVar('PN', d, 1).replace('-native', '')}" -SRC_URI = "http://download.enlightenment.org/snapshots/2007-06-17/${SRCNAME}-${PV}.tar.gz" +SRC_URI = "http://download.enlightenment.org/snapshots/2007-07-10/${SRCNAME}-${PV}.tar.gz" S = "${WORKDIR}/${SRCNAME}-${PV}" libdirectory = "src/lib" -- cgit v1.2.3 From 6cf33c5a7e270f8df619611dd1f0f2ab8d5f595b Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sat, 21 Jul 2007 23:23:57 +0000 Subject: EFL: move from building snapshots to cvs again. Reasons: 1.) EFL gained a lot of momentum leading to constant changes 2.) Snapshots were just random cvs dates again. Might as well use SRCDATE to pin them down 3.) --- classes/efl_base.bbclass | 20 ++++++++++++++++++++ classes/efl_library.bbclass | 9 +++++++++ 2 files changed, 29 insertions(+) create mode 100644 classes/efl_base.bbclass create mode 100644 classes/efl_library.bbclass (limited to 'classes') diff --git a/classes/efl_base.bbclass b/classes/efl_base.bbclass new file mode 100644 index 0000000000..7f170d70f2 --- /dev/null +++ b/classes/efl_base.bbclass @@ -0,0 +1,20 @@ +inherit autotools pkgconfig + +#do_prepsources () { +# make clean distclean || true +#} +#addtask prepsources after do_fetch before do_unpack + +SECTION = "e/libs" +HOMEPAGE = "http://www.enlightenment.org" +SRCNAME = "${@bb.data.getVar('PN', d, 1).replace('-native', '')}" +SRC_URI = "http://download.enlightenment.org/snapshots/2007-07-10/${SRCNAME}-${PV}.tar.gz" +S = "${WORKDIR}/${SRCNAME}-${PV}" + +do_stage() { + autotools_stage_all +} + +PACKAGES = "${PN}-dbg ${PN} ${PN}-themes ${PN}-dev" +FILES_${PN}-dev += "${bindir}/${PN}-config ${libdir}/pkgconfig/* ${libdir}/lib*.?a ${libdir}/lib*.a" + diff --git a/classes/efl_library.bbclass b/classes/efl_library.bbclass new file mode 100644 index 0000000000..57b16d93f1 --- /dev/null +++ b/classes/efl_library.bbclass @@ -0,0 +1,9 @@ +inherit efl_base + +SRC_URI = "${E_CVS};module=e17/libs/${SRCNAME}" +S = "${WORKDIR}/${SRCNAME}" + +PACKAGES =+ "${PN}-tests" +FILES_${PN}-tests = "${bindir}/${PN} ${bindir}/*_* ${datadir}" +FILES_${PN}-dev += "${bindir}/*-config ${libdir}/${PN}/*.a ${libdir}/${PN}/*.la" +FILES_${PN} = "${libdir}/*.so*" -- cgit v1.2.3 From 2ddbcbe98cba115b92dc18e52d1a6f871aa2a7e4 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sun, 22 Jul 2007 14:14:48 +0000 Subject: classes: remove outdated efl1.bbclass, package *.a/*.la in common EFL plugin directories to PN-dev --- classes/efl1.bbclass | 36 ------------------------------------ classes/efl_library.bbclass | 2 +- 2 files changed, 1 insertion(+), 37 deletions(-) delete mode 100644 classes/efl1.bbclass (limited to 'classes') diff --git a/classes/efl1.bbclass b/classes/efl1.bbclass deleted file mode 100644 index 2c8470e5e0..0000000000 --- a/classes/efl1.bbclass +++ /dev/null @@ -1,36 +0,0 @@ -inherit autotools pkgconfig - -do_prepsources () { - make clean distclean || true -} -addtask prepsources after do_fetch before do_unpack - -SECTION = "e/libs" -HOMEPAGE = "http://www.enlightenment.org" -SRCNAME = "${@bb.data.getVar('PN', d, 1).replace('-native', '')}" -SRC_URI = "http://download.enlightenment.org/snapshots/2007-07-10/${SRCNAME}-${PV}.tar.gz" -S = "${WORKDIR}/${SRCNAME}-${PV}" - -libdirectory = "src/lib" -libraries = "lib${SRCNAME}" -headers = "${@bb.data.getVar('SRCNAME',d,1).capitalize()}.h" - -def efl_is_native(d): - import bb - return ["","-native"][bb.data.inherits_class('native', d)] - -do_stage() { - autotools_stage_all -} - -efl_stage_bin() { - rm -rf ${STAGE_TEMP} - mkdir -p ${STAGE_TEMP} - make DESTDIR="${STAGE_TEMP}" install - cp -pPR ${STAGE_TEMP}/${bindir}/* ${STAGING_BINDIR_CROSS} - rm -rf ${STAGE_TEMP} -} - -PACKAGES = "${PN}-dbg ${PN} ${PN}-themes ${PN}-dev ${PN}-examples" -FILES_${PN}-dev += "${bindir}/${PN}-config ${libdir}/pkgconfig/* ${libdir}/lib*.?a ${libdir}/lib*.a" -FILES_${PN}-examples = "${bindir} ${datadir}" diff --git a/classes/efl_library.bbclass b/classes/efl_library.bbclass index 57b16d93f1..c2b6938e47 100644 --- a/classes/efl_library.bbclass +++ b/classes/efl_library.bbclass @@ -5,5 +5,5 @@ S = "${WORKDIR}/${SRCNAME}" PACKAGES =+ "${PN}-tests" FILES_${PN}-tests = "${bindir}/${PN} ${bindir}/*_* ${datadir}" -FILES_${PN}-dev += "${bindir}/*-config ${libdir}/${PN}/*.a ${libdir}/${PN}/*.la" +FILES_${PN}-dev += "${bindir}/*-config ${libdir}/${PN}/*.a ${libdir}/${PN}/*.la ${libdir}/${PN}/*/*.a ${libdir}/${PN}/*/*.la" FILES_${PN} = "${libdir}/*.so*" -- cgit v1.2.3 From 697093f6bc5ab5d3941cfa68fea21a2ba56def85 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Tue, 24 Jul 2007 01:04:50 +0000 Subject: distutils: set PYTHONPATH and always create the site-packages directory to improve compatibility with certain extension packages --- classes/distutils-base.bbclass | 5 +++-- classes/distutils.bbclass | 14 ++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) (limited to 'classes') diff --git a/classes/distutils-base.bbclass b/classes/distutils-base.bbclass index a66d845858..c3f325768d 100644 --- a/classes/distutils-base.bbclass +++ b/classes/distutils-base.bbclass @@ -12,6 +12,7 @@ def python_dir(d): PYTHON_DIR = "${@python_dir(d)}" FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" -FILES_${PN}-dbg = "${libdir}/${PYTHON_DIR}/site-packages/*/.debug \ - ${libdir}/${PYTHON_DIR}/site-packages/.debug" +FILES_${PN}-dbg = "${libdir}/${PYTHON_DIR}/site-packages/.debug \ + ${libdir}/${PYTHON_DIR}/site-packages/./*/debug \ + ${libdir}/${PYTHON_DIR}/site-packages/*/*/.debug" diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass index db15cebdd7..a7efad2e63 100644 --- a/classes/distutils.bbclass +++ b/classes/distutils.bbclass @@ -1,15 +1,17 @@ inherit distutils-base distutils_do_compile() { - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/python setup.py build || \ - oefatal "python setup.py build execution failed." + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/python setup.py build || \ + oefatal "python setup.py build execution failed." } distutils_do_install() { - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${D}/${prefix} --install-data=${D}/${datadir} || \ - oefatal "python setup.py install execution failed." + install -d ${D}${libdir}/${PYTHON_DIR}/site-packages + PYTHONPATH=${D}/${libdir}/${PYTHON_DIR}/site-packages \ + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${D}/${prefix} --install-data=${D}/${datadir} || \ + oefatal "python setup.py install execution failed." for i in `find ${D} -name "*.py"` ; do \ sed -i -e s:${D}::g $i -- cgit v1.2.3 From 3d210b79af413e256a792a60c4cd6a1d12514695 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Tue, 24 Jul 2007 02:14:58 +0000 Subject: classes/distutils.bbclass: * split distutils extension building into two parts * specify python-specific include directory during build_ext * add function to stage headers (NOTE: explicity-called, not implicitly) --- classes/distutils.bbclass | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass index a7efad2e63..c9592bd666 100644 --- a/classes/distutils.bbclass +++ b/classes/distutils.bbclass @@ -1,9 +1,18 @@ inherit distutils-base distutils_do_compile() { + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/python setup.py build_ext --include-dirs=${STAGING_INCDIR}/${PYTHON_DIR} || \ + oefatal "python setup.py build_ext execution failed." BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ ${STAGING_BINDIR_NATIVE}/python setup.py build || \ - oefatal "python setup.py build execution failed." + oefatal "python setup.py build_ext execution failed." +} + +distutils_stage_headers() { + BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ + ${STAGING_BINDIR_NATIVE}/python setup.py install_headers --install-dir=${STAGING_INCDIR}/${PYTHON_DIR} || \ + oefatal "python setup.py install execution failed." } distutils_do_install() { -- cgit v1.2.3 From 95518b26ac8b1a412ecbaa96823454d34ea10b53 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Tue, 24 Jul 2007 02:21:23 +0000 Subject: classes/distutils.bbclass: back out specifying the include dir, it was a) implicitly specified anyway and b) it breaks builds that add own stuff to it (e.g. '.') --- classes/distutils.bbclass | 3 --- 1 file changed, 3 deletions(-) (limited to 'classes') diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass index c9592bd666..d23c2a3b2e 100644 --- a/classes/distutils.bbclass +++ b/classes/distutils.bbclass @@ -1,9 +1,6 @@ inherit distutils-base distutils_do_compile() { - BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/python setup.py build_ext --include-dirs=${STAGING_INCDIR}/${PYTHON_DIR} || \ - oefatal "python setup.py build_ext execution failed." BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ ${STAGING_BINDIR_NATIVE}/python setup.py build || \ oefatal "python setup.py build_ext execution failed." -- cgit v1.2.3 From 1fd5cf297a4aa0ff3a1a64aab29219f1e2d89f1f Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 24 Jul 2007 18:21:24 +0000 Subject: sanity.bbclass: add help2man to required utils (apt-get install help2man) in preparation for autoconf 2.61 activation --- classes/sanity.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index d2fd4b0b04..a0da0667dd 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -89,7 +89,7 @@ def check_sanity(e): if not check_app_exists('${BUILD_PREFIX}g++', e.data): missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum bison" + required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum bison" for util in required_utilities.split(): if not check_app_exists( util, e.data ): -- cgit v1.2.3 From 0990e13e269d897ce9939e9bf1280c50d3f333e8 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 25 Jul 2007 09:56:17 +0000 Subject: kernel.bbclass: Add support for module config per 2.6 conevntions. * 2.6 modprobe expects per-module configuration in /etc/modprobe.d/ . * Closes #2669. --- classes/kernel.bbclass | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'classes') diff --git a/classes/kernel.bbclass b/classes/kernel.bbclass index 658bbbf675..0670da678d 100644 --- a/classes/kernel.bbclass +++ b/classes/kernel.bbclass @@ -143,7 +143,10 @@ kernel_do_install() { install -m 0644 System.map ${D}/boot/System.map-${KERNEL_VERSION} install -m 0644 .config ${D}/boot/config-${KERNEL_VERSION} install -d ${D}/etc/modutils - + if [ "${KERNEL_MAJOR_VERSION}" = "2.6" ]; then + install -d ${D}/etc/modprobe.d + fi + # Check if scripts/genksyms exists and if so, build it if [ -e scripts/genksyms/ ]; then oe_runmake SUBDIRS="scripts/genksyms" @@ -345,13 +348,16 @@ python populate_packages_prepend () { # Write out any modconf fragment modconf = bb.data.getVar('module_conf_%s' % basename, d, 1) if modconf: - name = '%s/etc/modutils/%s.conf' % (dvar, basename) + if bb.data.getVar("KERNEL_MAJOR_VERSION", d, 1) == "2.6": + name = '%s/etc/modprobe.d/%s.conf' % (dvar, basename) + else: + name = '%s/etc/modutils/%s.conf' % (dvar, basename) f = open(name, 'w') f.write("%s\n" % modconf) f.close() files = bb.data.getVar('FILES_%s' % pkg, d, 1) - files = "%s /etc/modutils/%s /etc/modutils/%s.conf" % (files, basename, basename) + files = "%s /etc/modutils/%s /etc/modutils/%s.conf /etc/modprobe.d/%s.conf" % (files, basename, basename, basename) bb.data.setVar('FILES_%s' % pkg, files, d) if vals.has_key("description"): -- cgit v1.2.3 From 8833df14d493957fa9eebb923eea3ebdd49bab4c Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 25 Jul 2007 12:33:35 +0000 Subject: pkgconfig.bbclass: mangle some more workdir occurences --- classes/pkgconfig.bbclass | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'classes') diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass index f2054b0b07..cd6e04731e 100644 --- a/classes/pkgconfig.bbclass +++ b/classes/pkgconfig.bbclass @@ -17,8 +17,17 @@ def get_pkgconfig_mangle(d): s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'" s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'" + s += " -e 's:-L${WORKDIR}\S*: :g'" + s += " -e 's:-I${WORKDIR}\S*: :g'" + return s +do_install_append () { + for pc in `find ${D} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do + sed -i ${@get_pkgconfig_mangle(d)} ${pc} + done +} + do_stage_append () { for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do pcname=`basename $pc` -- cgit v1.2.3 From 905009f453a941085816827efbf12f048f18cd54 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 25 Jul 2007 12:35:19 +0000 Subject: autotools.bbclass: run sed over .la files to removes various occurences to staging, workdir and ${D} --- classes/autotools.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'classes') diff --git a/classes/autotools.bbclass b/classes/autotools.bbclass index 3c555751da..fccf2b6d80 100644 --- a/classes/autotools.bbclass +++ b/classes/autotools.bbclass @@ -139,6 +139,13 @@ autotools_do_configure() { autotools_do_install() { oe_runmake 'DESTDIR=${D}' install + + for i in `find ${D} -name "*.la"` ; do \ + sed -i -e s:${STAGING_LIBDIR}:${libdir}:g $i + sed -i -e s:${D}::g $i + sed -i -e 's:-I${WORKDIR}\S*: :g' $i + sed -i -e 's:-L${WORKDIR}\S*: :g' $i + done } STAGE_TEMP="${WORKDIR}/temp-staging" -- cgit v1.2.3 From 4fd880f8d6ba7746031a201caa46e703d2de2b77 Mon Sep 17 00:00:00 2001 From: Stelios Koroneos Date: Thu, 26 Jul 2007 14:59:27 +0000 Subject: classes/magicbox-image.bbclass : Fix a problem with "tail" which failed during fs creation for magicbox --- classes/magicbox-image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/magicbox-image.bbclass b/classes/magicbox-image.bbclass index 05de28b76b..c75e69cac2 100644 --- a/classes/magicbox-image.bbclass +++ b/classes/magicbox-image.bbclass @@ -1,6 +1,6 @@ magicbox_gen_images() { # find latest kernel - KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/uImage* | tail -1` + KERNEL=`ls -tr ${DEPLOY_DIR_IMAGE}/uImage* | tail -n 1` if [ -z "$KERNEL" ]; then oefatal "No kernel found in ${DEPLOY_DIR_IMAGE}. Exiting !" exit 1 -- cgit v1.2.3 From 0c5bd68a0aa61ffd98cae9e47f914e1066cfe44b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sat, 28 Jul 2007 18:56:26 +0000 Subject: pkgconfig.bbclass: more munging --- classes/pkgconfig.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass index cd6e04731e..3256977517 100644 --- a/classes/pkgconfig.bbclass +++ b/classes/pkgconfig.bbclass @@ -24,7 +24,7 @@ def get_pkgconfig_mangle(d): do_install_append () { for pc in `find ${D} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do - sed -i ${@get_pkgconfig_mangle(d)} ${pc} + sed -i ${@get_pkgconfig_mangle(d)} -e 's:${D}::g' ${pc} done } @@ -32,6 +32,6 @@ do_stage_append () { for pc in `find ${S} -name '*.pc' -type f | grep -v -- '-uninstalled.pc$'`; do pcname=`basename $pc` install -d ${PKG_CONFIG_PATH} - cat $pc | sed ${@get_pkgconfig_mangle(d)} > ${PKG_CONFIG_PATH}/$pcname + cat $pc | sed ${@get_pkgconfig_mangle(d)} -e 's:${D}${libdir}\S*:${STAGING_LIBDIR}:g' -e 's:${D}${prefix}/include\S*:${STAGING_INCDIR}:g' > ${PKG_CONFIG_PATH}/$pcname done } -- cgit v1.2.3 From 9e69cc753ec5d5a1a8d702356fad0e6e43ff6323 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 29 Jul 2007 17:59:51 +0000 Subject: base.bbclass: Only take the slow path if SRC_URI_OVERRIDES_PACKAGE_ARCH is actually set to something --- classes/base.bbclass | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index d0083bdc54..fec7622f18 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -825,8 +825,11 @@ def base_after_parse(d): if (old_arch == mach_arch): # Nothing to do return - if (bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) == '0'): + override = bb.data.getVar('SRC_URI_OVERRIDES_PACKAGE_ARCH', d, 1) + + if not override or override == '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)) -- cgit v1.2.3 From d36084001d8e5c40a8f75338c293f0ca99880b85 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 29 Jul 2007 21:23:19 +0000 Subject: sanity.bbclass: Run sanity checker after configuration parsing for bitbake > 1.8.6 --- classes/sanity.bbclass | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index a0da0667dd..cd3b5efbfe 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -89,7 +89,7 @@ def check_sanity(e): if not check_app_exists('${BUILD_PREFIX}g++', e.data): missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum bison" + required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum bison" for util in required_utilities.split(): if not check_app_exists( util, e.data ): @@ -111,6 +111,16 @@ python check_sanity_eventhandler() { from bb import note, error, data, __version__ from bb.event import getName + try: + from distutils.version import LooseVersion + except ImportError: + def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1 + + if (LooseVersion(bb.__version__) > LooseVersion("1.8.6")): + if getName(e) == "ConfigParsed": + check_sanity(e) + return NotHandled + if getName(e) == "BuildStarted": check_sanity(e) -- cgit v1.2.3 From f6310c4e838b88abe092d1f8a85881d767aa52be Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 29 Jul 2007 21:24:42 +0000 Subject: santiy.bbclass: Undo accidental change --- classes/sanity.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass index cd3b5efbfe..016b0d500b 100644 --- a/classes/sanity.bbclass +++ b/classes/sanity.bbclass @@ -89,7 +89,7 @@ def check_sanity(e): if not check_app_exists('${BUILD_PREFIX}g++', e.data): missing = missing + "C++ Compiler (${BUILD_PREFIX}g++)," - required_utilities = "patch diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum bison" + required_utilities = "patch help2man diffstat texi2html makeinfo cvs svn git bzip2 tar gzip gawk md5sum bison" for util in required_utilities.split(): if not check_app_exists( util, e.data ): -- cgit v1.2.3 From 4d57b6bc2f95d8f569db46aa9fb6e02540aa7e46 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 29 Jul 2007 22:20:41 +0000 Subject: image.bbclass: Use system python explicitly, don't use python-native version --- classes/image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/image.bbclass b/classes/image.bbclass index 5f1dfa2dce..05bc9d669b 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -91,7 +91,7 @@ fakeroot do_rootfs () { if test -z "$FAKEROOTKEY"; then fakeroot -i ${TMPDIR}/fakedb.image bbimage -t $type -e ${FILE} else - bbimage -n "${IMAGE_NAME}" -t "$type" -e "${FILE}" + ${PYTHON} `which bbimage` -n "${IMAGE_NAME}" -t "$type" -e "${FILE}" fi cd ${DEPLOY_DIR_IMAGE}/ -- cgit v1.2.3 From aacc63c673f2790e14a3c55b6461d68d0022927d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 29 Jul 2007 22:41:37 +0000 Subject: image.bbclass: Fix other bbimage refernce --- classes/image.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/image.bbclass b/classes/image.bbclass index 05bc9d669b..101b53307a 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -89,7 +89,7 @@ fakeroot do_rootfs () { for type in ${IMAGE_FSTYPES}; do if test -z "$FAKEROOTKEY"; then - fakeroot -i ${TMPDIR}/fakedb.image bbimage -t $type -e ${FILE} + fakeroot -i ${TMPDIR}/fakedb.image ${PYTHON} `which bbimage` -t $type -e ${FILE} else ${PYTHON} `which bbimage` -n "${IMAGE_NAME}" -t "$type" -e "${FILE}" fi -- cgit v1.2.3 From 22348937cf12a03afe2aaeaa0c297867bb40433b Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Mon, 30 Jul 2007 11:13:51 +0000 Subject: openmoko-panel-plugin.bbclass: inherit openmoko2 --- classes/openmoko-panel-plugin.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/openmoko-panel-plugin.bbclass b/classes/openmoko-panel-plugin.bbclass index 0494b412c6..4ef42b5015 100644 --- a/classes/openmoko-panel-plugin.bbclass +++ b/classes/openmoko-panel-plugin.bbclass @@ -1,6 +1,6 @@ SECTION = "openmoko/panel-plugin" DEPENDS += "matchbox-panel-2" -inherit openmoko +inherit openmoko2 FILES_${PN} = "${libdir}/matchbox-panel/lib*.so* ${datadir}" -- cgit v1.2.3 From e5755be56a5c005615a0721ed6848694c18bebba Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Mon, 30 Jul 2007 11:33:52 +0000 Subject: add openmoko2.bbclass, thanks Koen for spotting --- classes/openmoko2.bbclass | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 classes/openmoko2.bbclass (limited to 'classes') diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass new file mode 100644 index 0000000000..4675b6a10e --- /dev/null +++ b/classes/openmoko2.bbclass @@ -0,0 +1,28 @@ +inherit autotools pkgconfig + +HOMEPAGE = "http://www.openmoko.org" +OPENMOKO_RELEASE ?= "OM-2007.2" +OPENMOKO_MIRROR ?= "svn://svn.openmoko.org/trunk" + +def openmoko_two_get_license(d): + import bb + openmoko, section = bb.data.getVar('SECTION', d, 1).split("/") + return "LGPL GPL".split()[section != "libs"] + +def openmoko_two_get_subdir(d): + import bb + openmoko, section = bb.data.getVar('SECTION', d, 1).split("/") + if section == 'base': return "" + elif section == 'libs': return "libraries" + elif section in 'apps tools pim'.split(): return "applications" + elif section == "panel-plugin": return "panel-plugins" + elif section == "inputmethods": return "inputmethods" + else: return section + +LICENSE = "${@openmoko_two_get_license(d)}" +SUBDIR = "${@openmoko_two_get_subdir(d)}" + +SRC_URI := "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=${PN};proto=http" +S = "${WORKDIR}/${PN}" + +FILES_${PN} += "${datadir}/icons" -- cgit v1.2.3 From 22e8cbdc0a528809d27b957dcf5d36ea746ff6a9 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 30 Jul 2007 12:15:50 +0000 Subject: openmoko2.bbclass: add some ugly python foo to get the correct modulename and sourcedir --- classes/openmoko2.bbclass | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass index 4675b6a10e..150448a2e5 100644 --- a/classes/openmoko2.bbclass +++ b/classes/openmoko2.bbclass @@ -19,10 +19,17 @@ def openmoko_two_get_subdir(d): elif section == "inputmethods": return "inputmethods" else: return section +def openmoko_strip_two(d): + import bb + pname, openmokonumber = bb.data.getVar('PN', d, 1).split("2") + return pname + + LICENSE = "${@openmoko_two_get_license(d)}" SUBDIR = "${@openmoko_two_get_subdir(d)}" +PNAME = "${@openmoko_strip_two(d)}" -SRC_URI := "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=${PN};proto=http" -S = "${WORKDIR}/${PN}" +SRC_URI := "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=${PNAME};proto=http" +S = "${WORKDIR}/${PNAME}" FILES_${PN} += "${datadir}/icons" -- cgit v1.2.3 From 078d7b17262b2510140d1a372cc816879af1740b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Mon, 30 Jul 2007 12:26:22 +0000 Subject: disapproval of revision '0f9c4e9a82d594fcb5e8f31c8f8e761f3d47f099' --- classes/openmoko2.bbclass | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'classes') diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass index 150448a2e5..4675b6a10e 100644 --- a/classes/openmoko2.bbclass +++ b/classes/openmoko2.bbclass @@ -19,17 +19,10 @@ def openmoko_two_get_subdir(d): elif section == "inputmethods": return "inputmethods" else: return section -def openmoko_strip_two(d): - import bb - pname, openmokonumber = bb.data.getVar('PN', d, 1).split("2") - return pname - - LICENSE = "${@openmoko_two_get_license(d)}" SUBDIR = "${@openmoko_two_get_subdir(d)}" -PNAME = "${@openmoko_strip_two(d)}" -SRC_URI := "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=${PNAME};proto=http" -S = "${WORKDIR}/${PNAME}" +SRC_URI := "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=${PN};proto=http" +S = "${WORKDIR}/${PN}" FILES_${PN} += "${datadir}/icons" -- cgit v1.2.3 From b350099f15032f0c9ee22ae29c74b624d9666a4a Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Mon, 30 Jul 2007 22:37:46 +0000 Subject: Add missing libmokopanelui2 dep for all panel applets. --- classes/openmoko-panel-plugin.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/openmoko-panel-plugin.bbclass b/classes/openmoko-panel-plugin.bbclass index 4ef42b5015..6a22a92ac8 100644 --- a/classes/openmoko-panel-plugin.bbclass +++ b/classes/openmoko-panel-plugin.bbclass @@ -1,5 +1,5 @@ SECTION = "openmoko/panel-plugin" -DEPENDS += "matchbox-panel-2" +DEPENDS += "matchbox-panel-2 libmokopanelui2" inherit openmoko2 -- cgit v1.2.3 From 0adc9ee1289b5437b6386a44060117a8a5207f01 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 31 Jul 2007 15:57:04 +0000 Subject: base.bbclass: Remove warnings for older bitbake users --- classes/base.bbclass | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index fec7622f18..5381d43e7b 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -892,6 +892,13 @@ python () { base_after_parse(d) } +# Remove me when we switch to bitbake 1.8.8 +def base_get_srcrev(d): + import bb + + if bb.fetch.get_srcrev: + return bb.fetch.get_srcrev(d) + return "NOT IMPLEMENTED" # Patch handling inherit patch -- cgit v1.2.3 From 10a0258d4751e5e84adcc531f39dc365ae19ab03 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Tue, 31 Jul 2007 16:33:23 +0000 Subject: openmoko2: * prepare for SVNREV * add openmoko-calculator2 --- classes/openmoko2.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'classes') diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass index 4675b6a10e..bf5e1da6b8 100644 --- a/classes/openmoko2.bbclass +++ b/classes/openmoko2.bbclass @@ -26,3 +26,6 @@ SRC_URI := "${OPENMOKO_MIRROR}/src/target/${OPENMOKO_RELEASE}/${SUBDIR};module=$ S = "${WORKDIR}/${PN}" FILES_${PN} += "${datadir}/icons" + +# until we have SRCREV computing +SRCREV ?= "0${SRCDATE}" -- cgit v1.2.3 From 51a373396364b6b8737077eda912f7e600414863 Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Wed, 1 Aug 2007 22:29:08 +0000 Subject: openmoko* add indirection to make smooth migration from SRCDATE to SRCREV possible --- classes/openmoko2.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass index bf5e1da6b8..c5bd1c5e24 100644 --- a/classes/openmoko2.bbclass +++ b/classes/openmoko2.bbclass @@ -27,5 +27,5 @@ S = "${WORKDIR}/${PN}" FILES_${PN} += "${datadir}/icons" -# until we have SRCREV computing -SRCREV ?= "0${SRCDATE}" +# SVNREV = "r${SRCREV}" +SVNREV = "${SRCDATE}" -- cgit v1.2.3 From b9baf075d1e3d7d3334a6582f81f6ceb3492815e Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 1 Aug 2007 23:13:49 +0000 Subject: base.bbclass: Fix base_get_srcrev() --- classes/base.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 5381d43e7b..a81263a12a 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -896,7 +896,7 @@ python () { def base_get_srcrev(d): import bb - if bb.fetch.get_srcrev: + if hasattr(bb.fetch, "get_srcrev"): return bb.fetch.get_srcrev(d) return "NOT IMPLEMENTED" -- cgit v1.2.3 From f8b12ef5be647d1bd011d2415c458b937ab61c96 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 3 Aug 2007 00:18:28 +0000 Subject: patch.bbclass: Add minrev and maxrev support for patches, cleanup maxdate and mindate support --- classes/patch.bbclass | 44 +++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) (limited to 'classes') diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 12657fa0f6..2ba6729af8 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -492,33 +492,35 @@ python patch_do_patch() { else: pname = os.path.basename(unpacked) - if "mindate" in parm: - mindate = parm["mindate"] - else: - mindate = 0 - - if "maxdate" in parm: - maxdate = parm["maxdate"] - else: - maxdate = "20711226" - - pn = bb.data.getVar('PN', d, 1) - srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) + if "mindate" in parm or "maxdate" in parm: + pn = bb.data.getVar('PN', d, 1) + srcdate = bb.data.getVar('SRCDATE_%s' % pn, d, 1) + if not srcdate: + srcdate = bb.data.getVar('SRCDATE', d, 1) - if not srcdate: - srcdate = bb.data.getVar('SRCDATE', d, 1) + if srcdate == "now": + srcdate = bb.data.getVar('DATE', d, 1) - if srcdate == "now": - srcdate = bb.data.getVar('DATE', d, 1) - - if (maxdate < srcdate) or (mindate > srcdate): - if (maxdate < srcdate): + if "maxdate" in parm and parm["maxdate"] < srcdate: bb.note("Patch '%s' is outdated" % pname) + continue - if (mindate > srcdate): + if "mindate" in parm and parm["mindate"] > srcdate: bb.note("Patch '%s' is predated" % pname) + continue - continue + + if "minrev" in parm: + srcrev = bb.data.getVar('SRCREV', d, 1) + if srcrev and srcrev < parm["minrev"]: + bb.note("Patch '%s' applies to later revisions" % pname) + continue + + if "maxrev" in parm: + srcrev = bb.data.getVar('SRCREV', d, 1) + if srcrev and srcrev > parm["maxrev"]: + bb.note("Patch '%s' applies to earlier revisions" % pname) + continue bb.note("Applying patch '%s'" % pname) try: -- cgit v1.2.3 From 31af90140f95e186bc2f5a53f725429abaa8df57 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Fri, 3 Aug 2007 14:32:53 +0000 Subject: patch.bbclass: give empty file for quilt so it will not use config from user homedir - closes #2704 (code from Poky) --- classes/patch.bbclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/patch.bbclass b/classes/patch.bbclass index 2ba6729af8..0cc202820f 100644 --- a/classes/patch.bbclass +++ b/classes/patch.bbclass @@ -1,5 +1,8 @@ # Copyright (C) 2006 OpenedHand LTD +# Point to an empty file so any user's custom settings don't break things +QUILTRCFILE ?= "${STAGING_BINDIR_NATIVE}/quiltrc" + def patch_init(d): import os, sys @@ -180,9 +183,10 @@ def patch_init(d): class QuiltTree(PatchSet): def _runcmd(self, args, run = True): + quiltrc = bb.data.getVar('QUILTRCFILE', self.d, 1) if not run: - return ["quilt"] + args - runcmd(["quilt"] + args, self.dir) + return ["quilt"] + ["--quiltrc"] + [quiltrc] + args + runcmd(["quilt"] + ["--quiltrc"] + [quiltrc] + args, self.dir) def _quiltpatchpath(self, file): return os.path.join(self.dir, "patches", os.path.basename(file)) -- cgit v1.2.3 From 54060c2fe137390a12bd54d56f67c2999c06c64d Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 3 Aug 2007 16:49:23 +0000 Subject: base.bbclass: Add dependency on git-native for git packages --- classes/base.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index a81263a12a..45a0282265 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -820,6 +820,14 @@ def base_after_parse(d): bb.data.delVarFlag('MACHINE', 'export', d) bb.data.setVarFlag('MACHINE', 'unexport', 1, d) + # Git packages should DEPEND on git-native + srcuri = bb.data.getVar('SRC_URI', d, 1) + if "git://" in srcuri: + depends = bb.data.getVarFlag('do_fetch', 'depends', d) or "" + depends = depends + " git-native:do_populate_staging" + bb.data.setVarFlag('do_fetch', 'depends', depends, d) + + mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1) old_arch = bb.data.getVar('PACKAGE_ARCH', d, 1) if (old_arch == mach_arch): -- cgit v1.2.3 From a0bea97aceb28577cc04846ae55fc0036de961eb Mon Sep 17 00:00:00 2001 From: Michael Lauer Date: Sun, 5 Aug 2007 06:58:46 +0000 Subject: openmoko2.bbclass: add support for daemons --- classes/openmoko2.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'classes') diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass index c5bd1c5e24..5948cb3451 100644 --- a/classes/openmoko2.bbclass +++ b/classes/openmoko2.bbclass @@ -17,6 +17,7 @@ def openmoko_two_get_subdir(d): elif section in 'apps tools pim'.split(): return "applications" elif section == "panel-plugin": return "panel-plugins" elif section == "inputmethods": return "inputmethods" + elif section == "daemons": return "daemons" else: return section LICENSE = "${@openmoko_two_get_license(d)}" @@ -29,3 +30,5 @@ FILES_${PN} += "${datadir}/icons" # SVNREV = "r${SRCREV}" SVNREV = "${SRCDATE}" +SRCDATE = "tomorrow" + -- cgit v1.2.3 From d30807a6b6b1354be0e7a9ab464c19ca2a8f2b0b Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sun, 5 Aug 2007 07:56:59 +0000 Subject: openmoko2.bbclass: remove SRCDATE=tomorrow --- classes/openmoko2.bbclass | 1 - 1 file changed, 1 deletion(-) (limited to 'classes') diff --git a/classes/openmoko2.bbclass b/classes/openmoko2.bbclass index 5948cb3451..17b3bbafa6 100644 --- a/classes/openmoko2.bbclass +++ b/classes/openmoko2.bbclass @@ -30,5 +30,4 @@ FILES_${PN} += "${datadir}/icons" # SVNREV = "r${SRCREV}" SVNREV = "${SRCDATE}" -SRCDATE = "tomorrow" -- cgit v1.2.3 From 1353defca25324ca0166f2d8a496407c92fd05f4 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Sun, 5 Aug 2007 09:12:56 +0000 Subject: binconfig.bbclass: more munging --- classes/binconfig.bbclass | 2 ++ 1 file changed, 2 insertions(+) (limited to 'classes') diff --git a/classes/binconfig.bbclass b/classes/binconfig.bbclass index dadf2dddfc..497b78f454 100644 --- a/classes/binconfig.bbclass +++ b/classes/binconfig.bbclass @@ -18,6 +18,8 @@ def get_binconfig_mangle(d): s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'" s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'" + s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'" + s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'" return s BINCONFIG_GLOB ?= "*-config" -- cgit v1.2.3 From 266445616acc479196e1be02af1981ef7f3f4569 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 6 Aug 2007 11:47:47 +0000 Subject: zaurus-2.6: Create an install kit when generating images (from bug #2690 with modifications) --- classes/image.bbclass | 3 +++ 1 file changed, 3 insertions(+) (limited to 'classes') diff --git a/classes/image.bbclass b/classes/image.bbclass index 101b53307a..248ccab60b 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -58,6 +58,7 @@ IMAGE_LINGUAS ?= "de-de fr-fr en-gb" LINGUAS_INSTALL = "${@" ".join(map(lambda s: "locale-base-%s" % s, bb.data.getVar('IMAGE_LINGUAS', d, 1).split()))}" ROOTFS_POSTPROCESS_COMMAND ?= "" +MACHINE_POSTPROCESS_COMMAND ?= "" do_rootfs[nostamp] = "1" do_rootfs[dirs] = "${TOPDIR}" @@ -100,6 +101,8 @@ fakeroot do_rootfs () { done ${IMAGE_POSTPROCESS_COMMAND} + + ${MACHINE_POSTPROCESS_COMMAND} } insert_feed_uris () { -- cgit v1.2.3 From 933172af0a4715960c3a7dd8c716ff2d9c1f4080 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 7 Aug 2007 15:03:19 +0000 Subject: package_deb/rootfs_deb.bbclass: Sync fixes from Poky --- classes/package_deb.bbclass | 7 ++++++- classes/rootfs_deb.bbclass | 21 ++++++++++++++------- 2 files changed, 20 insertions(+), 8 deletions(-) (limited to 'classes') diff --git a/classes/package_deb.bbclass b/classes/package_deb.bbclass index d172fb1766..9a8db4f8f2 100644 --- a/classes/package_deb.bbclass +++ b/classes/package_deb.bbclass @@ -1,3 +1,7 @@ +# +# Copyright 2006-2007 OpenedHand Ltd. +# + inherit package PACKAGE_EXTRA_DEPENDS += "dpkg-native fakeroot-native" @@ -132,6 +136,7 @@ python do_package_deb () { continue controldir = os.path.join(root, 'DEBIAN') bb.mkdirhier(controldir) + os.chmod(controldir, 0755) try: ctrlfile = file(os.path.join(controldir, 'control'), 'wb') # import codecs @@ -150,7 +155,7 @@ python do_package_deb () { fields.append(["Priority: %s\n", ['PRIORITY']]) fields.append(["Maintainer: %s\n", ['MAINTAINER']]) fields.append(["Architecture: %s\n", ['TARGET_ARCH']]) - fields.append(["OE: %s\n", ['P']]) + fields.append(["OE: %s\n", ['PN']]) fields.append(["Homepage: %s\n", ['HOMEPAGE']]) # Package, Version, Maintainer, Description - mandatory diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass index f444541509..67fa661308 100644 --- a/classes/rootfs_deb.bbclass +++ b/classes/rootfs_deb.bbclass @@ -1,3 +1,6 @@ +# +# Copyright 2006-2007 Openedhand Ltd. +# do_rootfs[depends] += "dpkg-native:do_populate_staging apt-native:do_populate_staging" @@ -52,21 +55,21 @@ fakeroot rootfs_deb_do_rootfs () { } if [ ! -z "${LINGUAS_INSTALL}" ]; then - apt-get install glibc-localedata-i18n - if [ $? -eq 1 ]; then - exit 1 + apt-get install glibc-localedata-i18n --force-yes --allow-unauthenticated + if [ $? -ne 0 ]; then + exit $? fi for i in ${LINGUAS_INSTALL}; do - apt-get install $i - if [ $? -eq 1 ]; then - exit 1 + apt-get install $i --force-yes --allow-unauthenticated + if [ $? -ne 0 ]; then + exit $? fi done fi if [ ! -z "${PACKAGE_INSTALL}" ]; then for i in ${PACKAGE_INSTALL}; do - apt-get install $i + apt-get install $i --force-yes --allow-unauthenticated if [ $? -eq 1 ]; then exit 1 fi @@ -134,3 +137,7 @@ rootfs_deb_log_check() { true } +remove_packaging_data_files() { + rm -rf ${IMAGE_ROOTFS}/usr/lib/ipkg/ + rm -rf ${IMAGE_ROOTFS}/usr/dpkg/ +} -- cgit v1.2.3 From dac9996698abbf10b95ff0e90dc762882a566c91 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 8 Aug 2007 11:05:20 +0000 Subject: seppuku.bbclass: fix indentation * grrrrr, stupid python --- classes/seppuku.bbclass | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 937c973ad5..a3b8b36dd0 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -346,8 +346,8 @@ python seppuku_eventhandler() { bug_number = seppuku_file_bug(poster, newbug, product, component, bugname, text) if not bug_number: print >> debug_file, "Filing a bugreport failed" - else: - print >> debug_file, "The new bug_number: '%s'" % bug_number + else: + print >> debug_file, "The new bug_number: '%s'" % bug_number if file: if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file): -- cgit v1.2.3 From aafc991015bccabfa1f03cac6ea8b7790c68a50f Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 8 Aug 2007 13:42:50 +0000 Subject: update-rc.d: merge in ${D} cleanups from poky --- classes/update-rc.d.bbclass | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'classes') diff --git a/classes/update-rc.d.bbclass b/classes/update-rc.d.bbclass index 9821eec5b2..3051b7933f 100644 --- a/classes/update-rc.d.bbclass +++ b/classes/update-rc.d.bbclass @@ -7,17 +7,15 @@ INIT_D_DIR = "${sysconfdir}/init.d" updatercd_postinst() { if test "x$D" != "x"; then - D="-r $D" + OPT="-r $D" else - D="-s" + OPT="-s" fi -update-rc.d $D ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} +update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS} } updatercd_prerm() { -if test "x$D" != "x"; then - D="-r $D" -else +if test "x$D" = "x"; then ${INIT_D_DIR}/${INITSCRIPT_NAME} stop fi } -- cgit v1.2.3 From 5644015c642b053c3614dada21895df95e9171bc Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 8 Aug 2007 21:39:29 +0000 Subject: gtk-icon-cache: Add comment from poky's version --- classes/gtk-icon-cache.bbclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/gtk-icon-cache.bbclass b/classes/gtk-icon-cache.bbclass index 855a72a2f7..b86562890a 100644 --- a/classes/gtk-icon-cache.bbclass +++ b/classes/gtk-icon-cache.bbclass @@ -1,6 +1,8 @@ FILES_${PN} += "${datadir}/icons/hicolor" -RDEPENDS += " hicolor-icon-theme " +RDEPENDS += "hicolor-icon-theme" +# This could run on the host as icon cache files are architecture independent, +# but there is no gtk-update-icon-cache built natively. gtk-icon-cache_postinst() { if [ "x$D" != "x" ]; then exit 1 -- cgit v1.2.3 From 525301d9a28061d71fb7e013759f3e5a185d2b46 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Wed, 8 Aug 2007 21:42:19 +0000 Subject: base.bbclass: Tweaks from Poky (extra comment, lib handling bugfix to not clobber a variable name and unset DISTRO (to unbreak setting DISTRO as an environment variable) --- classes/base.bbclass | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'classes') diff --git a/classes/base.bbclass b/classes/base.bbclass index 45a0282265..1294e41c65 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -82,6 +82,9 @@ def base_dep_prepend(d): if bb.data.getVar('PN', d, True) == "shasum-native": deps = "" + # INHIBIT_DEFAULT_DEPS doesn't apply to the patch command. Whether or not + # we need that built is the responsibility of the patch function / class, not + # the application. if not bb.data.getVar('INHIBIT_DEFAULT_DEPS', d): if (bb.data.getVar('HOST_SYS', d, 1) != bb.data.getVar('BUILD_SYS', d, 1)): @@ -272,8 +275,12 @@ oe_libinstall() { # If such file doesn't exist, try to cut version suffix if [ ! -f "$lafile" ]; then - libname=`echo "$libname" | sed 's/-[0-9.]*$//'` - lafile=$libname.la + libname1=`echo "$libname" | sed 's/-[0-9.]*$//'` + lafile1=$libname.la + if [ -f "$lafile1" ]; then + libname=$libname1 + lafile=$lafile1 + fi fi if [ -f "$lafile" ]; then @@ -807,6 +814,7 @@ def base_after_parse(d): 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: @@ -816,9 +824,15 @@ def base_after_parse(d): if use_nls != None: bb.data.setVar('USE_NLS', use_nls, d) - # Make sure MACHINE *isn't* exported + # Make sure MACHINE isn't exported + # (breaks binutils at least) bb.data.delVarFlag('MACHINE', 'export', d) bb.data.setVarFlag('MACHINE', 'unexport', 1, d) + + # Make sure DISTRO isn't exported + # (breaks sysvinit at least) + bb.data.delVarFlag('DISTRO', 'export', d) + bb.data.setVarFlag('DISTRO', 'unexport', 1, d) # Git packages should DEPEND on git-native srcuri = bb.data.getVar('SRC_URI', d, 1) @@ -826,7 +840,6 @@ def base_after_parse(d): depends = bb.data.getVarFlag('do_fetch', 'depends', d) or "" depends = depends + " git-native:do_populate_staging" bb.data.setVarFlag('do_fetch', 'depends', depends, d) - mach_arch = bb.data.getVar('MACHINE_ARCH', d, 1) old_arch = bb.data.getVar('PACKAGE_ARCH', d, 1) -- cgit v1.2.3