linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Theodore Ts'o <tytso@mit.edu>
To: Benno Schulenberg <bensberg@justemail.net>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [2/4 v2] e2fsck: make a prompt message simpler and thus translatable
Date: Wed, 4 Jun 2014 10:42:39 -0400	[thread overview]
Message-ID: <20140604144239.GI27426@thunk.org> (raw)
In-Reply-To: <1401888336.22807.125078021.186DE367@webmail.messagingengine.com>

On Wed, Jun 04, 2014 at 03:25:36PM +0200, Benno Schulenberg wrote:
> 
> On Wed, Jun 4, 2014, at 14:56, Theodore Ts'o wrote:
> > On Wed, Jun 04, 2014 at 02:23:21PM +0200, Benno Schulenberg wrote:
> > > 
> > > Running 'make check' now, I see these messages along the way:
> > > 
> > > mktemp: too few X's in template `r_64bit_big_expand.XXXXXX.tmp'
> 
> This "too few X's" is misleading -- what it intends to say is that it
> sees zero X's in the final component of the name, "tmp".

In the posix specification, "component" has a specific meaning, and it
means the last part of a pathname.  For example the "basename" command
is described as removing all of the leading directory components.
NAME_LEN is defined to be the maximum length of a pathname component,
etc.

I don't think your reading of the word "component" is correct.

> > Hmm... what OS and if Linux, version of coreutils are you using?
> 
> Ubuntu Lucid, 2010.04, mktemp --version | head -1
> mktemp (GNU coreutils) 8.13

OK, interesting.  It seems to work just fine using coreutils 8.21
(Debian Testing).  And I just checked on one of my Debian Stable
machines, which is using coreutils 8.13-3.5, and it's working there.

% mktemp /tmp/r_64bit_big_expand.XXXXXX.tmp
/tmp/r_64bit_big_expand.QAOy36.tmp

... and I just tried it on a Ubuntu 12.04 machine, and it accepts it
too:

8% cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"
% mktemp -V
mktemp (GNU coreutils) 8.13
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jim Meyering and Eric Blake.
% mktemp /tmp/r_64bit_big_expand.XXXXXX.tmp     
/tmp/r_64bit_big_expand.6yNF5W.tmp


Hmm... I just checked on a Mac OSX machine, which is using a FreeBSD
userspace iirc, and its man page explicitly states that six X's must
be at the end of the pathname.  And while "mktemp /tmp/foo.XXXXXX.bar"
doesn't fail, it returns "/tmp/foo.XXXXXX.bar", and if
/tmp/foo.XXXXXX.bar already exists, only then will it fail with a
"File exists" error message.

So it looks like allowing the placement of the XXX characters in the
middle of the filename is a GNU coreutils extension, and it must have
been introduced very shortly after Ubuntu 10.04 snapshotted its
coreutils package from Debian.  And since most of our developers
aren't using something quite as antique as Ubuntu 10.04, and while we
do have someone doing test compiles on Mac OSX, the fact that mktemp
generally works there means that Andreas never saw any problems with
it.

					- Ted

  reply	other threads:[~2014-06-04 14:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-02 19:48 [PATCH 1/4] po: describe more precisely the %B expansion Benno Schulenberg
2014-06-02 19:48 ` [PATCH 2/4] e2fsck: make a prompt message translatable by not using fill-in words Benno Schulenberg
2014-06-02 23:40   ` Theodore Ts'o
2014-06-03 20:35     ` [2/4 v2] e2fsck: make a prompt message simpler and thus translatable Benno Schulenberg
2014-06-04  2:07       ` Theodore Ts'o
2014-06-04 12:23         ` Benno Schulenberg
2014-06-04 12:56           ` Theodore Ts'o
2014-06-04 13:25             ` Benno Schulenberg
2014-06-04 14:42               ` Theodore Ts'o [this message]
2014-06-04 15:38                 ` Benno Schulenberg
2014-06-04 16:03                   ` Theodore Ts'o
2014-06-02 19:48 ` [PATCH 3/4] e2fsck: make two comments match the messages Benno Schulenberg
2014-06-04  2:07   ` Theodore Ts'o
2014-06-02 19:48 ` [PATCH 4/4] e2fsck: sort the abbreviations better Benno Schulenberg
2014-06-04  2:07   ` Theodore Ts'o
2014-06-04  2:05 ` [PATCH 1/4] po: describe more precisely the %B expansion Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140604144239.GI27426@thunk.org \
    --to=tytso@mit.edu \
    --cc=bensberg@justemail.net \
    --cc=linux-ext4@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).