On Jun 18, 2007, at 10:37 AM, Juho Snellman wrote:
> "Scott L. Burson" <Scott@...> writes:
>> () The worst was that my `defsystem' form, in the `.asd' file, was
>> written in such a way as to generate two `asdf:missing-dependency'
>> signals for the same subsystem, and a bug in `asdf-install:install'
>> caused the subsystem's package file to be downloaded twice, wherein
>> the `open' call failed the second time with a "file exists" error.
>> (I was able to work around this by rewriting my `defsystem' form to
>> use `:serial t', but it still seemed worth fixing.)
> I'm not sure I like the fix for this part. Now the package is not
> downloaded at all if the temporary file exists before
> ASDF-INSTALL:INSTALL is called, but instead the old file is used
> unconditionally. Which could lead to hard to debug problems if the old
> file is corrupt in some way. How about the attached patch instead?
Well, all the temporary files are deleted by an `unwind-protect'
cleanup form at the bottom of `install'. But yeah, I agree it's a
little cleaner to look in `*temporary-files*'.
Also, on second thought I wasn't thrilled with the way I had used
`mapcan' -- I prefer it to be immediately evident from the lambda
expression which is the first argument to `mapcan' that the lists
being concatenated are freshly consed (and thus can be safely
concatenated). Since that wasn't the case (they are freshly consed,
but you have to look at `install-package' to see that), I should have
used `(reduce #'append (mapcar ...))' instead.
I am one of those people who have always detested `loop', so even
though I generally try, when editing someone else's code, to conform
to their style, I didn't know how to make the required change using
`loop' (and didn't care to take the time to figure it out, though I
tried briefly). This is all a long-winded way of saying it's
probably just as well you did it with `loop', even though I don't
care for it personally.
Anyway, thanks for looking into this, and sorry I was a little grumpy
the other day.