pf-tools/pf-tools: FIX : regexp for matching Installed and Candi...

parmelan-guest at users.alioth.debian.org parmelan-guest at users.alioth.debian.org
Thu Jul 18 09:30:59 UTC 2013


details:   http://hg.debian.org/hg/pf-tools/pf-tools/rev/73b117bcb2ca
changeset: 1192:73b117bcb2ca
user:      Richard Phan
date:      Thu Jul 18 11:17:23 2013 +0200
description:
FIX : regexp for matching Installed and Candidate Package

diffstat:

 lib/PFTools/Packages/DEB.pm |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r b53b2d0cb5cf -r 73b117bcb2ca lib/PFTools/Packages/DEB.pm
--- a/lib/PFTools/Packages/DEB.pm	Wed Jul 17 16:17:27 2013 +0200
+++ b/lib/PFTools/Packages/DEB.pm	Thu Jul 18 11:17:23 2013 +0200
@@ -1,6 +1,7 @@
 package PFTools::Packages::DEB;
 
 #
+#  Copyright (C) 2013 Richard Phan <richard.phan.prestataire at sfr.com>
 #  Copyright (C) 2009 Christophe Caillet <quadchris at free.fr>
 #
 #  This program is free software; you can redistribute it and/or
@@ -177,12 +178,12 @@
     }
     while (<$output_fh>) {
         chomp;
-        if (m{\A  \s+Installed: (.*) \z}xms) {
+        if (m{\A  \s* Installed: \s* (.*) \z}xms) {
             $installed = $1;
             undef $installed
                 if ( $installed eq '' or $installed eq "(none)" );
         }
-        elsif (m{\A \s*Candidate: (.*) \z}xms) {
+        elsif (m{\A \s* Candidate: \s* (.*) \z}xms) {
             $available = $1;
         }
         elsif ( defined $version && m{\Q$version\E} ) {



More information about the pf-tools-commits mailing list