Hi,

Ming Hua wrote:
When running "bts cache" to update the cache (I've done the cacheing
quite a few times before), I got this error with exit code 17:
$ bts cache
Downloading
http://bugs.debian.org/[EMAIL PROTECTED] ...
(cached new version) [...]
Downloading http://bugs.debian.org/434180 ... mkdir 434180/17-1: File
exists at /usr/bin/bts line 2430
[...]
I don't really know why it wants to overwrite a file with a directory.

This looks like a side-effect of fixing #460850.

bts stores message "parts" (as identified by the BTS) in the cache as $bug/$message-$part. Named attachments, as a special case, are stored as $bug/$message-$part/$filename, both to preserve the filename and to avoid the possibility of name clashes.

Unfortunately, at some point the code that detects attachments got out of sync with the HTML that the BTS was generating to represent them, so they were being treated the same as other message parts. (This must have occured after devscripts 2.10.5, as the relevant code was updated then for another BTS HTML change).

As far as I can see, there are a few options for fixing this:

a) bail out with a more useful error message
b) skip the file with a useful warning message
c) download the file using the existing filename, again with a useful warning message
d) delete the existing file and continue with the mkdir and download

I'm leaning towards either b or c (with option d my least preferred) but open to opinion.

Regards,

Adam



--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to