[CIG-SHORT] [petsc-maint] Git Version of PETSc does not compile

Satish Balay balay at mcs.anl.gov
Fri Feb 13 09:10:41 PST 2015


On Fri, 13 Feb 2015, Satish Balay wrote:

> So '--depth 1' just preserves only 1 commit - and not anything else from git history?
> 
> For one - perhaps we should use 'git fsck'? to do any checks - and not rely on 'git describe'?
> https://bitbucket.org/petsc/petsc/commits/6e709e5a83e3e6154cead97c7482e3df92822301
> 
> And secondly - for VERSION_GIT - if 'git describe' breaks - we should
> just do 'git log -1 --pretty=format:%H' - as we used to do before..

'git fsck' is probably overkill. Perhaps the follwing fix will suffice.

Satish

----------
[balay at maverick petsc-pylith]$ git diff |cat
diff --git a/config/PETSc/options/petscclone.py b/config/PETSc/options/petscclone.py
index ae1fb95..3d9ddd4 100644
--- a/config/PETSc/options/petscclone.py
+++ b/config/PETSc/options/petscclone.py
@@ -21,6 +21,8 @@ class Configure(config.base.Configure):
         if hasattr(self.sourceControl,'git'):
           VERSION_GIT = os.popen("cd "+self.petscdir.dir+" && "+self.sourceControl.git+" describe").read()
           if not VERSION_GIT:
+            VERSION_GIT = os.popen("cd "+self.petscdir.dir+" && "+self.sourceControl.git+" log -1 --pretty=format:%H").read()
+          if not VERSION_GIT:
             raise RuntimeError('Your petsc source tree is broken. Use "git status" to check, or remove the entire directory and start all over again')
           self.addDefine('VERSION_GIT','"'+VERSION_GIT.strip()+'"')
           self.addDefine('VERSION_DATE_GIT','"'+os.popen("cd "+self.petscdir.dir+" && "+self.sourceControl.git+" log -1 --pretty=format:%ci").read()+'"')
[balay at maverick petsc-pylith]$ 


More information about the CIG-SHORT mailing list