Opened 17 years ago

Closed 12 years ago

#91 closed defect (fixed)

ps.map doesn't remove .tmp files when it is done

Reported by: hamish Owned by: grass-dev@…
Priority: minor Milestone: 6.4.0
Component: Ps.map Version: unspecified
Keywords: ps.map Cc:
CPU: Unspecified Platform: Unspecified

Description

this was bug # 492 in the old gforge system. moving it here. http://wald.intevation.org/tracker/index.php?func=detail&aid=492&group_id=21&atid=204

Hamish


Hi,

ps.map creates some .tmp files, e.g. when the 'text' or 'rectangle' instructions are used but they aren't removed when the module finishes. For scripted ps.map jobs / trial+error iterations you end up with hundreds of tiny files in the .tmp dir until you exit the GRASS session.

They are human readable and useful for debugging, so it would be nice to only remove them if the g.gisenv DEBUG level was below some threshold.

Hamish

Attachments (1)

psmap_unlink.diff (851 bytes ) - added by neteler 17 years ago.
fix proposal

Download all attachments as: .zip

Change History (8)

by neteler, 17 years ago

Attachment: psmap_unlink.diff added

fix proposal

comment:1 by neteler, 17 years ago

Hamish,

please test the attached fix.

Markus

comment:2 by neteler, 16 years ago

Any objections that I apply attached patch?

Markus

in reply to:  2 comment:3 by hamish, 16 years ago

Keywords: ps.map added

Replying to neteler:

Any objections that I apply attached patch?

There is a problem with the patch-

If the ps.map instructions include both masked and unmasked plotting commands, the plot command file will be removed after the first pass and the unmasked items will not be drawn because the file is missing.

Better to move the unlink to a cleanup section at the very end of ps_map.c? or main.c, it already does unlink (ps_mask_file); just before exit().

also it would be nice to observe this part of the wish: "They are human readable and useful for debugging, so it would be nice to only remove them if the g.gisenv DEBUG level was below some threshold."

Hamish

comment:4 by hamish, 16 years ago

I have applied the fix for all but the session file in r31755, r31756. Not to sure about how to handle the external variable.

Hamish

comment:5 by hamish, 16 years ago

Component: defaultps.map
CPU: Unspecified
Platform: Unspecified

comment:6 by neteler, 12 years ago

Milestone: 6.4.06.4.4

Hamish, please backport to relbranch if appropriate.

comment:7 by hamish, 12 years ago

Milestone: 6.4.46.4.0
Resolution: fixed
Status: newclosed

it didn't need a backport as it was done before relbr64 was split off.

closing bug.

Note: See TracTickets for help on using tickets.