From de574dea43d2c5780c09dc1d23d4ab734ea97178056002dcbac2bd5d311c67cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Schr=C3=B6der?= Date: Mon, 15 Jul 2013 12:10:38 +0000 Subject: [PATCH] fix searching of %INC OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-MailTools?expand=0&rev=23 --- incsearch.diff | 17 +++++++++++++++++ perl-MailTools.changes | 6 ++++++ perl-MailTools.spec | 10 +++++----- 3 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 incsearch.diff diff --git a/incsearch.diff b/incsearch.diff new file mode 100644 index 0000000..71ac9a6 --- /dev/null +++ b/incsearch.diff @@ -0,0 +1,17 @@ +%INC is randomized nowadays, so sort it to get consistent results. +Also, more important, make sure $INC{$f} is really set, otherwise +we end up searching the filesystem root. + +--- ./lib/Mail/Field.pm.orig 2013-07-15 12:06:12.000000000 +0000 ++++ ./lib/Mail/Field.pm 2013-07-15 12:07:24.000000000 +0000 +@@ -63,8 +63,9 @@ sub import + } + + my($dir,$dir_sep); +- foreach my $f (keys %INC) ++ foreach my $f (sort keys %INC) + { next if $f !~ /^Mail(\W)Field\W/i; ++ next unless $INC{$f}; + $dir_sep = $1; + $dir = ($INC{$f} =~ /(.*Mail\W+Field)/i)[0] . $dir_sep; + last; diff --git a/perl-MailTools.changes b/perl-MailTools.changes index 150cf71..aae2447 100644 --- a/perl-MailTools.changes +++ b/perl-MailTools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jul 15 14:09:27 CEST 2013 - mls@suse.de + +- fix searching of %INC, make sure the entry really has a set + value. Fixes the perl-MIME-tools module. + ------------------------------------------------------------------- Thu Mar 01 19:46:02 UTC 2012 - pascal.bleser@opensuse.org diff --git a/perl-MailTools.spec b/perl-MailTools.spec index 50a9681..da7b778 100644 --- a/perl-MailTools.spec +++ b/perl-MailTools.spec @@ -1,7 +1,7 @@ # # spec file for package perl-MailTools # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,19 +15,18 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -# norootforbuild - Name: perl-MailTools Url: http://cpan.org/modules/by-module/Mail/ Version: 2.09 -Release: 1 +Release: 0 Provides: p_mtools = %{version} Obsoletes: p_mtools < %{version} +Summary: Set of perl modules related to mail applications License: GPL-1.0+ or Artistic-1.0 Group: Development/Libraries/Perl -Summary: Set of perl modules related to mail applications Source: http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/MailTools-%{version}.tar.gz +Patch: incsearch.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %{perl_requires} BuildRequires: perl @@ -39,6 +38,7 @@ a set of perl modules related to mail applications %prep %setup -q -n MailTools-%{version} +%patch # --------------------------------------------------------------------------- %build