On 02/06/2015 10:51 PM, Petr Skočík wrote:
Is there a way to do this?
You don't need to do anything - it just works.
Currently, even as little as opening the file for writing ('r+'), not
making any changes, closing, and restoring timestamps does trigger a
complete rebuild.
I'm on Linux Mint 17 (~Ubuntu 14.04), Ext4 if that makes any difference.
I really don't know why you try to restore timestamps... Try this:
Konsole output
[freddie@INFERNUS test]$ tup init
.tup repository initialized.
[freddie@INFERNUS test]$ echo ": |> echo text > %o |> file1.txt" >
Tupfile
[freddie@INFERNUS test]$ tup
[ tup ] [0.100s] Scanning filesystem...
[tup ] [0.184s] Reading in new environment variables...
[tup ] [0.320s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.323s] No files to delete.
[tup ] [0.323s] Generating .gitignore files...
[tup] [0.437s] Executing Commands...
1) [0.002s] echo text > file1.txt
[] 100%
[tup ] [0.538s] Updated.
[freddie@INFERNUS test]$ touch Tupfile
[freddie@INFERNUS test]$ cat Tupfile
: |> echo text > %o |> file1.txt
[freddie@INFERNUS test]$ echo ": |> echo text > %o |> file1.txt" >
Tupfile
[freddie@INFERNUS test]$ tup
[ tup ] [0.000s] Scanning filesystem...
[tup ] [0.099s] Reading in new environment variables...
[tup ] [0.099s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.103s] No files to delete.
[tup ] [0.103s] Generating .gitignore files...
[tup] [0.199s] No commands to execute.
[tup ] [0.300s] Updated.
[freddie@INFERNUS test]$ rm Tupfile
[freddie@INFERNUS test]$ echo ": |> echo text > %o |> file1.txt" >
Tupfile
[freddie@INFERNUS test]$ tup
[ tup ] [0.000s] Scanning filesystem...
[tup ] [0.092s] Reading in new environment variables...
[tup ] [0.092s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.096s] No files to delete.
[tup ] [0.096s] Generating .gitignore files...
[tup] [0.186s] No commands to execute.
[tup ] [0.311s] Updated.
[freddie@INFERNUS test]$ echo ": |> echo another text > %o |>
file2.txt" >> Tupfile
[freddie@INFERNUS test]$ tup
[ tup ] [0.000s] Scanning filesystem...
[tup ] [0.130s] Reading in new environment variables...
[tup ] [0.131s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.136s] No files to delete.
[tup ] [0.136s] Generating .gitignore files...
[tup] [0.223s] Executing Commands...
1) [0.002s] echo another text > file2.txt
[] 100%
[tup ] [0.318s] Updated.
[freddie@INFERNUS test]$ echo ": |> echo third text > %o |> file3.txt"
>> Tupfile
[freddie@INFERNUS test]$ tup
[ tup ] [0.000s] Scanning filesystem...
[tup ] [0.085s] Reading in new environment variables...
[tup ] [0.085s] Parsing Tupfiles...
1) [0.001s] .
[] 100%
[tup ] [0.090s] No files to delete.
[tup ] [0.090s] Generating .gitignore files...
[tup] [0.177s] Executing Commands...
1) [0.002s] echo third text > file3.txt
[] 100%
[tup ] [0.261s] Updated.
[freddie@INFERNUS test]$
As you see I can open, read, overwrite the Tupfile and nothing gets
rebuilt. I can add new targets and nothing gets rebuilt. I could now
open the file and maybe change the order of commands - nothing would be
rebuilt too.
Regards,
FCh
--
--
tup-users mailing list
email: [email protected]
unsubscribe: [email protected]
options: http://groups.google.com/group/tup-users?hl=en
---
You received this message because you are subscribed to the Google Groups "tup-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.