Revision
100219
Author
cal@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

Diff

Modified: trunk/base/src/registry2.0/portuninstall.tcl (100218 => 100219)


--- 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