Received: (at maintonly) by bugs.debian.org; 4 Mar 1997 18:20:58 +0000 Received: (qmail 14446 invoked from network); 4 Mar 1997 18:20:56 -0000 Received: from mercury.ukc.ac.uk (@129.12.21.10) by master.debian.org with SMTP; 4 Mar 1997 18:20:54 -0000 Received: from elm.ukc.ac.uk by mercury.ukc.ac.uk with SMTP (PP); Tue, 4 Mar 1997 18:12:01 +0000 Received: from localhost by elm.ukc.ac.uk (SMI-8.6/UKC-2.14) id SAA21295; Tue, 4 Mar 1997 18:11:33 GMT Message-Id: <199703041811.SAA21295@elm.ukc.ac.uk> To: maintonly@bugs.debian.org Subject: Bug with passive mode selection (also avail-list update) Date: Tue, 04 Mar 1997 18:11:33 +0000 From: Charles Briscoe-Smith Package: dpkg-ftp Version: 1.4.8 (This contributes to bug #6210; I don't know how to contribute directly to that bug, though.) Kazuhiro Sasayama wrote: > During the update of available list by `dpkg-ftp', it asks "Do you > want to clear available list [y]," but does not clear it even if the > answer is y or just an enter. > > The test in /usr/lib/dpkg/methods/ftp/update ($ans =~ /^Yy/) is > wrong. It needs [] around Yy as /^[Yy]/. I just came across this, too. While fixing it, I noticed that the same error was in the code for selecting whether passive mode is used. Here are my patches: --- /usr/lib/dpkg/methods/ftp/update.orig Tue Mar 4 17:35:32 1997 +++ /usr/lib/dpkg/methods/ftp/update Tue Mar 4 18:07:59 1997 @@ -120,7 +120,7 @@ print "Do you want to clear available list [y]: "; $ans=; chomp $ans; - if($ans =~ /^Yy/) { + if($ans eq "" or $ans =~ /^[Yy]/) { if(system("dpkg", "--clear-avail")) { print "dpkg --clear-avail failed."; die "error"; --- /usr/lib/dpkg/methods/ftp/setup.orig Tue Mar 4 17:36:37 1997 +++ /usr/lib/dpkg/methods/ftp/setup Tue Mar 4 18:05:23 1997 @@ -71,7 +71,7 @@ $ans=; chomp $ans; if($ans ne "") { - if($ans =~ /^Yy/) { + if($ans =~ /^[Yy]/) { $::passive=1; } else { $::passive=0; Thanks, --Charles