Subject: Re: bug#50873: [PATCH 0/5] Fixes to ‘guix homeimport’

From: Ludovic Courtès <[email-masked]>
Date: Sat, 30 Oct 2021 16:17:02 +0200

Hi,

Xinglu Chen <[email-masked]> skribis:

> On Mon, Oct 11 2021, Oleg Pykhalov wrote:
>
>> Hi,
>>
>> Xinglu Chen <[email-masked]> writes:
>>
>> […]
>>
>>> +;; Helpers for checking and generating home environments.
>>> +
>>> +(%destination-directory "/tmp/guix-config")
>>> +(mkdir-p (%destination-directory))
>>> +
>>> +(define %temporary-home-directory "/tmp/guix-home-import-test")
>>
>> Better use temporary directory like in tests/opam.scm.
>>
>> --8<---------------cut here---------------start------------->8---
>> (define-module ...
>>   #:use-module ((guix build syscalls) #:select (mkdtemp!))
>>   ...)
>>
>> (mkdtemp! "/tmp/guix-home-import-test.XXXXXX")
>> --8<---------------cut here---------------end--------------->8---
>
> Good idea.  Out of curiosity: is there any difference between ‘mkdtemp!’
> and ‘mkdtemp’ that’s part of Guile?

‘mkdtemp’ is new in Guile 3.0.6 but Guix can be built with an older
version.

Ludo’.