tree checksum vpatch file split hunks

all signers: phf bvt

antecedents: vtools_tempfile_standalone_notmp vdiff_blockwise_read-2

press order:

vtools_genesisphf
vdiff_fixes_newline_gccphf
keccakphf
vdiff_keccakphf
vtools_fixes_bitrate_char_arrayphf
vtools_vpatchphf
vtools_fixes_static_tohexphf
vtools_vpatch_newlinephf
vtools_ksumphf
vtools_tempfile_standalone_notmpbvt phf
vdiff_blockwise_read-2bvt
vtools_fixes_rootdir_filesbvt

patch:

- 1F6A6754F578117A08BC3B4428801C6DBCFD04E5266DE39188DC9401ED1B2CF0D33D41A47FB37480CCAE92E3A5D4ADDE71B398F538A6D1E92EFFB23801B584D8
+ 85D3B17315823804D142FB61459960669D05122568F6D463E0252D48D9D9C12F4A6BB9B3E92072D2123E4E66A7A84359CFF24D7B6D1646972D6C844A0016E454
vtools/manifest
(9 . 3)(9 . 4)
5 543200 phf vtools_ksum Ksum standalone keccak hasher
6 547300 bvt vtools_tempfile_standalone_notmp Standalone temporary file generation code; creates temporary files in the vpatch work directory.
7 584341 bvt vdiff_blockwise_read Fix stack overflow in vdiff when hashing large files.
8 589066 bvt vtools_fixes_rootdir_files Fix creation of files in the vtree root. Fix handling of empty vpatches.
- 11C17FEDC3C0442C3CA93589A47F5FDC4B9AB3BAB4361A96CBFF4BBB15E031D44BFECEED59E5EA6942F552FCA67214C3FC9D956779F77B8A0E7432CA609F779F
+ C4FA36A0508048691EA823A57B90DE3BD895F10C36150FA990983AE3996EADCD1AC8A25E9D4ECECFC8B41AF9A0E7E29AC5382959BF7624FAD8185A350C2B82C5
vtools/src/vpatch.adb
(26 . 19)(26 . 15)
13 return S(S'First..S'First+Prefix'Length-1) = Prefix;
14 end;
15
16 function Path_Prefix(Pathname: String;
17 Suffix: Positive) return String is
18 function Directory_Name(Pathname: String) return String is
19 Pos: Natural := Pathname'Last;
20 begin
21 for I in 1..Suffix loop
22 Pos := Ada.Strings.Fixed.Index(Pathname, "/",
23 From => Pos,
24 Going => Ada.Strings.Backward);
25 if Pos = 0 then
26 return Pathname;
27 end if;
28 Pos := Pos - 1;
29 end loop;
30 Pos := Ada.Strings.Fixed.Index(Pathname, "/",
31 From => Pos,
32 Going => Ada.Strings.Backward);
33 if Pos = 0 then
34 return Dirs.Current_Directory;
35 end if;
36 return Pathname(Pathname'First .. Pos);
37 end;
38
(623 . 8)(619 . 8)
40 Close(In_F);
41 Dirs.Delete_File(To_F_Name);
42 else
43 if not Dirs.Exists(Path_Prefix(To_F_Name, 1)) then
44 Dirs.Create_Path(Path_Prefix(To_F_Name, 1));
45 if not Dirs.Exists(Directory_Name(To_F_Name)) then
46 Dirs.Create_Path(Directory_Name(To_F_Name));
47 end if;
48 end if;
49 case Op is
(651 . 6)(647 . 7)
51 begin
52 Read_Loop:
53 loop
54 exit Read_Loop when End_Of_File;
55 declare
56 S: String := Get_Line;
57 begin
(659 . 7)(656 . 6)
59 H: Header := Get_Header;
60 begin
61 Process_Hunks_For_Header(H);
62 exit Read_Loop when End_Of_File;
63 end;
64 else
65 Put_Line("Prelude: " & S);