This review request is for a pair of issues that only show up on Windows due to the Windows file locking behavior.
Issues: http://defect.opensolaris.org/bz/show_bug.cgi?id=2402 http://defect.opensolaris.org/bz/show_bug.cgi?id=2415 Webrev: http://cr.opensolaris.org/~tmueller/cr-2402,2415/ To fix 2402, a new portable.remove method was added with an implementation in os_windows that moves the file to the trash area (using the same functionality that is used during an update via the rename method). The file.remove method was modified to use the new portable.remove method. To fix 2415, a file.preinstall method was added on Windows only to check if a file that is being updated is in use. The method for checking if a file is in use is to rename it to itself (which will fail if and only if the file is locked). The imageplan, pkgplan, and filelist modules were modified so that the preinstalls for all actions are called before any files are downloaded, so that the install will fail as soon as possible. The preinstall check throws a RuntimeError which is already caught by client.py with a nice error message. This fix for 2415 is preliminary. In the long term, we'll need to have a method by which an update can be installed into a running user image and saved away without actually modifying the image. Later, and application reboot can invoke something that actually installs the update. This is the user image equivalent of the ZFS snapshot + reboot. This long term fix is going to take some time to develop, so the idea is to get this fix in to avoid installs that fail partway through. Thanks. Tom _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
