]> git.donarmstrong.com Git - debhelper.git/commitdiff
fix get_sourcepath use and misc style fixes
authorJoey Hess <joey@gnu.kitenet.net>
Sun, 19 Jul 2009 13:45:36 +0000 (15:45 +0200)
committerJoey Hess <joey@gnu.kitenet.net>
Sun, 19 Jul 2009 13:45:36 +0000 (15:45 +0200)
Debian/Debhelper/Buildsystem/python_distutils.pm

index 9274a7d131c5840d14fe6d187d250d7be12e87f9..69032d21c17e542d1b8245e72469687ea4a54050 100644 (file)
@@ -90,11 +90,11 @@ sub dbg_build_needed {
        # built in a clean chroot.
 
        my @dbg;
-       open (CONTROL,  $this->get_sourcepath('debian/control')) ||
+       open (CONTROL, 'debian/control') ||
                error("cannot read debian/control: $!\n");
        foreach my $builddeps (join('', <CONTROL>) =~ 
                        /^Build-Depends[^:]*:.*\n(?:^[^\w\n].*\n)*/gmi) {
-               foreach ($builddeps =~ /(python[^, ]*-dbg)/g) {
+               while ($builddeps =~ /(python[^, ]*-dbg)/g) {
                        push @dbg, $1;
                }
        }
@@ -120,8 +120,8 @@ sub setup_py {
         $python_default =~ s/^\s+//;
         $python_default =~ s/\s+$//;
         my @python_requested = split ' ', `pyversions -r 2>/dev/null`;
-       if (grep /^$python_default/, @python_requested) {
-               @python_requested = ("python", grep(!/^$python_default/,
+       if (grep /^\Q$python_default\E/, @python_requested) {
+               @python_requested = ("python", grep(!/^\Q$python_default\E/,
                                        @python_requested));
        }
         my @dbg_build_needed = $this->dbg_build_needed();
@@ -131,9 +131,9 @@ sub setup_py {
                        $this->doit_in_sourcedir($python, "setup.py", $act, @_);
                }
                $python = $python . "-dbg";
-               if ((grep /^(python-all-dbg|$python)/, @dbg_build_needed)
-                       or (($python eq "python-dbg")
-                               and (grep /^$python_default/, @dbg_build_needed))){
+               if ((grep /^(python-all-dbg|\Q$python\E)/, @dbg_build_needed)
+                   or (($python eq "python-dbg") and
+                       (grep /^$python_default/, @dbg_build_needed))) {
                        $this->doit_in_sourcedir($python, "setup.py", $act, @_);
                }
        }