[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#577056: [PATCH] make dh_sameversiondep work with recent libdpkg-perl



The problem seems to be a recent interface change in Dpkg::Substvars::parse
(first argument is now a filehandle, rather than the name fo the file).
Dpkg::Substvars::load now does the job, patch attached.

BTW, since  dh_sameversiondep does "use Dpkg::Substvars" the
package should depend (or at least recommend) libdpkg-perl (for dpkg >= 1.5.6.1)

Cheers, Roderich
--- pkg-kde-tools-0.7.0.1-ORIG/dh_sameversiondep	2010-03-15 23:35:18.000000000 +0100
+++ pkg-kde-tools-0.7.0.1/dh_sameversiondep	2010-04-10 14:23:22.000000000 +0200
@@ -176,7 +176,7 @@
 
 # Global substvars file
 my $g_substvars = new Dpkg::Substvars;
-$g_substvars->parse("debian/substvars") if (-r "debian/substvars");
+$g_substvars->load("debian/substvars") if (-r "debian/substvars");
 
 sub extract_package_names {
     my $val = shift;
@@ -208,7 +208,7 @@
         }, $cls);
     $self->{substvars} = new Dpkg::Substvars;
     if (-r $self->{file}) {
-        $self->{substvars}->parse($self->{file});
+        $self->{substvars}->load($self->{file});
     }
     return $self;
 }

Reply to: