GNU bug report logs - #32126
call-with-temporary-directory rarely cleans up after itself

Previous Next

Package: guix;

Reported by: Leo Famulari <leo <at> famulari.name>

Date: Wed, 11 Jul 2018 19:00:02 UTC

Severity: normal

Done: Leo Famulari <leo <at> famulari.name>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leo Famulari <leo <at> famulari.name>
Subject: bug#32126: closed (Re: bug#32126: call-with-temporary-directory
 rarely cleans up after itself)
Date: Fri, 13 Jul 2018 21:35:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#32126: call-with-temporary-directory rarely cleans up after itself

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 32126 <at> debbugs.gnu.org.

-- 
32126: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=32126
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Leo Famulari <leo <at> famulari.name>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 32126-done <at> debbugs.gnu.org
Subject: Re: bug#32126: call-with-temporary-directory rarely cleans up after
 itself
Date: Fri, 13 Jul 2018 17:34:30 -0400
[Message part 3 (text/plain, inline)]
On Thu, Jul 12, 2018 at 05:37:18PM +0200, Ludovic Courtès wrote:
> Hi Leo,
> 
> Leo Famulari <leo <at> famulari.name> skribis:
> 
> > Should we alter the call-with-temporary-directory procedure to use
> > ((guix build utils) delete-file-recursively)?
> 
> Yes, definitely.  Note that you can alter (guix utils) without fear of a
> full rebuild, so you can go ahead and do that in ‘master’.

Great, pushed as 27f7cbc91d1963118e44b14d04fcc669c9618176.
[signature.asc (application/pgp-signature, inline)]
[Message part 5 (message/rfc822, inline)]
From: Leo Famulari <leo <at> famulari.name>
To: bug-guix <at> gnu.org
Subject: call-with-temporary-directory rarely cleans up after itself
Date: Wed, 11 Jul 2018 14:59:37 -0400
[Message part 6 (text/plain, inline)]
While testing something, I noticed that temporary directories created
with ((guix utils) call-with-temporary-directory) were not being
deleted.

This procedure is documented to delete the directories after execution:

"Call PROC with a name of a temporary directory; close the directory and
delete it when leaving the dynamic extent of this call."

It uses rmdir, which is documented as follows: "Remove the existing
directory named by path. The directory must be empty for this to
succeed." [0]

I think this is a case where one expects the directory to be deleted as
with `rm -rf`, regardless of whether or not it is empty.

Should we alter the call-with-temporary-directory procedure to use
((guix build utils) delete-file-recursively)?

[0]
https://www.gnu.org/software/guile/manual/html_node/File-System.html#index-rmdir
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 6 years and 311 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.