lib/bb/cache.py:
authorRichard Purdie <rpurdie@linux.intel.com>
Sat, 29 Apr 2006 10:12:12 +0000 (10:12 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Sat, 29 Apr 2006 10:12:12 +0000 (10:12 +0000)
        - Check the directory exists before chdir. Catches the parsing error
          instead of crashing bitbake.

lib/bb/cache.py

index e3e0d6a..921a9f7 100644 (file)
@@ -271,7 +271,8 @@ class Cache:
         #data.setVar('TOPDIR', topdir, cfg)
         # go there
         oldpath = os.path.abspath(os.getcwd())
-        os.chdir(topdir)
+        if self.mtime(topdir):
+            os.chdir(topdir)
         bb_data = data.init_db(cooker.configuration.data)
         try:
             parse.handle(bbfile, bb_data) # read .bb data