new pear revert command

From: Date: Wed, 27 Aug 2003 02:00:15 +0000
Subject: new pear revert command
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-20600@lists.php.net to get a copy of this message
Hi, I have a working pear revert command here at home, I won't post the patch because I'd like to work out some code dealing with subpackages first, but I wanted to get some feedback on the choices I made for the command format. The way it works now is this: pear revert [--subpackages] packagename version number|packagefile packagefile can be any local .tgz, package.xml, or a URL http://www.example.com/Package-1.3.tgz. This command is extremely useful for testing a release, and quickly reverting to a known working release. For instance, if PEAR is being tested, you can download the .tgz for the current version of PEAR, and then if something breaks for you, you can simply: pear revert PEAR PEAR-1.2.1.tgz and voila - your installation is fixed. Of course, in this specific example it would also eliminate the revert command :). Most situations would be if a user upgrades to a new version 3.3 of say HTML_QuickForm. If suddenly things break, the user can do this while a solution is being worked out to quickly keep code from being broken on a live site: pear revert HTML_QuickForm 3.2 This will attempt to download version 3.2 of HTML_QuickForm from pear.php.net (or the current master server), and then uninstall the existing version and re-install. Dependencies are ignored with --nodeps and --force, as in this case, it would probably be impossible to uninstall without an error. It currently doesn't have the possibility of reverting required dependencies, but I can add in --allreqdeps and --alldeps to complement the new options for install, and they would work. The --subpackages option would also revert any installed subpackages that depend on the current version to an earlier version that is compatible with the older main package version, or uninstall them. It would not install any new subpackages. I haven't implemented this yet. Any comments? Greg

« previous php.pear.dev (#20600) next »