[Libguestfs] libguestfs-1.22.1 compilation error

Richard W.M. Jones rjones at redhat.com
Thu May 30 10:48:52 UTC 2013


On Thu, May 30, 2013 at 01:37:34PM +0300, Evaggelos Balaskas wrote:
> [tmp]> diff -u rwm perl
> --- rwm    2013-05-30 13:24:21.066286908 +0300
> +++ perl    2013-05-30 13:26:27.149615793 +0300
> @@ -1,14 +1,14 @@
> -        if ($t =~ /\G([^\n]{0,$ll})($break|\n+|\z)/xmgc) {
> +        if ($t =~ /\G((?:(?=[^\n])\X){0,$ll})($break|\n+|\z)/xmgc) {
>                  $r .= $unexpand
>                          ? unexpand($nl . $lead . $1)
>                          : $nl . $lead . $1;
>                  $remainder = $2;
> -        } elsif ($huge eq 'wrap' && $t =~ /\G([^\n]{$ll})/gc) {
> +        } elsif ($huge eq 'wrap' && $t =~ /\G((?:(?!=[^\n])\X){$ll})/gc) {
>                  $r .= $unexpand
>                          ? unexpand($nl . $lead . $1)
>                          : $nl . $lead . $1;
>                  $remainder = defined($separator2) ? $separator2 : $separator;
> -        } elsif ($huge eq 'overflow' && $t =~
> /\G([^\n]*?)($break|\n+|\z)/xmgc) {
> +        } elsif ($huge eq 'overflow' && $t =~
> /\G((?:(?=[^\n])\X)*?)($break|\n+|\z)/xmgc) {
>                  $r .= $unexpand
>                          ? unexpand($nl . $lead . $1)
>                          : $nl . $lead . $1;
> 
> 
> > pacman -Qi perl|grep wrap
> 
> perl-text-tabs-wrap=2012.0818

Strangely:

$ rpm -qf /usr/share/perl5/Text/Wrap.pm
perl-5.16.3-242.fc18.x86_64

Inside the actual file it says:

$VERSION = 2009.0305;

So it looks as if the version included in Perl (and hence in Fedora)
is quite old.

Anyhow, does the attached patch help?

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
-------------- next part --------------
>From aab882a3a6f4acf99b7fba6ea9f9f072ed2898ea Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones at redhat.com>
Date: Thu, 30 May 2013 11:45:59 +0100
Subject: [PATCH] podwrapper: Set Text::Wrap::huge property to "overflow".

This stops long URLs from being broken in the text output mode.

See:
https://www.redhat.com/archives/libguestfs/2013-May/thread.html#00088
---
 podwrapper.pl.in | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/podwrapper.pl.in b/podwrapper.pl.in
index bbc0b7c..af21ef0 100755
--- a/podwrapper.pl.in
+++ b/podwrapper.pl.in
@@ -28,6 +28,9 @@ use Pod::Simple::Text;
 use Pod::Simple::XHTML;
 use File::Basename;
 
+# https://www.redhat.com/archives/libguestfs/2013-May/thread.html#00088
+eval { $Text::Wrap::huge = "overflow" };
+
 =encoding utf8
 
 =head1 NAME
-- 
1.8.2.1



More information about the Libguestfs mailing list