Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.9.4

Bug #13691 Pear doesn't remove old directories on upgrade
Submitted: 2008-04-16 01:25 UTC Modified: 2008-05-13 16:28 UTC
From: alexandertumanovsky Assigned: cellog
Status: Closed Package: PEAR (version 1.7.1)
PHP Version: 5.2.3 OS: Windows XP, Linux
Roadmaps: 1.7.2    
Subscription  


 [2008-04-16 01:25 UTC] alexandertumanovsky (Alexander Tumanovsky)
Description: ------------ I've made two versions of a test package for this test case. First version: SamplePackage SamplePackage/admin1/1.php Second version: SamplePackage SamplePackage/admin2/2.php Test script: --------------- -------------------------------------------------- C:\pearTest>pear install SamplePackage-1.0.4snapshot1207834335.tar install ok: channel://__uri/SamplePackage-1.0.4snapshot1207834335 C:\php\PEAR\pear\SamplePackage>dir /s Directory of C:\php\PEAR\pear\SamplePackage 16.04.2008 09:04 <DIR> admin1 Directory of C:\php\PEAR\pear\SamplePackage\admin1 16.04.2008 09:04 66 1.php -------------------------------------------------- Upgrade: -------------------------------------------------- C:\pearTest>pear install SamplePackage-1.0.4snapshot1207834335.tar install ok: channel://__uri/SamplePackage-1.0.4snapshot1207834335 C:\php\PEAR\pear\SamplePackage>dir /s Directory of C:\php\PEAR\pear\SamplePackage 16.04.2008 09:04 <DIR> admin1 Directory of C:\php\PEAR\pear\SamplePackage\admin1 16.04.2008 09:04 66 1.php -------------------------------------------------- Expected result: ---------------- SamplePackage/admin2/2.php (file installed with upgraded version) Actual result: -------------- SamplePackage/admin1/ (empty directory) SamplePackage/admin2/2.php (file installed with upgraded version)

Comments

 [2008-04-16 01:36 UTC] alexandertumanovsky (Alexander Tumanovsky)
The upgrade code was: -------------------------------------------------- C:\pearTest>pear upgrade SamplePackage-1.0.4snapshot1208273857.tar upgrade ok: channel://__uri/SamplePackage-1.0.4snapshot1208273857 C:\php\PEAR\pear\SamplePackage>dir /s Directory of C:\php\PEAR\pear\SamplePackage 16.04.2008 09:08 <DIR> admin1 16.04.2008 09:08 <DIR> admin2 Directory of C:\php\PEAR\pear\SamplePackage\admin1 Directory of C:\php\PEAR\pear\SamplePackage\admin2 16.04.2008 09:08 66 2.php --------------------------------------------------
 [2008-04-22 08:33 UTC] doconnor (Daniel O'Connor)
What happens when you pear uninstall either package?
 [2008-04-22 10:17 UTC] alexandertumanovsky (Alexander Tumanovsky)
The admin2 folder was deleted after uninstall, but SamplePackage/admin1 still present. C:\pearTest>pear uninstall __uri/SamplePackage uninstall ok: channel://__uri/SamplePackage-1.0.4snapshot1208273857 ... dir Directory of C:\php\PEAR\pear\SamplePackage 22.04.2008 18:13 <DIR> . 22.04.2008 18:13 <DIR> .. 16.04.2008 09:08 <DIR> admin1 0 File(s) 0 bytes 3 Dir(s) 2 368 557 056 bytes free After that I've installed again the first version of package, and then uninstalled it, and directory C:\php\PEAR\pear\SamplePackage was removed after that. So again - the problem is in upgrade process.
 [2008-05-13 16:28 UTC] cellog (Greg Beaver)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.