rev 10784 - scripts

Modestas Vainius modax-guest at alioth.debian.org
Thu May 29 12:17:11 UTC 2008


Author: modax-guest
Date: 2008-05-29 12:17:10 +0000 (Thu, 29 May 2008)
New Revision: 10784

Modified:
   scripts/dh_installgen
Log:
some small changes for dh_installgen

Modified: scripts/dh_installgen
===================================================================
--- scripts/dh_installgen	2008-05-29 12:15:05 UTC (rev 10783)
+++ scripts/dh_installgen	2008-05-29 12:17:10 UTC (rev 10784)
@@ -274,7 +274,7 @@
     my ($self, $other) = @_;
 
     if ($self->{is_link} && $other->{is_link}) {
-        print $self->{dst}, " => ", $other->{dst}, "\n";
+#        print $self->{dst}, " => ", $other->{dst}, "\n";
         # Match by basename of the link and readlink
         return (main::basename($self->{dst}) eq main::basename($other->{dst}) &&
             $self->get_path() eq $other->get_path());
@@ -472,13 +472,13 @@
     my $p = $pattern->[0];
     my $action;
 
-    if ($p =~ m/^(inst|miss)(?:all|ing)?$/) {
+    if ($p =~ m/^(inst|miss|stop)(?:all|ing)?$/) {
         $action = $1;
         shift @$pattern;
     } elsif ($p =~ m/^depends$/) {
         # Ignore. Not interesting here
         return bless({ action => "ignr", pats => [] }, $cls);
-    } else{
+    } else {
         $action = "inst"; # default
     }
     my $self = bless( { action => $action, pats => [] }, $cls);
@@ -665,11 +665,12 @@
     $pdone->{$package} = 2; # Processing
     foreach my $dep (@{$pdepends->{$package}}) {
         next if ($dep eq $package); # might happen in case of 'last'
-
-        if ($pdone->{$dep} == 2) {
-            verbose_print("installgen dependency loop for the package $dep detected. Breaking it...");
-        } elsif ($pdone->{$dep} == 0) {
-            installgen_process($dep, $pdepends, $pdone, $missing);
+        
+        my $depdone = (exists $pdone->{$dep}) ? $pdone->{$dep} : 0;
+        if ($depdone == 2) {
+                verbose_print("installgen dependency loop for the package $dep detected. Breaking it...");
+        } elsif ($depdone == 0) {
+                installgen_process($dep, $pdepends, $pdone, $missing);
         }
     }
 
@@ -690,16 +691,22 @@
             # Search for the missing files in the source/build tree
             foreach my $miss (@$missing) {
                 next if $miss->{found};
+                next if $miss->{stop};
 
                 if ($pattern->has_type("src") && ! defined($miss->{src})) {
                     $miss->locate($builddir);
                 }
                 my $match = $pattern->match($miss);
                 if (defined $match) {
-                    if ($match eq "inst") {
-                        push @autoadd, $miss->stripped_dstpath($srcdir);
-                    } # Otherwise the file was defined as missing on purpose
-                    $miss->{found} = 1;
+                    if ($match eq "stop") {
+                        $miss->{stop} = 1;
+                    } else {
+                        if ($match eq "inst") {
+                            push @autoadd, $miss->stripped_dstpath($srcdir);
+                        }                    
+                        # Otherwise the file was defined as missing on purpose
+                        $miss->{found} = 1;
+                    }
                 }
             }
         }
@@ -846,8 +853,10 @@
     foreach (@missing) {
         unless ($_->{found}) {
             $unmatched++;
-            warning $_->stripped_dstpath($srcdir) .
-                " exists in $srcdir but is not installed to anywhere" if ($dh{LIST_MISSING});
+            warning "Not installed files are listed below:" if ($unmatched == 1 && $dh{LIST_MISSING});
+            print STDERR $_->stripped_dstpath($srcdir), "\n" if ($dh{LIST_MISSING});
+#            warning $_->stripped_dstpath($srcdir) .
+#                " exists in $srcdir but is not installed to anywhere" if ($dh{LIST_MISSING});
         }
     }
     if ($dh{FAIL_MISSING} && $unmatched) {




More information about the pkg-kde-commits mailing list