inconsistency in handling of FOAMversion
Issue raised (or stumbled over) by @escrmic
The compilation scripts define Foam::FOAMversion
based on the version information at compile time (eg, WM_PROJECT_VERSION=1612). Subsequent renaming of the version within the etc/bashrc
(eg, WM_PROJECT_VERSION=1612.update2 or whatever) will not be respected in the internal findEtcFiles()
lookups.
This can lead to a slight dichotomy since bin/foamEtcFile
will use the current value of WM_PROJECT_VERSION. Thus foamEtcFile
and findEtcFiles()
will potentially locate different version-specific user or site files.
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Link issues together to show that they're related. Learn more.
Activity
- Author Maintainer
Possible solution: use WM_PROJECT_VERSION instead of FOAMversion in findEtcFiles, but leave IOobjectWriteHeader.C untouched, since this corresponds roughly to the API level.
Another alternative? Could use API level only for findEtcFiles (the OPENFOAM define) since this reflects changes in behaviour and would be consistent for various patch updates, but it is not clear how this would be propagated into
bin/foamEtcFile
in any consistent manner. - Mark OLESEN changed the description
changed the description
- Author Maintainer
- Mark OLESEN mentioned in commit 92d0798dda3b232ca10c6ca34e843bcfebcccabb
mentioned in commit 92d0798dda3b232ca10c6ca34e843bcfebcccabb
- Mark OLESEN mentioned in commit 7675954c1dfe17d098462d793e525c69188f313f
mentioned in commit 7675954c1dfe17d098462d793e525c69188f313f
- Author Maintainer
Discussion with @andy right now, but should also refer it to the other @Development .
If we aim to have update releases, there still be some mismatches/ambiguities about version names. Eg, OpenFOAM-v1806 as the main release has "v1806" for its version and expects a directory of "OpenFOAM-v1806". If we shipped a patched version sometime in the future - eg, "v1806.1915" for a version that was patched for week 15 in 2019 - we need to decide how to deal with this type of thing.
-
the version "v1806.1915" really should not be influencing how the etc files are being searched, since files that work for 1806, should also be found for the update version. At the moment, the value of WM_PROJECT_VERSION is used to determine where to search, so need to move directories or use symlinks to resolve this. The only constant value is the API value, which is defined in the wmake rules.
-
we have an over or under specification of the naming. If the version is "v1806.1915", the default expected directory name is then "OpenFOAM-v1806.1915". If we want to continue using the same directory location after updating a service pack, we must manually change things.
For addressing the first part (constant value). I think this means that we indeed need to be using the compile-time API value (eg, 1806) for the searching - in the foamEtcFile script and in the foamEtcFiles() routine. The value should be extracted from the corresponding wmake rule, since this is the only reliable value we have. To make life easier for consumers of this information, the OpenFOAM environment should also export this extracted value.
For the directory naming. I think we should ditch a lot of this stuff and replace it with the bash/csh sourcing magic instead. Rather than automatically obtaining the FOAM_INST_DIR, for setting the WM_PROJECT_INST_DIR, we should just use it to grab the WM_PROJECT_DIR directly. The values returned are from
pwd -L
, so they are absolute paths. Stripping off one directory level (with shell) to determine the installation directory probably makes much more sense. -
- Author Maintainer
@gsg001 - this is also packaging related #1050 (closed)
- Mark OLESEN mentioned in commit c26bb12f321f2fd0dcc956119d0db3fc3f38e640
mentioned in commit c26bb12f321f2fd0dcc956119d0db3fc3f38e640
- Mark OLESEN mentioned in commit 1cbacc7d2cf22857f79c3f547610144701533103
mentioned in commit 1cbacc7d2cf22857f79c3f547610144701533103
- Mark OLESEN mentioned in commit c3a62be4237f8b0192e0d41741fa2f1de4f9fba8
mentioned in commit c3a62be4237f8b0192e0d41741fa2f1de4f9fba8
- Mark OLESEN mentioned in merge request !222 (merged)
mentioned in merge request !222 (merged)
- Mark OLESEN mentioned in commit 3edc9b64e58f229a0da88c5d155b190f7224548b
mentioned in commit 3edc9b64e58f229a0da88c5d155b190f7224548b
- Mark OLESEN mentioned in commit 21fb3accbadac6c6fce8580fac24bc31b5b3945d
mentioned in commit 21fb3accbadac6c6fce8580fac24bc31b5b3945d
- Mark OLESEN mentioned in commit f17551e5445dc820fbc2578b113eb4a94a9f89af
mentioned in commit f17551e5445dc820fbc2578b113eb4a94a9f89af
- Mark OLESEN mentioned in commit 1179bfa6ebb44b29e6f7295b7c1384184c79ea28
mentioned in commit 1179bfa6ebb44b29e6f7295b7c1384184c79ea28
- Mark OLESEN mentioned in commit f21af7ac3bc402f6d74c3921cfb3e2c4210c52d4
mentioned in commit f21af7ac3bc402f6d74c3921cfb3e2c4210c52d4
- Mark OLESEN mentioned in commit 55b81cb018306a65e214b1d7cde93719a3ba9d7d
mentioned in commit 55b81cb018306a65e214b1d7cde93719a3ba9d7d
- Mark OLESEN mentioned in commit f308aa61745540968b2dfc993fda88460d6fafdc
mentioned in commit f308aa61745540968b2dfc993fda88460d6fafdc
- Admin mentioned in commit 7384152e9424052b8c24b0669e45d4d70899989a
mentioned in commit 7384152e9424052b8c24b0669e45d4d70899989a
By Andrew Heather on 2018-12-06T08:37:49 (imported from GitLab project)
- Mark OLESEN mentioned in commit 4db2fd782ca2b862eeda11630e813bf6b7570c09
mentioned in commit 4db2fd782ca2b862eeda11630e813bf6b7570c09
- Mark OLESEN closed
closed