do not require --thornlist for build --reconfig

Issue #1438 closed
Roland Haas created an issue

The attached patch removes the requirement to provide a new thornlist when doing a sim build --reconfig . Since the typical reason (at least this is the only case I encountered this) for this is that the Cactus config changed (and the Cactus build system wants a make sim-reconfig) one usually does not want to change the thornlist at all.

Keyword:

Comments (8)

  1. Erik Schnetter
    • removed comment

    I do not understand this patch. Doesn't the existing test check whether a file Cactus/config/*/ThornList exists? Without such a thorn list, the build would fail, wouldn't it?

  2. Roland Haas reporter
    • removed comment

    Sigh, lost my carefully typed up summary. Here's the shorter one:

    The current code checks whether a configs/*/ThornList file exists and stores the result of this check hasStoredThornList however it then forces needThornList to be true for --rebuilds. Hence GetThornList requires an --thornlist option either on the command line or in the machine db. Ie.

    sim build
    

    will use the stored thornlist but

    sim build --rebuild
    

    will not and requires

    sim build --rebuild --thornlist configs/sim/ThornList
    

    I am not sure if rebuild will use configs/sim/OptionList or the option list from the machine db (I suspect the later). So the current behaviour is consistent in that --rebuild behaves as if a new configuration was build but it does not match well with how simfactory is actually used and what causes --rebuilds to be required (mostly changes that do not require a new ThornList).

  3. Erik Schnetter
    • removed comment

    Instead of forcing needThornList to false, would it make more sense to not force it to true earlier on? I'm worried about the case where the user deleted ThornList, or where there is an incomplete configuration without ThornList.

  4. Roland Haas reporter
    • removed comment

    I am not sure I follow, sorry. The proposed code does not force needThornList to be false, it sets it to "not haveStoreThornList". So a --thornlist argument is required for build whenever there is no stored ThornList.

    I was not sure what the proposed would do when the ThornList file was missing. Testing this (new code) in a configuration where I first deleted configs/*/ThornList has simfactory abort with:

    Error: No thornlist supplied.  Use --thornlist <thornlist> on the command line or set thornlist = <thornlist> in the [default] section of defs.local.ini.
    Aborting Simfactory.
    

    So the change in behaviour occurs only if there is a thornlist specified in the mdb, which has been updated. Then for a configuration where configs//ThornList exists and where --thornlist was not used on the command line, the old code would have updated configs//ThornList while the new code would use configs/*/ThornList without updating it. It can be argued though that ThornList does not "belong" to simfactory since it's use is defined by the underlying Cactus build system, while OptionList is simfactory's equivalent of config-info. This exposes knowledge of the underlying build system to the user.

  5. Log in to comment