]> git.donarmstrong.com Git - debhelper.git/commitdiff
minor optimisation
authorJoey Hess <joey@gnu.kitenet.net>
Mon, 1 Mar 2010 21:23:14 +0000 (16:23 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Mon, 1 Mar 2010 21:23:14 +0000 (16:23 -0500)
Debian/Debhelper/Dh_Lib.pm

index b96ea3443091b77465c0a093dba9d7172ce8d7a2..70fead464af359de935fed29a97d1c6ed52cf74e 100644 (file)
@@ -65,11 +65,11 @@ sub init {
                $dh{NO_ACT}=1;
        }
 
-       my @allpackages=getpackages();
        # Get the name of the main binary package (first one listed in
        # debian/control). Only if the main package was not set on the
        # command line.
        if (! exists $dh{MAINPACKAGE} || ! defined $dh{MAINPACKAGE}) {
+               my @allpackages=getpackages();
                $dh{MAINPACKAGE}=$allpackages[0];
        }