os-release: disable 'pseudo' for git

bitbake recipes are run under a process monitor called 'pseudo'.
We are observing cases where these are triggering a "Pseudo Abort" due
to inode reuse (https://wiki.yoctoproject.org/wiki/Pseudo_Abort) of
some sort.  'pseudo' is used for running operations which may require
higher levels of privledge and recording them so they can be re-applied
when building a file system.  The `git` calls we are doing are to
determine the revision of the repository and therefore do not need
'pseudo' support.  Disable it with the PSEUDO_DISABLED=1 env var.

Also, add a bb.warn call of any exception that is caused by the `git`
call for future debugging.

(From meta-phosphor rev: 64cdbcfa62b5009f7282091b54d10e1149cf0689)

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I6ac3fbb1ee15f435ce53ce8f82830120446205a9
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
diff --git a/meta-phosphor/recipes-core/os-release/os-release.bbappend b/meta-phosphor/recipes-core/os-release/os-release.bbappend
index 0f938c3..5d4a4af 100644
--- a/meta-phosphor/recipes-core/os-release/os-release.bbappend
+++ b/meta-phosphor/recipes-core/os-release/os-release.bbappend
@@ -8,9 +8,11 @@
 def run_git(d, cmd):
     try:
         oeroot = d.getVar('COREBASE', True)
-        return bb.process.run("git --work-tree %s --git-dir %s/.git %s"
+        return bb.process.run(("export PSEUDO_DISABLED=1; " +
+                               "git --work-tree %s --git-dir %s/.git %s")
             % (oeroot, oeroot, cmd))[0].strip('\n')
-    except:
+    except Exception as e:
+        bb.warn("Unexpected exception from 'git' call: %s" % e)
         pass
 
 VERSION_ID := "${@run_git(d, 'describe --dirty --long')}"