]> git.donarmstrong.com Git - debhelper.git/commitdiff
r1682: * dh_installinfo: escape '&' characters in INFO-DIR-SECTION when calling 4.2.9
authorjoey <joey>
Wed, 28 Apr 2004 18:13:35 +0000 (18:13 +0000)
committerjoey <joey>
Wed, 28 Apr 2004 18:13:35 +0000 (18:13 +0000)
     sed. Also support \1 etc for completeness. Closes: #246301

dh_installinfo

index 814c831b58cf1cd0a19c6c64a8929283d23e5f42..78dddc7bfc8cc8f08b05f5e8c841bf84e05ac38c 100755 (executable)
@@ -105,6 +105,8 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
                        
                        if ($section ne '') {
                                $section=~s:/:\\/:g; # allow / in section.
+                               $section=~s/\&/\\&/g; # escape sed specials
+                               $section=~s/(\\[0-9])/\\\\$1/g; # more sed specials
                                autoscript($package,"postinst","postinst-info",
                                        "s/#SECTION#/$section/g;s:#FILE#:$fn:");
                        }