Re: mdate-sh borks on uid/gid containing a space

2007-03-29 Thread Stepan Kasal
Hello,

On Thu, Mar 29, 2007 at 12:40:12AM +0100, Dave Korn wrote:
 On 29 March 2007 00:26, Ralf Wildenhues wrote:
 http://thread.gmane.org/gmane.comp.sysutils.automake.patches/2730/focus=2740
  Eric's patch seems to indicate that line 92 needs changed, too.
  (I haven't tested any on w32.)
 
   I don't quite understand that myself; ISTM that having -n in $ls_command
 should do the job for both cases.

A wild guess:

Though the current situation is this (quoting Eric):

$ \ls -ld /
drwxrwx---+ 14 eblake Users 0 Feb  2 07:58 /
$ \ls -lLd doc/m4.texinfo
-rw-r--r-- 1 eblake Domain Users 221922 Mar  1 14:50 doc/m4.texinfo

it might be possible that even the user or group owner of / would
have a blank it its name.  (With Cygwin, one never knows.)

So it is safer to use -n with ls /, too.

Just guessing, I'm not a Cygwin user.

Stepan Kasal




Re: mdate-sh borks on uid/gid containing a space

2007-03-29 Thread Stepan Kasal
Hello again,

On Thu, Mar 29, 2007 at 04:12:11PM +0100, Dave Korn wrote:
 On 29 March 2007 15:38, Stepan Kasal wrote:
  On Thu, Mar 29, 2007 at 12:40:12AM +0100, Dave Korn wrote:
  On 29 March 2007 00:26, Ralf Wildenhues wrote:
  http://thread.gmane.org/gmane.comp.sysutils.automake.patches/2730/focus=2740
  Eric's patch seems to indicate that line 92 needs changed, too.
[...]
  So it is safer to use -n with ls /, too.
 
   Umm, yes, that's true, but not relevant; what I was pointing out is that the
 -n gets added to the $ls_command variable, so it would already be included in
 the command invoked on line 92, and if you take a second look at the patch,
 you'll notice that the change to line 92 isn't about adding -n, it's about
 taking away -l and -d.

I took a second look, and it did not help:

@@ -89,7 +93,7 @@
 # words should be skipped to get the date.

 # On HPUX /bin/sh, set interprets -rw-r--r-- as options, so the x below.
-set x`ls -l -d /`
+set x`$ls_command /`

 # Find which argument is the month.
 month=

Cheers,
Stepan




RE: mdate-sh borks on uid/gid containing a space

2007-03-29 Thread Dave Korn
On 29 March 2007 16:27, Stepan Kasal wrote:

 Hello again,
 
 On Thu, Mar 29, 2007 at 04:12:11PM +0100, Dave Korn wrote:
 On 29 March 2007 15:38, Stepan Kasal wrote:
 On Thu, Mar 29, 2007 at 12:40:12AM +0100, Dave Korn wrote:
 On 29 March 2007 00:26, Ralf Wildenhues wrote:

http://thread.gmane.org/gmane.comp.sysutils.automake.patches/2730/focus=2740
 Eric's patch seems to indicate that line 92 needs changed, too.
 [...]
 So it is safer to use -n with ls /, too.
 
   Umm, yes, that's true, but not relevant; what I was pointing out is that
 the -n gets added to the $ls_command variable, so it would already be
 included in the command invoked on line 92, and if you take a second look
 at the patch, you'll notice that the change to line 92 isn't about adding
 -n, it's about taking away -l and -d.
 
 I took a second look, and it did not help:
 
 @@ -89,7 +93,7 @@
  # words should be skipped to get the date.
 
  # On HPUX /bin/sh, set interprets -rw-r--r-- as options, so the x
 below.
 -set x`ls -l -d /`
 +set x`$ls_command /`

  Gah, I overlooked that the original version wasn't using ls_command in the
first place.


cheers,
  DaveK
-- 
Can't think of a witty .sigline today