From bc5f01196ebf181b20d43fefe23f7003a5d3aa7c Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Wed, 6 Jul 2016 14:01:16 +0100 Subject: [PATCH 6/7] build: --include-packagelist: Use supermin tmpdir. Fixes commit 535c2cfbf2c8e8cbe5f43dd9e9a0eea8eacb1bed. --- src/build.ml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/build.ml b/src/build.ml index e34ec5f..83a0d98 100644 --- a/src/build.ml +++ b/src/build.ml @@ -207,9 +207,9 @@ let rec build debug (* Create a temporary file for packagelist, if requested. *) let packagelist_file = if include_packagelist then ( - let filename, chan = Filename.open_temp_file "packagelist." "" in + let filename = tmpdir // "packagelist" in + let chan = open_out filename in List.iter (fprintf chan "%s\n") pretty_packages; - flush chan; close_out chan; Some filename ) else None in @@ -230,11 +230,6 @@ let rec build debug Ext2.build_ext2 debug basedir files modpath kernel_version appliance size packagelist_file; Ext2_initrd.build_initrd debug tmpdir modpath initrd - ); - - (match packagelist_file with - | None -> () - | Some filename -> Sys.remove filename ) and read_appliance debug basedir appliance = function -- 2.7.4