rev 11681 - scripts

Modestas Vainius modax-guest at alioth.debian.org
Wed Jul 23 17:02:05 UTC 2008


Author: modax-guest
Date: 2008-07-23 17:02:05 +0000 (Wed, 23 Jul 2008)
New Revision: 11681

Modified:
   scripts/dh_installgen
Log:
A few dh_installgen fixes

Modified: scripts/dh_installgen
===================================================================
--- scripts/dh_installgen	2008-07-23 14:42:19 UTC (rev 11680)
+++ scripts/dh_installgen	2008-07-23 17:02:05 UTC (rev 11681)
@@ -617,13 +617,14 @@
             my @install_data;
             my $prevline = "";
 
-            open(DH_INSTALL, "<$file");
-            while (<DH_INSTALL>) {
-                $needs_sort = 1 if (!$needs_sort && $prevline gt $_);
-                push @install_data, $_;
-                $prevline = $_;
+            if (open(DH_INSTALL, "<$file")) {
+                while (<DH_INSTALL>) {
+                    $needs_sort = 1 if (!$needs_sort && $prevline gt $_);
+                    push @install_data, $_;
+                    $prevline = $_;
+                }
+                close(DH_INSTALL);
             }
-            close(DH_INSTALL);
 
             if ($needs_sort) {
                 @install_data = sort(@install_data);
@@ -724,7 +725,7 @@
     foreach (@$fileset) {
         my $pat = "$sdir/$_";
         my @files = glob $pat;
-        if (@files == 1) {
+        if (@files == 1 && $files[0] eq $pat) {
             # The pattern might have not been expanded.
             # Check manually
             if (! -e $pat && ! -l $pat) {




More information about the pkg-kde-commits mailing list