Commits

Anonymous committed 4debcdb Draft

.

Comments (0)

Files changed (1)

src/post_template.ml

 
       let cache_dir_files = get_cache_dir "files"
 
-      let get_sources pd ~dest =
+      let get_sources_no_cache pd ~dest s_kind =
         let pkg_name = pd.p_pkg_name in
-        let () = cachedbg "getting sources of %S" pkg_name in
-        let {s_kind; s_base_name = _; s_download; s_extract} = pd.p_source in
-        match s_kind with
-        | `No -> failwith "no sources for package %S" pkg_name
-        | (`File | `Dir | `Repo) as s_kind ->
-            let _into_cache =
-              false
-            in
+        let () = cachedbg "getting source of package %S without cache"
+          pkg_name
+        in
+        let {s_kind = _; s_base_name = _; s_download; s_extract} =
+          pd.p_source
+        in
             (* let () = assert_dir dest in *)
             let is_local_and_path =
               match s_download with
             in
               r
 
+
+      let get_sources pd ~dest =
+        let pkg_name = pd.p_pkg_name in
+        let () = cachedbg "getting sources of %S" pkg_name in
+        match pd.p_source.s_kind with
+        | `No -> failwith "no sources for package %S" pkg_name
+        | (`File | `Dir | `Repo) as s_kind ->
+            let _into_cache =
+              false
+            in
+              get_sources_no_cache pd ~dest s_kind
+
     end