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

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



tags 192113 patch
thanks

On Tue, May 06, 2003 at 08:16:13AM +0100, Colin Watson wrote:
> On Tue, May 06, 2003 at 07:33:50AM +0200, Jesus Climent wrote:
> > 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:
[...]
> 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.

Hi,

Any chance that this could be fixed? It pops up in quite a number of
postinsts, and is producing a few misdirected bug reports such as
#198039.

Here's a patch against the current 1.10 branch (the "stripping trailing
slash" message doesn't appear to have been merged to trunk):

Index: dpkg-statoverride.pl
===================================================================
RCS file: /cvs/dpkg/dpkg/scripts/dpkg-statoverride.pl,v
retrieving revision 1.15.6.1
diff -p -u -r1.15.6.1 dpkg-statoverride.pl
--- dpkg-statoverride.pl	15 Apr 2003 05:39:25 -0000	1.15.6.1
+++ dpkg-statoverride.pl	30 Jul 2003 22:34:39 -0000
@@ -98,7 +98,7 @@ if ($mode eq "add") {
 	(($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";
+	$file =~ s,/+$,, && print STDERR "dpkg-statoverride: stripping trailing /\n";
 
 	if (defined $owner{$file}) {
 		print STDERR "An override for \"$file\" already exists, ";
@@ -125,7 +125,7 @@ if ($mode eq "add") {
 } elsif ($mode eq "remove") {
 	@ARGV==1 || &badusage("--remove needs one arguments");
 	$file=$ARGV[0];
-	$file =~ s,/*$,, && print STDERR "stripping trailing /\n";
+	$file =~ s,/+$,, && print STDERR "dpkg-statoverride: stripping trailing /\n";
 	if (not defined $owner{$file}) {
 		print STDERR "No override present.\n";
 		exit(0) if ($doforce); 
@@ -144,7 +144,7 @@ if ($mode eq "add") {
 		s/\W/\\$&/g;
 		s/\\\?/./g;
 		s/\\\*/.*/g;
-		s,/*$,, && print STDERR "stripping trailing /\n";
+		s,/+$,, && print STDERR "dpkg-statoverride: stripping trailing /\n";
 		push(@list,"^$_\$");
 	}
 	$pat= join('|',@list);

Thanks,

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



Reply to: