Debian bug report logs - #1247, boring messages


Message sent to debian-devel@pixar.com:


Subject: Bug#1247: perl <...> globbing only works if (t)csh installed
Reply-To: Peter Tobias <tobias@et-inf.fho-emden.de>,         iwj10@cus.cam.ac.uk (Ian Jackson), debian-bugs@pixar.com
Resent-From: Ian Jackson <iwj10@cus.cam.ac.uk>
Resent-To: debian-devel@pixar.com
Resent-Date: Mon, 14 Aug 1995 01:48:04 GMT
Resent-Message-ID: <debian-bugs-handler.1247.08140136150@pixar.com>
Resent-Sender: iwj10@cus.cam.ac.uk
X-Debian-PR-Package: perl
X-Debian-PR-Keywords: 
Received: via spool for debian-bugs; Mon, 14 Aug 1995 01:48:04 GMT
Received: with rfc822 via encapsulated-mail; Mon, 14 Aug 1995 01:36:15 GMT
Received: from pixar.com by mongo.pixar.com with smtp
	(Smail3.1.28.1 #15) id m0shn8T-000Ds7C; Sun, 13 Aug 95 17:12 PDT
Received: from bootes.cus.cam.ac.uk by pixar.com with SMTP id AA10980
  (5.67b/IDA-1.5 for debian-bugs-pipe@mongo.pixar.com); Sun, 13 Aug 1995 17:12:02 -0700
Received: by bootes.cus.cam.ac.uk
	(Smail-3.1.29.0 #36) id m0shn8K-000C06C; Mon, 14 Aug 95 01:12 BST
Received: by chiark
	id <m0shcrp-0002ZZZ@chiark.al.cl.cam.ac.uk>
	(Debian /\oo/\ Smail3.1.29.1 #29.33); Sun, 13 Aug 95 14:14 BST
Message-Id: <m0shcrp-0002ZZZ@chiark.al.cl.cam.ac.uk>
Date: Sun, 13 Aug 95 14:14 BST
From: Ian Jackson <iwj10@cus.cam.ac.uk>
To: Debian bugs submission address <debian-bugs@pixar.com>

Package: perl
Version: 5.0001-3

As you can see from the transcript below, Perl's <...> globbing only
works if you have tcsh installed.

I surmise that this is related to the following info, from perlop(1):

       ...  Example:

           while (<*.c>) {
               chmod 0644, $_;
           }

       is equivalent to

           open(FOO, "echo *.c | tr -s ' \t\r\f' '\\012\\012\\012\\012'|");
           while (<FOO>) {
               chop;
               chmod 0644, $_;
           }

       In fact, it's currently implemented that way.  (Which
       means it will not work on filenames with spaces in them
       unless you have csh(1) on your machine.)

So, what is probably happening is that it is failing for users who
don't have tcsh *installed*, because the person who built Perl did
have csh installed and so Perl was configured to use it.

Clearly this is not acceptable.  However, a version of Perl whose
globbing doesn't work for filenames with spaces is also unacceptable
(and that's presumably what you'd get if you rebuilt Perl configured
to think that csh wasn't available).

Perl should be fixed to use the C library `glob' function - this will
also fix the other problems described in perlop(1):

       Because globbing invokes a shell, it's often faster to
       call readdir() yourself and just do your own grep() on the
       filenames.  Furthermore, due to its current implementation
       of using a shell, the glob() routine may get "Arg list too
       long" errors (unless you've installed tcsh(1L) as
       /bin/csh).

Thanks to Peter Tobias for spotting this problem and asking me about
it in private email.

Ian.

chiark:~/junk> dpkg -l '*csh*'
Desired=Unknown/Install/Remove/Purge
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required
||/ Name         Version   Rev  Description
+++-============-=========-====-===============================================
ii  tcsh              6.05 4    An enhanced version of the Berkeley C shell.
chiark:~/junk> perl -e '@x=<t*>; print "@x\n";'
t.c t.cc t.cc~ t.cpio t.c~ t.o t.old t.pl t.pl~ tar termcap test.ld touchdata trinity.wad.gz trn-to-addnewsgroup.pl trn-to-addnewsgroup.pl~ ts typescript tzu t~
chiark:~/junk> really dpkg --purge tcsh
(Reading database ... 15631 files and directories currently installed.)
Removing tcsh ...
Purging configuration files for tcsh ...
chiark:~/junk> perl -e '@x=<t*>; print "@x\n";'

chiark:~/junk> really dpkg --install /usr/src/debian-archive/binary/shells/tcsh-6.05-4.deb
Selecting previously deselected package tcsh.
(Reading database ... 15625 files and directories currently installed.)
Unpacking tcsh (from .../binary/shells/tcsh-6.05-4.deb) ...
Setting up tcsh ...

chiark:~/junk> perl -e '@x=<t*>; print "@x\n";'
t.c t.cc t.cc~ t.cpio t.c~ t.o t.old t.pl t.pl~ tar termcap test.ld touchdata trinity.wad.gz trn-to-addnewsgroup.pl trn-to-addnewsgroup.pl~ ts typescript tzu t~
chiark:~/junk> echo t*
t.c t.cc t.cc~ t.cpio t.c~ t.o t.old t.pl t.pl~ tar termcap test.ld touchdata trinity.wad.gz trn-to-addnewsgroup.pl trn-to-addnewsgroup.pl~ ts typescript tzu t~
chiark:~/junk>


Message sent:


From: iwj10@thor.cam.ac.uk (Ian Jackson)
To: Peter Tobias <tobias@et-inf.fho-emden.de>,         iwj10@cus.cam.ac.uk (Ian Jackson)
Subject: Bug#1247: Acknowledgement (was: perl <...> globbing only works if (t)csh installed)
In-Reply-To: <m0shcrp-0002ZZZ@chiark.al.cl.cam.ac.uk>
References: <m0shcrp-0002ZZZ@chiark.al.cl.cam.ac.uk>

Thank you for the problem report you have sent regarding Debian GNU/Linux.
This is an automatically generated reply, to let you know your message has
been received.  It is being forwarded to the developers' mailing list for
their attention; they will reply in due course.

If you wish to submit further information on your problem, please send
it to debian-bugs@pixar.com, but please ensure that the Subject
line of your message starts with "Bug#1247" or "Re: Bug#1247" so that
we can identify it as relating to the same problem.

Please do not reply to the address at the top of this message,
unless you wish to report a problem with the bug-tracking system.

Ian Jackson
(maintainer, debian-bugs)


Ian Jackson / iwj10@thor.cam.ac.uk, with the debian-bugs tracking mechanism
This page last modified 07:43:01 GMT Wed 01 Nov