Commit 2ba62438 authored by Mark Olesen's avatar Mark Olesen

CONFIG: refine handling of git information for debian builds

- When OpenFOAM is under git control and a 'debian/' directory exists,
  this could mean two things:

  1) Additional debian control has been added to OpenFOAM
  2) OpenFOAM has been imported into a debian project

For the case that OpenFOAM has been imported into a debian project,
using the git information would be highly misleading. There will be no
OpenFOAM SHA1 correspondence.

However, if additional debian control has been added to OpenFOAM the
SHA1 will be valid.

The ad hoc solution is to use an additional "openfoam.debian"
directory to flag the addition of debian controls into openfoam.

When a "debian/" directory exists without a "openfoam.debian", assume
that the OpenFOAM has been imported into debian and do not use the SHA1.
parent 5754beea
......@@ -29,9 +29,18 @@
# - debian : implicitly disables git queries
# Note
# When a 'debian/' directory exists, the '.git/' directory is most
# likely from debian and not from OpenFOAM (ie, useless here).
# This corresponds to an implicit '-no-git', which has no effect
# There is a corner case when obtaining build information from git.
# It is possible that OpenFOAM has been imported into a debian form,
# in which case the '.git/' directory is most from debian and cannot
# be used to obtain an OpenFOAM sha1 value.
# Ad hoc logic (slightly messy):
# 1) Have an 'openfoam.debian/' directory.
# Assume that debian control has been added to OpenFOAM.
# Can use git to obtain build information.
# 2) Have a 'debian/' directory only.
# Assume OpenFOAM has been added into a debian project.
# Treat as '-no-git', which which has no effect
# when building from pristine sources.
# SeeAlso
......@@ -145,8 +154,10 @@ done
[ -d "$META_INFO" ] || \
die "No ${META_INFO##*/}/ directory for project"
# Disable git queries for debian packaging (see notes above)
if [ -d "$WM_PROJECT_DIR/debian" ]
# Debian handling (see notes above)
# - disable git queries if debian project and not internal "debianization"
if [ -d "$WM_PROJECT_DIR/debian" ] \
&& [ ! -e "$WM_PROJECT_DIR/openfoam.debian" ]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment