[100219] trunk/base/src/registry2.0/portuninstall.tcl

cal at macports.org cal at macports.org
Mon Dec 3 16:21:25 PST 2012


Revision: 100219
          https://trac.macports.org/changeset/100219
Author:   cal at macports.org
Date:     2012-12-03 16:21:25 -0800 (Mon, 03 Dec 2012)
Log Message:
-----------
registry: wrap removing files from the registry in a transaction, closes #34482

When uninstall operations are interuppted manually, this could cause
a problem hard to solve (for end users). See #34482, "an invalid entry
was passed". Wrapping the deletions in a transaction prevents this,
because the records will either be deleted completely, or not at all.

Modified Paths:
--------------
    trunk/base/src/registry2.0/portuninstall.tcl

Modified: trunk/base/src/registry2.0/portuninstall.tcl
===================================================================
--- trunk/base/src/registry2.0/portuninstall.tcl	2012-12-04 00:17:26 UTC (rev 100218)
+++ trunk/base/src/registry2.0/portuninstall.tcl	2012-12-04 00:21:25 UTC (rev 100219)
@@ -217,7 +217,9 @@
         # files so just ignore the failure
         catch {file delete [::file dirname $imagefile]}
 
-        registry::entry delete $port
+        registry::write {
+            registry::entry delete $port
+        }
     }
     
     # uninstall dependencies if requested
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121203/1c9764f9/attachment.html>


More information about the macports-changes mailing list