Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96575 - webapp-config --pretend --upgrade breaks the install directory by modifying .webapp
Summary: webapp-config --pretend --upgrade breaks the install directory by modifying ....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Stuart Herbert (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-19 22:48 UTC by awk
Modified: 2005-11-20 09:47 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description awk 2005-06-19 22:48:50 UTC
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?
Comment 1 Stuart Herbert (RETIRED) gentoo-dev 2005-06-23 15:56:48 UTC
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
Comment 2 Renat Lumpau (RETIRED) gentoo-dev 2005-06-29 09:05:15 UTC
reassigning
Comment 3 Lance Albertson (RETIRED) gentoo-dev 2005-07-08 11:04:23 UTC
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-
Comment 4 awk 2005-07-08 11:16:00 UTC
(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.
Comment 5 Stuart Herbert (RETIRED) gentoo-dev 2005-11-20 09:47:58 UTC
Fixed in webapp-config v1.50.

Best regards,
Stu