[Asdf-devel] Need to do uiop:setup-temporary-directory in image built with uiop

Robert P. Goldman rpgoldman at sift.info
Tue Jun 17 16:30:25 UTC 2014

Dave Cooper wrote:
> Dear ASDF maintainer(s),
> I just noticed that it is necessary to do 
>   (uiop:setup-temporary-directory)
> in an image which has UIOP built into it, when that image is run on a
> different machine or under a different user account (at least on
> Windows). Otherwise, the function
>   (uiop:temporary-directory)
> returns whatever was the temporary directory as computed in the build
> environment (in my case it's in the "dcooper8" home directory.
> So am I correct that it's pretty much a requirement to call 
>   (uiop:setup-temporary-directory)
> upon startup of an image which contains uiop built into it? 
> Are there any other functions which should be called to initialize uiop?
> Is there a way to achieve this at image dump time instead of startup
> time (e.g. clearing the temporary directory entirely so it will be
> forced to reset when next demanded in the built image)? 
> If I'm missing something from the documentation on this please feel free
> to slap me in that direction.

I am looking at uiop/image.lisp and it looks like it should do what you
want out of the box.  At the very bottom of the file I see a call to
REGISTER-IMAGE-RESTORE-HOOK, and one of the elements of that list is

So it seems like either this call is not happening properly or there's a
bug in setup-temporary-directory.  Is there any chance you could have
overwritten UIOP's restore hook?

Would it be possible for you to trace RESTORE-IMAGE and
SETUP-TEMPORARY-DIRECTORY to see what's happening? I confess to not
knowing whether TRACE will persist over image dumping....


More information about the asdf-devel mailing list