diff options
| author | Richard Purdie <richard@openedhand.com> | 2006-05-27 21:49:50 +0000 |
|---|---|---|
| committer | Richard Purdie <richard@openedhand.com> | 2006-05-27 21:49:50 +0000 |
| commit | 3097ab0f62233dc336dfe611fef4b8b633355190 (patch) | |
| tree | 8173abc003c9703cf625d4e100f57d3d5141177d /openembedded/classes/sanity.bbclass | |
| parent | b77fcc05cacdf70819cc226d53156a9e70e84e04 (diff) | |
| download | poky-3097ab0f62233dc336dfe611fef4b8b633355190.tar.gz | |
Sync conf and classes with OE - changes have been tested and don't affect poky
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@446 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/classes/sanity.bbclass')
| -rw-r--r-- | openembedded/classes/sanity.bbclass | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/openembedded/classes/sanity.bbclass b/openembedded/classes/sanity.bbclass index 8253b27930..a626162ffb 100644 --- a/openembedded/classes/sanity.bbclass +++ b/openembedded/classes/sanity.bbclass | |||
| @@ -4,7 +4,11 @@ | |||
| 4 | 4 | ||
| 5 | def raise_sanity_error(msg): | 5 | def raise_sanity_error(msg): |
| 6 | import bb | 6 | import bb |
| 7 | bb.fatal("Openembedded's config sanity checker detected a potential misconfiguration.\nEither fix the cause of this error or at your own risk disable the checker (see sanity.conf).\n%s" % msg) | 7 | bb.fatal(""" Openembedded's config sanity checker detected a potential misconfiguration. |
| 8 | Either fix the cause of this error or at your own risk disable the checker (see sanity.conf). | ||
| 9 | Following is the list of potential problems / advisories: | ||
| 10 | |||
| 11 | %s""" % msg) | ||
| 8 | 12 | ||
| 9 | def check_conf_exists(fn, data): | 13 | def check_conf_exists(fn, data): |
| 10 | import bb, os | 14 | import bb, os |
| @@ -31,7 +35,10 @@ def check_app_exists(app, d): | |||
| 31 | def check_sanity(e): | 35 | def check_sanity(e): |
| 32 | from bb import note, error, data, __version__ | 36 | from bb import note, error, data, __version__ |
| 33 | from bb.event import Handled, NotHandled, getName | 37 | from bb.event import Handled, NotHandled, getName |
| 34 | from distutils.version import LooseVersion | 38 | try: |
| 39 | from distutils.version import LooseVersion | ||
| 40 | except ImportError: | ||
| 41 | def LooseVersion(v): print "WARNING: sanity.bbclass can't compare versions without python-distutils"; return 1 | ||
| 35 | import os | 42 | import os |
| 36 | 43 | ||
| 37 | # Check the bitbake version meets minimum requirements | 44 | # Check the bitbake version meets minimum requirements |
| @@ -83,6 +90,12 @@ def check_sanity(e): | |||
| 83 | if not check_app_exists('texi2html', e.data): | 90 | if not check_app_exists('texi2html', e.data): |
| 84 | raise_sanity_error('Please install the texi2html binary') | 91 | raise_sanity_error('Please install the texi2html binary') |
| 85 | 92 | ||
| 93 | if not check_app_exists('cvs', e.data): | ||
| 94 | raise_sanity_error('Please install the cvs utility') | ||
| 95 | |||
| 96 | if not check_app_exists('svn', e.data): | ||
| 97 | raise_sanity_error('Please install the svn utility') | ||
| 98 | |||
| 86 | oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) | 99 | oes_bb_conf = data.getVar( 'OES_BITBAKE_CONF', e.data, True ) |
| 87 | if not oes_bb_conf: | 100 | if not oes_bb_conf: |
| 88 | raise_sanity_error('You do not include OpenEmbeddeds version of conf/bitbake.conf') | 101 | raise_sanity_error('You do not include OpenEmbeddeds version of conf/bitbake.conf') |
