Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21091

Modified Files:
        PkgVersion.pm ChangeLog 
Log Message:
Better error msg if qpkg-query fails during buildlock removal.

Apparently when SIGINT arrives just as tarball is finished being
unpacked...causes the `` to fail to even start...there appears to be a
pending (unreaped) SIGCHLD from the tar process?


Index: PkgVersion.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v
retrieving revision 1.414
retrieving revision 1.415
diff -u -d -r1.414 -r1.415
--- PkgVersion.pm       24 May 2005 22:14:31 -0000      1.414
+++ PkgVersion.pm       26 May 2005 18:23:52 -0000      1.415
@@ -3552,21 +3552,18 @@
        # remove lockpkg (== clear lock for building $self)
        print "Removing build lock...\n";
 
-
-       
-       my $old_lock;
-       {
-               local $SIG{INT} = 'IGNORE';
-               $old_lock = `dpkg-query -W $lockpkg 2>/dev/null`;
-       }
+       my $old_lock = `dpkg-query -W $lockpkg 2>/dev/null`;
        chomp $old_lock;
        if ($old_lock eq "$lockpkg\t") {
                &print_breaking("WARNING: The lock was removed by some other 
process.");
+       } elsif ($old_lock eq '') {
+               # this is weird, man...qpkg-query crashed or lock never got 
installed
+               &print_breaking("WARNING: Could not read lock timestamp. Not 
removing it.");
        } elsif ($old_lock ne "$lockpkg\t$timestamp") {
                # don't trample some other timestamp's lock
-               &print_breaking("WARNING: The lock has a different timestamp. 
Not ".
-                                               "removing it, as it likely 
belongs to a different ".
-                                               "fink process. This should not 
ever happen.");
+               &print_breaking("WARNING: The lock has a different timestamp 
than the ".
+                                               "one we set. Not removing it, 
as it likely belongs to ".
+                                               "a different fink process.");
        } else {
                if (&execute(dpkg_lockwait() . " -r $lockpkg", ignore_INT=>1)) {
                        &print_breaking("WARNING: Can't remove package ".

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1023
retrieving revision 1.1024
diff -u -d -r1.1023 -r1.1024
--- ChangeLog   26 May 2005 17:29:34 -0000      1.1023
+++ ChangeLog   26 May 2005 18:23:53 -0000      1.1024
@@ -1,5 +1,9 @@
 2005-05-26  Daniel Macks  <[EMAIL PROTECTED]>
 
+       * PkgVernios.pm: Better err if qpkg-query fails while removing buildlock
+
+2005-05-26  Daniel Macks  <[EMAIL PROTECTED]>
+
        * Engine.pm: Convert "reinstall" to "rebuild" if no .deb present.
 
 2005-05-25  Peter O'Gorman  <[EMAIL PROTECTED]>



-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to