[Libguestfs] [PATCH] podwrapper: Put the =encoding line at the correct place in the input (RHBZ#1109174).

Richard W.M. Jones rjones at redhat.com
Fri Jun 13 13:24:34 UTC 2014


Commit c4dc70f8c43a7faae2a8698027a4ed23d316dfa0 broke the man pages
for the Perl scripts in the tools/ directory.

It inserted the =encoding line at the top of the file, instead of in
front of the first =head1 entry, and this meant that the #!/usr/bin/perl
and the prologue became a part of the POD, which was not intended.
---
 podwrapper.pl.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/podwrapper.pl.in b/podwrapper.pl.in
index c2cb5e1..a685a4e 100755
--- a/podwrapper.pl.in
+++ b/podwrapper.pl.in
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -w
 # podwrapper.pl
-# Copyright (C) 2010-2012 Red Hat Inc.
+# Copyright (C) 2010-2014 Red Hat Inc.
 # @configure_input@
 #
 # This program is free software; you can redistribute it and/or modify
@@ -293,7 +293,7 @@ foreach (@verbatims) {
 die "$progname: $input: =encoding must not be present in input\n"
     if $content =~ /^=encoding/m;
 
-$content = "=encoding utf8\n\n$content";
+$content =~ s/^=head1(.*)/\n=encoding utf8\n\n=head1$1/m;
 
 if ($strict_checks) {
     # Verify sections present / not present.
-- 
1.9.0




More information about the Libguestfs mailing list