]> git.donarmstrong.com Git - debhelper.git/commitdiff
Revert avoid expanding shell metacharacters in sed call in autoscript(). It breaks...
authorJoey Hess <joey@kitenet.net>
Thu, 22 Mar 2012 21:37:54 +0000 (17:37 -0400)
committerJoey Hess <joey@kitenet.net>
Thu, 22 Mar 2012 21:37:54 +0000 (17:37 -0400)
Debian/Debhelper/Dh_Lib.pm
debian/changelog
doc/PROGRAMMING

index 7073aa4ec92c29cea395a439a2af3c55d04a3201..e0a274a4dd78192fb7893a249a85930cf094a2cf 100644 (file)
@@ -533,14 +533,14 @@ sub autoscript {
           && !compat(5)) {
                # Add fragments to top so they run in reverse order when removing.
                complex_doit("echo \"# Automatically added by ".basename($0)."\"> $outfile.new");
-               complex_doit("sed '$sed' $infile >> $outfile.new");
+               complex_doit("sed \"$sed\" $infile >> $outfile.new");
                complex_doit("echo '# End automatically added section' >> $outfile.new");
                complex_doit("cat $outfile >> $outfile.new");
                complex_doit("mv $outfile.new $outfile");
        }
        else {
                complex_doit("echo \"# Automatically added by ".basename($0)."\">> $outfile");
-               complex_doit("sed '$sed' $infile >> $outfile");
+               complex_doit("sed \"$sed\" $infile >> $outfile");
                complex_doit("echo '# End automatically added section' >> $outfile");
        }
 }
index 89ebeb2e9adf0ad12639e8171401d7a60df00ce2..ba68834279b69af841131f4eb6825b151e08a0e4 100644 (file)
@@ -1,3 +1,12 @@
+debhelper (9.20120313) UNRELEASED; urgency=low
+
+  * Revert avoid expanding shell metacharacters in sed call in autoscript().
+    It breaks dh_usrlocal and must be considered part of its interface.
+    Added to interface documentation.
+    Closes: #665263
+
+ -- Joey Hess <joeyh@debian.org>  Thu, 22 Mar 2012 17:35:48 -0400
+
 debhelper (9.20120312) unstable; urgency=low
 
   * Also include CFLAGS in ld line for perl. Closes: #662666
index b6d3d16e231aeaa9c744290667cddc4f0b271d21..bcf1c13caaadfdc16d168ced6afabda9a9d9f0c1 100644 (file)
@@ -197,7 +197,7 @@ autoscript($package, $scriptname, $snippetname, $sedcommands)
         - script to add to
         - filename of snippet
         - sed commands to run on the snippet. Ie, s/#PACKAGE#/$PACKAGE/
-          (optional)
+          (optional) Note: Passed to the shell inside double quotes.
        This command automatically adds shell script snippets to a debian
        maintainer script (like the postinst or prerm).
        Note that in v6 mode and up, the snippets are added in reverse