]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake/bitbake-dev: Sync with upstream
authorRichard Purdie <richard@openedhand.com>
Tue, 30 Sep 2008 20:46:17 +0000 (20:46 +0000)
committerRichard Purdie <richard@openedhand.com>
Tue, 30 Sep 2008 20:46:17 +0000 (20:46 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5346 311d38ba-8fff-0310-9ca6-ca027cbcb966

bitbake-dev/ChangeLog
bitbake-dev/bin/bbimage [deleted file]
bitbake-dev/bin/bitbake
bitbake-dev/lib/bb/cooker.py
bitbake-dev/lib/bb/parse/parse_py/ConfHandler.py
bitbake/ChangeLog
bitbake/bin/bitbake
bitbake/lib/bb/cooker.py
bitbake/lib/bb/parse/parse_py/ConfHandler.py
bitbake/lib/bb/utils.py

index 2ad0f713ff65cd2749475d9321907961f00db6d2..83f602e49489c4e3d1db5b4d14d77a75d765194a 100644 (file)
@@ -143,6 +143,12 @@ Changes in Bitbake 1.9.x:
        - Revert the '-' character fix in class names since it breaks things
        - When a regexp fails to compile for PACKAGES_DYNAMIC, print a more useful error (#4444)
        - Allow to checkout CVS by Date and Time. Just add HHmm to the SRCDATE.
+       - Move prunedir function to utils.py and add explode_dep_versions function
+       - Raise an exception if SRCREV == 'INVALID'
+       - Fix hg fetcher username/password handling and fix crash
+       - Fix PACKAGES_DYNAMIC handling of packages with '++' in the name
+       - Rename __depends to __base_depends after configuration parsing so we don't
+         recheck the validity of the config files time after time
 
 Changes in Bitbake 1.8.0:
        - Release 1.7.x as a stable series
diff --git a/bitbake-dev/bin/bbimage b/bitbake-dev/bin/bbimage
deleted file mode 100755 (executable)
index 96b7dca..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-#!/usr/bin/env python
-# ex:ts=4:sw=4:sts=4:et
-# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
-#
-# Copyright (C) 2003  Chris Larson
-#
-#    This program is free software; you can redistribute it and/or modify
-#    it under the terms of the GNU General Public License version 2 as
-#    published by the Free Software Foundation.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU General Public License for more details.
-#
-#    You should have received a copy of the GNU General Public License along
-#    with this program; if not, write to the Free Software Foundation, Inc.,
-#    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-import sys, os
-sys.path.insert(0,os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib'))
-import bb
-from bb import *
-
-__version__ = 1.1
-type = "jffs2"
-cfg_bb = data.init()
-cfg_oespawn = data.init()
-
-bb.msg.set_debug_level(0)
-
-def usage():
-    print "Usage: bbimage [options ...]"
-    print "Creates an image for a target device from a root filesystem,"
-    print "obeying configuration parameters from the BitBake"
-    print "configuration files, thereby easing handling of deviceisms."
-    print ""
-    print "  %s\t\t%s" % ("-r [arg], --root [arg]", "root directory (default=${IMAGE_ROOTFS})")
-    print "  %s\t\t%s" % ("-t [arg], --type [arg]", "image type (jffs2[default], cramfs)")
-    print "  %s\t\t%s" % ("-n [arg], --name [arg]", "image name (override IMAGE_NAME variable)")
-    print "  %s\t\t%s" % ("-v, --version", "output version information and exit")
-    sys.exit(0)
-
-def version():
-    print "BitBake Build Tool Core version %s" % bb.__version__
-    print "BBImage version %s" % __version__
-
-def emit_bb(d, base_d = {}):
-    for v in d.keys():
-        if d[v] != base_d[v]:
-            data.emit_var(v, d)
-
-def getopthash(l):
-    h = {}
-    for (opt, val) in l:
-        h[opt] = val
-    return h
-
-import getopt
-try:
-    (opts, args) = getopt.getopt(sys.argv[1:], 'vr:t:e:n:', [ 'version', 'root=', 'type=', 'bbfile=', 'name=' ])
-except getopt.GetoptError:
-    usage()
-
-# handle opts
-opthash = getopthash(opts)
-
-if '--version' in opthash or '-v' in opthash:
-    version()
-    sys.exit(0)
-
-try:
-    cfg_bb = parse.handle(os.path.join('conf', 'bitbake.conf'), cfg_bb)
-except IOError:
-    fatal("Unable to open bitbake.conf")
-
-# sanity check
-if cfg_bb is None:
-    fatal("Unable to open/parse %s" % os.path.join('conf', 'bitbake.conf'))
-    usage(1)
-
-# Handle any INHERITs and inherit the base class
-inherits  = ["base"] + (bb.data.getVar('INHERIT', cfg_bb, True ) or "").split()
-for inherit in inherits:
-    cfg_bb = bb.parse.handle(os.path.join('classes', '%s.bbclass' % inherit), cfg_bb, True )
-
-rootfs = None
-extra_files = []
-
-if '--root' in opthash:
-    rootfs = opthash['--root']
-if '-r' in opthash:
-    rootfs = opthash['-r']
-
-if '--type' in opthash:
-    type = opthash['--type']
-if '-t' in opthash:
-    type = opthash['-t']
-
-if '--bbfile' in opthash:
-    extra_files.append(opthash['--bbfile'])
-if '-e' in opthash:
-    extra_files.append(opthash['-e'])
-
-for f in extra_files:
-    try:
-        cfg_bb = parse.handle(f, cfg_bb)
-    except IOError:
-        print "unable to open %s" % f
-
-if not rootfs:
-    rootfs = data.getVar('IMAGE_ROOTFS', cfg_bb, 1)
-
-if not rootfs:
-    bb.fatal("IMAGE_ROOTFS not defined")
-
-data.setVar('IMAGE_ROOTFS', rootfs, cfg_bb)
-
-from copy import copy, deepcopy
-localdata = data.createCopy(cfg_bb)
-
-overrides = data.getVar('OVERRIDES', localdata)
-if not overrides:
-    bb.fatal("OVERRIDES not defined.")
-data.setVar('OVERRIDES', '%s:%s' % (overrides, type), localdata)
-data.update_data(localdata)
-data.setVar('OVERRIDES', overrides, localdata)
-
-if '-n' in opthash:
-    data.setVar('IMAGE_NAME', opthash['-n'], localdata)
-if '--name' in opthash:
-    data.setVar('IMAGE_NAME', opthash['--name'], localdata)
-
-topdir = data.getVar('TOPDIR', localdata, 1) or os.getcwd()
-
-cmd = data.getVar('IMAGE_CMD', localdata, 1)
-if not cmd:
-    bb.fatal("IMAGE_CMD not defined")
-
-outdir = data.getVar('DEPLOY_DIR_IMAGE', localdata, 1)
-if not outdir:
-    bb.fatal('DEPLOY_DIR_IMAGE not defined')
-mkdirhier(outdir)
-
-#depends = data.getVar('IMAGE_DEPENDS', localdata, 1) or ""
-#if depends:
-#       bb.note("Spawning bbmake to satisfy dependencies: %s" % depends)
-#       ret = os.system('bbmake %s' % depends)
-#       if ret != 0:
-#           bb.error("executing bbmake to satisfy dependencies")
-
-bb.note("Executing %s" % cmd)
-data.setVar('image_cmd', cmd, localdata)
-data.setVarFlag('image_cmd', 'func', 1, localdata)
-try:
-    bb.build.exec_func('image_cmd', localdata)
-except bb.build.FuncFailed:
-    sys.exit(1)
-#ret = os.system(cmd)
-#sys.exit(ret)
index 067cc274f9e875eeab0523071ac3f53d422a8312..c994edb84b8c0036eaf92de7785fc122d513c596 100755 (executable)
@@ -140,6 +140,7 @@ Default BBFILES are the .bb files in the current directory.""" )
 
 
     cooker = bb.cooker.BBCooker(configuration)
+    cooker.parseConfiguration()
     host = cooker.server.host
     port = cooker.server.port
 
index 8eb1a410f214bbaaf6179923232f6562f907b2eb..1531808613d9340a166278c59b0d5fafb2263125 100644 (file)
@@ -86,6 +86,10 @@ class BBCooker:
 
         self.configuration.data = bb.data.init()
 
+    def parseConfiguration(self):
+
+        bb.data.inheritFromOS(self.configuration.data)
+
         for f in self.configuration.file:
             self.parseConfigurationFile( f )
 
index e6488bbe1129e7c6084c23a9428c048fb4a24954..f8a49689e2f7119f3b8ae2f41ad5d6e0734683f5 100644 (file)
@@ -118,7 +118,6 @@ def handle(fn, data, include = 0):
     init(data)
 
     if include == 0:
-        bb.data.inheritFromOS(data)
         oldfile = None
     else:
         oldfile = bb.data.getVar('FILE', data)
index c4aa5ba19898c28f744e2e1b8c0f330b1f201857..a2d0da29eaa0d6c3ee1c14d886f4a3b60d02adb3 100644 (file)
@@ -52,6 +52,8 @@ Changes in BitBake 1.8.x:
        - Raise an exception if SRCREV == 'INVALID'
        - Fix hg fetcher username/password handling and fix crash
        - Fix PACKAGES_DYNAMIC handling of packages with '++' in the name
+       - Rename __depends to __base_depends after configuration parsing so we don't
+         recheck the validity of the config files time after time
 
 Changes in BitBake 1.8.10:
        - Psyco is available only for x86 - do not use it on other architectures.
index 4492bf045b31b497716d7f7668ef9819e12f2957..e262d0b9b4fb59505f3474e3df49692875321b56 100755 (executable)
@@ -113,6 +113,8 @@ Default BBFILES are the .bb files in the current directory.""" )
 
     cooker = bb.cooker.BBCooker(configuration)
 
+    cooker.parseConfiguration()
+
     if configuration.profile:
         try:
             import cProfile as profile
index 8e6acb19fc897ffb0b7826c9fb16a2dba14d20b5..50624d8d3380aa330aba750ae884de6f942fda2e 100644 (file)
@@ -59,6 +59,10 @@ class BBCooker:
 
         self.configuration.data = bb.data.init()
 
+    def parseConfiguration(self):
+
+        bb.data.inheritFromOS(self.configuration.data)
+
         for f in self.configuration.file:
             self.parseConfigurationFile( f )
 
index e6488bbe1129e7c6084c23a9428c048fb4a24954..f8a49689e2f7119f3b8ae2f41ad5d6e0734683f5 100644 (file)
@@ -118,7 +118,6 @@ def handle(fn, data, include = 0):
     init(data)
 
     if include == 0:
-        bb.data.inheritFromOS(data)
         oldfile = None
     else:
         oldfile = bb.data.getVar('FILE', data)
index 211ac8129f9ae746bac439dd081a837f4a3d07e6..9c8d8e84358ed021849b0f1f9ed95344fccdb681 100644 (file)
@@ -305,3 +305,4 @@ def prunedir(topdir):
         for name in dirs:
             os.rmdir(os.path.join(root, name))
     os.rmdir(topdir)
+