[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#192113: ssh: the tar file contains trailing "/"s



reassign 192113 dpkg
retitle 192113 dpkg: dpkg-statoverride always says "stripping trailing /"
severity 192113 normal
thanks

On Tue, May 06, 2003 at 07:33:50AM +0200, Jesus Climent wrote:
> Package: ssh
> Version: 1:3.6.1p2-1
> Severity: minor
> 
> Setting up ssh (3.6.1p2-1) ...
> stripping trailing /
> stripping trailing /
> stripping trailing /

Actually, no, this has nothing to do with ssh's tar file. (If it did,
there wouldn't be much we could do about it anyway - better to keep a
pristine .orig.tar.gz, especially when there are detached GPG signatures
from upstream wandering around for it which people can verify.)

The fix for #184239 in dpkg was as follows:

diff -ru dpkg-1.10.9/scripts/dpkg-statoverride.pl dpkg-1.10.10/scripts/dpkg-statoverride.pl
--- dpkg-1.10.9/scripts/dpkg-statoverride.pl	2001-03-04 14:39:06.000000000 +0000
+++ dpkg-1.10.10/scripts/dpkg-statoverride.pl	2003-04-15 06:39:25.000000000 +0100
@@ -98,6 +98,7 @@
 	(($mode<0) or (oct($mode)>07777)) && &badusage("illegal mode $mode");
 	$file= $ARGV[3];
 	$file =~ m/\n/ && &badusage("file may not contain newlines");
+	$file =~ s,/*$,, && print STDERR "stripping trailing /\n";
 
 	if (defined $owner{$file}) {
 		print STDERR "An override for \"$file\" already exists, ";
@@ -124,6 +125,7 @@
 } elsif ($mode eq "remove") {
 	@ARGV==1 || &badusage("--remove needs one arguments");
 	$file=$ARGV[0];
+	$file =~ s,/*$,, && print STDERR "stripping trailing /\n";
 	if (not defined $owner{$file}) {
 		print STDERR "No override present.\n";
 		exit(0) if ($doforce); 
@@ -142,6 +144,7 @@
 		s/\W/\\$&/g;
 		s/\\\?/./g;
 		s/\\\*/.*/g;
+		s,/*$,, && print STDERR "stripping trailing /\n";
 		push(@list,"^$_\$");
 	}
 	$pat= join('|',@list);

But s,/*$,, always matches! That should be s,/+$,, on all three
occasions.

Also, ideally the message printed to STDERR would begin with
"dpkg-statoverride: " so that people know where it comes from and what
it might mean. It's printed even on --list, which is used in maintainer
scripts.

Cheers,

-- 
Colin Watson                                  [cjwatson@flatline.org.uk]



Reply to: