[oe-commits] org.oe.dev nylon: added nylon-helpers.bbclass (helper functions for working on the svn trunk), updated preferred providers in nylon.conf.

MartinDietze commit openembedded-commits at lists.openembedded.org
Thu Sep 14 10:16:25 UTC 2006


nylon: added nylon-helpers.bbclass (helper functions for working on the svn trunk), updated preferred providers in nylon.conf.

Author: MartinDietze at openembedded.org
Branch: org.openembedded.dev
Revision: 1482c6f150d809249fa27791b84ca28cf0fce32f
ViewMTN: http://monotone.openembedded.org/revision.psp?id=1482c6f150d809249fa27791b84ca28cf0fce32f
Files:
1
classes/nylon-helpers.bbclass
conf/distro/nylon.conf
Diffs:

#
# mt diff -rb4bf51e9a28c304a65cb9404db8055f66bbbd736 -r1482c6f150d809249fa27791b84ca28cf0fce32f
#
# 
# 
# add_file "classes/nylon-helpers.bbclass"
#  content [0b5bc6d97d6aab2ad4a6f26f07b1dcdab89b0336]
# 
# patch "conf/distro/nylon.conf"
#  from [15285ced48fb620041b3680bd5101bb8f2b9e5a4]
#    to [120dd06f2877ea1b56616efc5d4d0b50489f265c]
# 
============================================================
--- classes/nylon-helpers.bbclass	0b5bc6d97d6aab2ad4a6f26f07b1dcdab89b0336
+++ classes/nylon-helpers.bbclass	0b5bc6d97d6aab2ad4a6f26f07b1dcdab89b0336
@@ -0,0 +1,35 @@
+# ############################################################################
+# Helper functions for building packages from the trunk or branches. To use
+# this .bbclass simply inherit from it in your conf/local.conf.
+#
+# - get_branch() helps to construct the package name when fetching by 
+#   extracting the directory name above the "build" directory containing the
+#   oe environment and bitbake. That directory name is usually the branch in
+#   which the package is located in the svn with one exception: "unstable"
+#   is synonymous for "trunk". In the package you can then use the ${BRANCH}
+#   variable within the svn (or cvs) url for the package.
+#
+# - get_tomorrow() makes sure the latest version of a package is fetched. To
+#   use it, set the SRCDATE to ${TOMORROW}.
+# ############################################################################
+
+def get_branch():
+	import commands, re
+	build = re.sub(r'/sources$', '', commands.getoutput('pwd'))
+	build = re.sub(r'/tmp/work.*$', '', build)
+	build = re.sub(r'/packages\.4g.*$', '', build)
+	if re.search(r'/trunk/[^/]+/?$', build):
+		return 'trunk'
+	if re.search(r'/unstable$', build):
+		return 'trunk'
+	if re.search(r'/testing$', build):
+		return 'testing'
+	return re.sub(r'^.*/([^/]+/[^/]+)/[^/]+/?$', r'\1', build)
+
+# end of get_branch
+
+def get_tomorrow():
+	import time
+	return time.strftime('%Y%m%d', time.gmtime(time.time() + 3600*24))
+
+# end of get_tomorrow
============================================================
--- conf/distro/nylon.conf	15285ced48fb620041b3680bd5101bb8f2b9e5a4
+++ conf/distro/nylon.conf	120dd06f2877ea1b56616efc5d4d0b50489f265c
@@ -18,6 +18,8 @@ PREFERRED_PROVIDERS += " virtual/${TARGE
 PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross"
 PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross"
 PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}libc-for-gcc:glibc"
+PREFERRED_PROVIDERS += " virtual/libx11:diet-x11"
+PREFERRED_PROVIDERS += " python:python-curses"
 
 TARGET_FPU = "soft"
 
@@ -33,6 +35,8 @@ PREFERRED_VERSION_ppp-dsl = "0.1-monolit
 PREFERRED_VERSION_binutils = "2.16"
 PREFERRED_VERSION_shorewall = "2.0.9-monolithic"
 PREFERRED_VERSION_ppp-dsl = "0.1-monolithic"
+PREFERRED_VERSION_mtd-utils = "0.0.0+cvs20041113"
+PREFERRED_VERSION_kismet = "2005-01-R1"
 
 PREFERRED_VERSION_prism54-firmware = "1.0.3.0"
 






More information about the Openembedded-commits mailing list