Package: wanna-build
Version: 0.58.6-1
Tags: patch

wanna-build complains about $arch being uninitialized in
WannaBuild/Database.pm line 1097, because the regexp for the
Architecture field assumes no white-space in the value.  The attached
patch makes it match any characters after Architecture:.

-- 
John Wright <j...@debian.org>
>From d61eed3aec6b9b57bb8c7538e806a3ba36ae1250 Mon Sep 17 00:00:00 2001
From: John Wright <john.wri...@hp.com>
Date: Wed, 1 Jul 2009 19:09:26 -0600
Subject: [PATCH] The Architecture field can contain multiple values

The regular expression for parsing the Architecture field in Sources
assumed it would only be one word.  Since it can be a list of supported
architectures, this patch changes the regular expression to use '.+'
instead of '\S+'.
---
 lib/WannaBuild/Database.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/WannaBuild/Database.pm b/lib/WannaBuild/Database.pm
index 6f3abfb..8f63124 100644
--- a/lib/WannaBuild/Database.pm
+++ b/lib/WannaBuild/Database.pm
@@ -1065,7 +1065,7 @@ sub parse_sources {
 	s/\s*$//m;
 	/^Package:\s*(\S+)$/mi and $name = $1;
 	/^Version:\s*(\S+)$/mi and $version = $1;
-	/^Architecture:\s*(\S+)$/mi and $arch = $1;
+	/^Architecture:\s*(.+)$/mi and $arch = $1;
 	/^Section:\s*(\S+)$/mi and $section = $1;
 	/^Priority:\s*(\S+)$/mi and $priority = $1;
 	/^Build-Depends:\s*(.*)$/mi and $builddep = $1;
-- 
debian.1.6.3.3.1.7.g944a7

Reply via email to