[Pkg-ocaml-maint-commits] [SCM] pkglab packaging branch, master, updated. debian/1.4.2-4-26-g5501d5b
Ralf Treinen
treinen at free.fr
Wed Jan 13 20:33:35 UTC 2010
The following commit has been merged in the master branch:
commit a9abb2872479dfd47934fcdb27e1206a9e71ebc8
Author: Ralf Treinen <treinen at free.fr>
Date: Wed Jan 13 21:18:46 2010 +0100
remove tmp file on exit (JAAP!!!!! How could you!)
diff --git a/debian/changelog b/debian/changelog
index 04a9cf3..02adcea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+pkglab (1.4.2-7) unstable; urgency=low
+
+ * Remove temporary file on exit (closes: #565152).
+
+ -- Ralf Treinen <treinen at debian.org> Wed, 13 Jan 2010 21:18:19 +0100
+
pkglab (1.4.2-6) unstable; urgency=low
[ Ralf Treinen ]
diff --git a/distcheck/common.ml b/distcheck/common.ml
index 544c2cc..fb93499 100644
--- a/distcheck/common.ml
+++ b/distcheck/common.ml
@@ -30,6 +30,7 @@ let version_index = get_version_index db;;
let release_index = get_release_index db;;
let source_index = get_source_index db;;
let not_to_check = ref Package_set.empty;;
+let tmpfile = ref "";; (* temporary file for input *)
let add_source add_to_check s =
let merge x = if !quiet then
@@ -41,16 +42,19 @@ begin
let pkgs_old = Functions.packages db in
(let s2 = if s = "-" then
begin
- let (n, c) = Filename.open_temp_file "distcheck" (if !rpm_synthesis then "synthesis" else "") in
+ let (n, c) = Filename.open_temp_file "distcheck"
+ (if !rpm_synthesis then "synthesis" else "")
+ in
begin
- try
- while true
- do
- Printf.fprintf c "%s\n" (read_line ())
- done
- with End_of_file -> close_out c
- end;
- n
+ tmpfile := c;
+ try
+ while true
+ do
+ Printf.fprintf c "%s\n" (read_line ())
+ done
+ with End_of_file -> close_out c;
+ end;
+ n
end
else s in
match !dist_type with
@@ -317,3 +321,5 @@ let _ =
else 0 (* all checks successful *)
else 1 (* some package are not installable *)
);;
+
+if !tmpfile <> "" then Sys.remove !tmpfiley
--
pkglab packaging
More information about the Pkg-ocaml-maint-commits
mailing list