[PATCH] readable temp files

v4hn me at v4hn.de
Sun Mar 4 19:20:06 CET 2012


Hey everyone,

Zbigniews patches reminded me of a small tweak I did some time ago:

You ever wondered what information of the build process is stored
in which /tmp file? Something like lunar.lin.27767..ccOsV37CAJ 
or lunar.lin.27767.octave.2p6n3jJ7ya doesn't give away too much.
I'm not sure whether or not this was intended, but the fourth
slot of the filename is set to the current module, instead
of the _purpose_ that is given as a parameter(and that
purpose seems to include the current module whenever there is one).

The patch results in filenames like
lunar.lin.27767.depends.cache.ccOsV37CAJ or
lunar.lin.27767.octave.compile-log.2p6n3jJ7ya


v4hn
-------------- next part --------------
--- /var/lib/lunar/functions/temp.lunar	2011-06-28 07:48:24.000000000 +0200
+++ /var/lib/lunar/functions/temp.lunar	2012-03-04 18:42:09.999699206 +0100
@@ -20,7 +20,7 @@
 temp_create() {
   local TMPFILE
   debug_msg "temp_create ($@)"
-  TMPFILE=$MODULE
+  TMPFILE="$@"
   if TMPFILE=$(mktemp -p "$TMPDIR" -t lunar.`basename $0`.$$.$TMPFILE.XXXXXXXXXX ) ; then
     echo $TMPFILE
   else
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://foo-projects.org/pipermail/lunar-dev/attachments/20120304/0bb6cd88/attachment.bin>


More information about the Lunar-dev mailing list