sanity: correct misleading message about location of TMPDIR
authorPhil Blundell <philb@gnu.org>
Tue, 9 Feb 2010 11:33:09 +0000 (11:33 +0000)
committerPhil Blundell <philb@gnu.org>
Tue, 9 Feb 2010 11:34:08 +0000 (11:34 +0000)
There is no point in telling users to move TMPDIR "back" to its current location :-}

classes/sanity.bbclass

index f57d8e4..b66c9a9 100644 (file)
@@ -135,8 +135,9 @@ def check_sanity(e):
        checkfile = os.path.join(tmpdir, "saved_tmpdir")
        if os.path.exists(checkfile):
                f = file(checkfile, "r")
-               if (f.read().strip() != tmpdir):
-                       messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % tmpdir
+               oldpath = f.read().strip()
+               if (oldpath != tmpdir):
+                       messages = messages + "Error, TMPDIR has changed location. You need to either move it back to %s or rebuild\n" % oldpath
        else:
                import bb
                bb.mkdirhier(tmpdir)