r64211 - in /trunk/libxml-rss-libxml-perl/debian: patches/dont_overwrite_source.patch rules

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Sun Oct 24 21:36:09 UTC 2010


Author: periapt-guest
Date: Sun Oct 24 21:35:58 2010
New Revision: 64211

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=64211
Log:
got patch working

Modified:
    trunk/libxml-rss-libxml-perl/debian/patches/dont_overwrite_source.patch
    trunk/libxml-rss-libxml-perl/debian/rules

Modified: trunk/libxml-rss-libxml-perl/debian/patches/dont_overwrite_source.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-rss-libxml-perl/debian/patches/dont_overwrite_source.patch?rev=64211&op=diff
==============================================================================
--- trunk/libxml-rss-libxml-perl/debian/patches/dont_overwrite_source.patch (original)
+++ trunk/libxml-rss-libxml-perl/debian/patches/dont_overwrite_source.patch Sun Oct 24 21:35:58 2010
@@ -1,39 +1,26 @@
+Author: Nicholas Bamber <nicholas at periapt.co.uk>
+Subject: Stop tests from overwriting source
+ The t/*-generate.t tests generate data in t/generated which is in the
+ upstream source. These tests instead use File::Temp to generate 
 --- a/t/1.0-generate.t
 +++ b/t/1.0-generate.t
-@@ -1,6 +1,7 @@
- use strict;
- use File::Spec;
- use Test::More;
-+use File::Temp qw(tempdir);
- plan tests => 22;
- 
- # 1-2
-@@ -19,7 +20,8 @@
+@@ -19,7 +19,7 @@
    $pub_date     = &POSIX::strftime(DATE_TEMPLATE_PUB,   gmtime);
  }
  
 -use constant BASEDIR => File::Spec->catdir('t', 'generated');
-+my $temp_dir = File::Temp->newdir;
-+use constant BASEDIR => $temp_dir->dirname;
++use constant BASEDIR => 'generated';
  use constant RSS_VERSION    => "1.0";
  use constant RSS_SAVEAS     => File::Spec->catfile(BASEDIR, RSS_VERSION."-generated.xml");
  use constant RSS_MOD_PREFIX => "my";
 --- a/t/2.0-generate.t
 +++ b/t/2.0-generate.t
-@@ -1,5 +1,6 @@
- use strict;
- use File::Spec;
-+use File::Temp qw(tempdir);
- use Test::More tests => 29;
- 
- BEGIN {
-@@ -16,7 +17,8 @@
+@@ -16,7 +16,7 @@
  my $pub_date     = &POSIX::strftime( DATE_TEMPLATE_PUB,   gmtime );
  ok( $current_date, "Current date: $current_date" );
  
 -use constant BASEDIR => File::Spec->catdir('t', 'generated');
-+my $temp_dir = File::Temp->newdir;
-+use constant BASEDIR => $temp_dir->dirname;
++use constant BASEDIR => 'generated';
  use constant RSS_VERSION    => "2.0";
  use constant RSS_SAVEAS     => File::Spec->catfile(BASEDIR, RSS_VERSION."-generated.xml");
  use constant RSS_MOD_PREFIX => "my";

Modified: trunk/libxml-rss-libxml-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libxml-rss-libxml-perl/debian/rules?rev=64211&op=diff
==============================================================================
--- trunk/libxml-rss-libxml-perl/debian/rules (original)
+++ trunk/libxml-rss-libxml-perl/debian/rules Sun Oct 24 21:35:58 2010
@@ -2,3 +2,6 @@
 
 %:
 	dh $@
+
+override_dh_clean:
+	rm -rf generated




More information about the Pkg-perl-cvs-commits mailing list