Subject: Re: bug#14728: filenames starting with a dash confuse automake

From: Stefano Lattarini <[email-masked]>
Date: Sat, 13 Jul 2013 23:38:07 +0100

severity 14728 minor
stop

Hello, sorry for the delay.

On 06/28/2013 07:22 PM, Josh Triplett wrote:
> On Thu, Jun 27, 2013 at 09:55:53AM +0200, Stefano Lattarini wrote:
>> On 06/27/2013 06:37 AM, Zbigniew Jędrzejewski-Szmek wrote:
>>> Hi,
>>> I encountered this in systemd, which recently added a file with 
>>> a dash in the name [1].
>>>
>> I fear this falls in the category "Doctor, it hurts when I do that
>> -- Don't do that, then" :-)
>>
>> To elaborate, on Unix systems, having filenames starting with a
>> dash has always been very problematic, and generally a terrible
>> idea.  Do you have a very, *very* good reason to have such a file?
> 
> One obvious reason: as part of a test suite for just such a problem.
>
I'm not sure this qualifies as a "very good reason", sorry.  Anyone
on Unix using system files whose name start with a dash deserves to
suffer a bit ;-)

>>> Basically, various commands like install and rm are called
>>> without guarding the file list with --,
>>>
>> That's because such usage might be unportable; well, it surely was
>> in the olden days, but I'm not sure whether that is still relevant
>> on today's system.  Still, I'm not comfortable changing the old
>> assumption and risking regressions for the users of oldish or
>> proprietary systems.
> 
> Putting -- before the file list might not be portable, but prefixing
> filenames starting with a - with ./ seems completely portable.  Would
> that work?
>
Yes, but it might complicate or slow down the code, and I think it's
not really worth spending time on it.  I won't refuse a patch in this
direction though, *if* it doesn't complicate or slow-down the code.
Otherwise, I will close this bug as "wontfix" sometime in the nearish
future.

Thanks,
  Stefano