let load_root_file rootpath =
let data = HExtlib.input_file rootpath in
let lines = Str.split (Str.regexp "\n") data in
- let clean s = Pcre.replace ~pat:"^ *" (Pcre.replace ~pat:" *$" s) in
+ let clean s =
+ Pcre.replace ~pat:"[ \t]+" ~templ:" "
+ (Pcre.replace ~pat:"^ *" (Pcre.replace ~pat:" *$" s))
+ in
List.map
(fun l ->
match Str.split (Str.regexp "=") l with
let local, remote =
List.partition (fun (_,_,froot,_) -> froot = Some root) todo
in
- let local = List.filter (is_not_ro opts) local in
- remote @ local
+ let local, skipped = List.partition (is_not_ro opts) local in
+ List.iter
+ (fun x ->
+ HLog.warn("Read only baseuri for: "^F.string_of_source_object(fst4 x)))
+ skipped;
+ remote @ local
in
if todo <> [] then
let compiled, failed =