- changed status to open
- removed comment
First dependencies for optional capabilities is ignored
The first optional dependency for a thorn is not taken into account when deciding the build order for capabilities. The reason is a missing space, which accidentally concatenates the names for the last required and the first optional dependency. The patch below corrects this.
$ svn diff Index: sbin/CreateConfigurationBindings.pl
--- sbin/CreateConfigurationBindings.pl (revision 4825) +++ sbin/CreateConfigurationBindings.pl (working copy) @@ -81,7 +81,7 @@ { if ($providedcaps{$optionalcap}) { - $cfg->{"\U$thorn\E REQUIRES"} .= "$optionalcap "; + $cfg->{"\U$thorn\E REQUIRES"} .= " $optionalcap"; } } }
Keyword:
Comments (9)
-
reporter -
reporter -
- removed comment
Please apply the first patch. The second also looks ok to me, but please only commit once an additional maintainer gave its ok.
-
- changed milestone to ET_2012_11
- removed comment
-
repo owner - removed comment
While we are at fixing capabilities: cctk.h does not include cctk_Capabilities in its FCODE section but only in CCODE. This makes the Capabilities invisible to Fortran thorns. Attached please find a patch to fix this.
The patch almost works for me but I had to move the code block further up before the check that all REQUIRES are satisfied since the verification loop set up the thorn dependencies as well. I attach an updated patch.
Other than that: ok to apply the updated second of the two patches.
-
reporter - changed status to resolved
- removed comment
Applied.
-
repo owner - removed comment
I think we now have too much code applied. I had intended optional.patch to be a replacement for optional.diff (but had gotten the file name wrong so trac did not generate a optional.2.diff), not an addition. The second copy of the "Turn optional capabilities..." seems unnecessary. Ok to remove it (and leave only the first one in ConfigurationParser.pl, the one before "verify that all required capabilities are there in the ThornList"?
-
reporter - removed comment
Sorry about the misunderstanding. Please correct.
-
repo owner - removed comment
Done in revision 4837 of the flesh. Sorry for the confusion.
- Log in to comment
There exists a second problem that makes all optional dependencies be ignored. There is code that unifies optional with required capabilities (for those optional capabilities that are provided), but this code is executed too late.
The attached patch likely corrects this situation. I'm unsure whether to apply it before the release.