#1954: GetComponents modifies its passed in thornlist file ---------------------------+------------------------------------------------ Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: GetComponents | Version: development version Keywords: | ---------------------------+------------------------------------------------ It seems to add
{{{ # This file was automatically generated using the GetComponents script. }}}
It should not do this.
#1954: GetComponents modifies its passed in thornlist file ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: GetComponents | Version: development version Resolution: | Keywords: ----------------------------+----------------------------------------------- Description changed by rhaas:
Old description:
It seems to add
{{{ # This file was automatically generated using the GetComponents script. }}}
It should not do this.
New description:
It seems to add
{{{ # This file was automatically generated using the GetComponents script. }}}
even if the file passed in is a file on the local file system and a URL on the network.
It should not do this.
--
#1954: GetComponents modifies its passed in thornlist file ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: GetComponents | Version: development version Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by knarf):
The main reason this is there is that GetComponents understands includes in thornlists, and those could very well be in a local file or downloaded. Another possibility is giving GetComponents multiple targets to work on - which will concatenate the thornlists into one. In order to remove that comment, one would need to make sure none of these things actually happened.
#1954: GetComponents modifies its passed in thornlist file ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: GetComponents | Version: development version Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by rhaas):
Well, this is of course my personal preference, but I think it should just never modify its inputs. It already writes a .crl_components file and I would think that is sufficient.
#1954: GetComponents modifies its passed in thornlist file ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: GetComponents | Version: development version Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by knarf):
Oh, it shouldn't modify it's inputs. It reads a file and, if specified in the thornlist itself, writes a new list to the filename that was specified. Those are usually not the same files - although they could be I suppose. But then it was the user specifying input and output file being the same, wasn't it?
#1954: GetComponents modifies its passed in thornlist file ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: GetComponents | Version: development version Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by knarf):
Replying to [comment:4 knarf]:
Oh, it shouldn't modify it's inputs. It reads a file and, if specified
in the thornlist itself, writes a new list to the filename that was specified. Those are usually not the same files - although they could be I suppose. But then it was the user specifying input and output file being the same, wasn't it?
To give an example: {{{ ./repos/CRL/GetComponents ./manifest/einsteintoolkit.th }}} would (should), given a standard ET thornlist, read ./manifest/einsteintoolkit.th and write ./thornlists/einsteintoolkit.th . Do you see something else?
#1954: GetComponents modifies its passed in thornlist file ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: new Priority: minor | Milestone: Component: GetComponents | Version: development version Resolution: | Keywords: ----------------------------+-----------------------------------------------
Comment (by rhaas):
Ah, let me see. I *was* modifying the file I had passed on the command line, however *that* file (a copy of einsteintoolkit.th in thornlists) contained
{{{ !DEFINE COMPONENTLIST_TARGET = $ROOT/thornlists/ }}}
which I guess causes GetComponents to overwrite its input when used as
{{{ bin/GetComponents --root . thornlists/bnscomparison.th }}}
I would say it behaves as expected, I just did not know it was that powerful. It may require documentation. I think this ticket can be closed as "wontfix" since it does what it is supposed to do.
#1954: GetComponents modifies its passed in thornlist file ----------------------------+----------------------------------------------- Reporter: rhaas | Owner: Type: defect | Status: closed Priority: minor | Milestone: Component: GetComponents | Version: development version Resolution: wontfix | Keywords: ----------------------------+----------------------------------------------- Changes (by rhaas):
* status: new => closed * resolution: => wontfix
Comment:
User error: I had not realized that the thornlist itself was instructing GetComponents to write out a parsed version (and the path happened to be the original path of the file name).
trac@lists.einsteintoolkit.org