I was trying to upgrade WordPress and did the following (the directory already had 1.2.2). webapp-config -p -U -h example.com -d / wordpress 1.5.1.2 However this modified the .webapp file which broke the subsequent upgrade (same command without the -p flag). Reproducible: Always Steps to Reproduce: 1. webapp-config -I -h test.example.com -d / wordpress 1.2.2 2. grep V /var/www/test.example.com/*/.webapp 3. webapp-config -p -U -h test.example.com -d / wordpress 1.5.1.2 4. grep V /var/www/test.example.com/*/.webapp 5. webapp-config -U -h test.example.com -d / wordpress 1.5.1.2 Actual Results: Step 4 showed that the .webapp file had been modified, and step 5 failed with message "Fatal error: Cannot upgrade to the same package". No other files were modified except the .webapp file (checked with diff against copy made after step 1). Expected Results: Step 3 should not modify anything. PS: Not that it would fix this problem, but why does it block upgrades to the same version? What if I want to clean up some modifications using etc-update?
Hi, This is a nasty bug. I've applied a fix for this to my development repository; it should appear in the next release of webapp-config (although I need to do more testing around this area first). The reason I don't support upgrading to the same version is because of the package inventories. At the moment, an upgrade follows this logic: a) install new version b) uninstall old version The list of files for each version are stored in .webapp files in the directory where the webapp is installed. The filename is something like .webapp-$PN-$PVR; so with the current logic, when webapp-config comes to do the uninstall of the old version, it'll try to uninstall the version that has just been installed. I can change it, by either swapping around the order of a) and b) above, or simply avoiding b) when you've upgraded to the same version. I've added this to the TODO list for now. Best regards, Stu
reassigning
I encountered this problem too. Another side affect is when you're uninstalling older webapps that aren't installed, webapp tries to uninstall the version you have installed by webapp-config. Luckily I caught that before it deleted everything, but a fix or patch would be appreciated. Cheers-
(In reply to comment #3) > Another side affect is when you're uninstalling older webapps that aren't installed, webapp tries > to uninstall the version you have installed by webapp-config. Oh yes, I was just going to post another bug about what you are describing, it bit me when upgrading phpBB. Awful! Thankfully I had backups. I see someone has already posted a bug at #96584, so I will comment there.
Fixed in webapp-config v1.50. Best regards, Stu