Sébastien Gendre <[email protected]> writes:

>>> Its possible that adding a phase like the following example to your
>>> package can provide an easy fix.
>>>
>>> (add-before 'build 'set-home
>>>   (lambda _
>>>     (setenv "HOME" "/tmp")))
>>>
>>
>> add-before 'configure might be more appropriate
>
> I have tried it, for the phases build and configure: Same result. It still
> try to create "/.jmri/lib".

I could reproduce that, it seems from
<https://ant.apache.org/manual/Tasks/property.html> that the user.home
property is actually fetched from the JVM.

>[…] since the user.home property is defined by JVM to be your home
>directory. Where the user.home property resolves to in the file system
>depends on the operating system version and the JVM implementation. On
>Unix based systems, this will map to the user's home directory. On
>modern Windows variants, this will most likely resolve to the user's
>directory in the Documents and Settings or Users folder. Older Windows
>variants such as Windows 98/ME are less predictable, as are other
>operating system/JVM combinations.

Anyways, another option is to replace user.home directly in build.xml:

(add-after 'unpack 'set-home
  (lambda _
    (substitute* "build.xml"
      (("user\\.home")
       "/tmp"))))

You could also change the home value returned by the JVM, but I don’t
know how.

Good day,
Noé

Attachment: signature.asc
Description: PGP signature

Reply via email to