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.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie1b1f3b1ae0b66f850f9f3cdf5146db8b2e68466
diff --git a/recipes-core/os-release/os-release.bbappend b/recipes-core/os-release/os-release.bbappend
index 0f938c3..5d4a4af 100644
--- a/recipes-core/os-release/os-release.bbappend
+++ b/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')}"