Package: python-support
Version: 1.0.6
Severity: minor
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch lucid

        Hi

 This bug was originally reported at:
    https://bugs.launchpad.net/ubuntu/+source/python-support/+bug/437593

 When parsing debian/pyversions, dh_pysupport is confused with newlines
 in the file.

 I'm attaching a proposed patch.

    Thanks,

 NB: for convenience, I imported the SVN repo of python-support at
 https://code.launchpad.net/~lool/python-support/trunk and this patch is
 in https://code.launchpad.net/~lool/python-support/lp-437593
-- 
Loïc Minier
=== modified file 'debhelper/dh_pysupport'
--- debhelper/dh_pysupport	2009-11-28 19:22:55 +0000
+++ debhelper/dh_pysupport	2010-02-01 22:03:58 +0000
@@ -157,10 +157,13 @@
 	# Move them to the python-support directories
 	my $verfile = "debian/pyversions";
 	my $versions = "";
-	if (-f $verfile) {
+	if (open VERFILE, $verfile) {
+	    # read first non-empty line
+	    local $/ = "";
+	    $versions = <VERFILE>;
+	    chomp $versions;
+	    close VERFILE:
 	    # TODO: debian/package.pyversions ?
-	    $versions=`cat $verfile`;
-	    chomp $versions;
 	} else {
 	    my $doko_versions=`$privdir/parseversions --raw --pycentral debian/control`;
 	    chomp $doko_versions;

Reply via email to