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

Modified Files:
        ChangeLog Engine.pm PkgVersion.pm 
Log Message:
abstract out invalidation

Index: PkgVersion.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v
retrieving revision 1.445
retrieving revision 1.446
diff -u -d -r1.445 -r1.446
--- PkgVersion.pm       26 Aug 2005 19:29:52 -0000      1.445
+++ PkgVersion.pm       26 Aug 2005 20:12:06 -0000      1.446
@@ -3413,7 +3413,7 @@
                }
        }
 
-       Fink::Status->invalidate();
+       Fink::PkgVersion->dpkg_changed;
 }
 
 ### deactivate
@@ -3446,7 +3446,7 @@
                }
        }
 
-       Fink::Status->invalidate();
+       Fink::PkgVersion->dpkg_changed;
 }
 
 ### deactivate recursive
@@ -3461,7 +3461,7 @@
                        die "can't batch-remove packages: @packages\n";
                }
        }
-       Fink::Status->invalidate();
+       Fink::PkgVersion->dpkg_changed;
 }
 
 ### purge
@@ -3479,7 +3479,7 @@
                        die "can't batch-purge packages: @packages\n";
                }
        }
-       Fink::Status->invalidate();
+       Fink::PkgVersion->dpkg_changed;
 }
 
 ### purge recursive
@@ -3494,7 +3494,7 @@
                        die "can't batch-purge packages: @packages\n";
                }
        }
-       Fink::Status->invalidate();
+       Fink::PkgVersion->dpkg_changed;
 }
 
 # create an exclusive lock for the %f of the parent using dpkg
@@ -4219,6 +4219,20 @@
        return $parent->param_default('infon', 1);
 }
 
+=item dpkg_changed
+
+  Fink::PkgVersion->dpkg_changed;
+
+This method should be called whenever the state of dpkg has changed,
+ie: whenever packages are installed or removed. It makes sure that caches
+of dpkg information are regenerated.
+
+=cut
+
+sub dpkg_changed {
+       Fink::Status->invalidate();
+       # Shlibs?
+}
 =back
 
 =cut

Index: Engine.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Engine.pm,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -d -r1.311 -r1.312
--- Engine.pm   26 Aug 2005 19:29:52 -0000      1.311
+++ Engine.pm   26 Aug 2005 20:12:06 -0000      1.312
@@ -994,7 +994,6 @@
                my @packages = get_pkglist("remove", @_);
                Fink::PkgVersion::phase_deactivate(@packages);
        }
-       Fink::Status->invalidate();
 }
 
 sub get_pkglist {
@@ -1154,7 +1153,6 @@
                my @packages = get_pkglist("purge", @_);
                Fink::PkgVersion::phase_purge(@packages);
        }
-       Fink::Status->invalidate();
 }
 
 sub cmd_validate {

Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1106
retrieving revision 1.1107
diff -u -d -r1.1106 -r1.1107
--- ChangeLog   26 Aug 2005 19:29:52 -0000      1.1106
+++ ChangeLog   26 Aug 2005 20:12:06 -0000      1.1107
@@ -1,5 +1,10 @@
 2005-08-26  Dave Vasilevsky  <[EMAIL PROTECTED]>
 
+       * PkgVersion.pm: Abstract out invalidating caches when dpkg state 
changes.
+       * Engine.pm: Remove redundant invalidate calls.
+
+2005-08-26  Dave Vasilevsky  <[EMAIL PROTECTED]>
+
        * PkgVersion.pm: Document some methods, add is_locally_present.
        * Engine.pm: Revamp prefetching. Also make 'fink build' always build
        something unless there's a .deb presen that has been built by the local



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Fink-commits mailing list
Fink-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fink-commits

Reply via email to