#9464 closed defect (fixed)
[PATCH] trac-admin deploy - upgraded files contain leftovers in their end when new content is smaller.
Reported by: | Owned by: | Christian Boos | |
---|---|---|---|
Priority: | high | Milestone: | 0.11.8 |
Component: | admin/console | Version: | 0.12 |
Severity: | trivial | Keywords: | deploy upgrade issue |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
It should be very trivial to be fixed.
I've upgraded from Trac 0.11 to Trac 0.12 and after:
trac-admin /path/to/env deploy /deploy/path
Upgraded trac environments became inaccessible (Apache began returning error message to the browser requests).
I've compared the modified files with a recent backup and found that they were almost identical.
Affected were all files in the cgi-bin folder: trac.wsgi, trac.fcgi and trac.cgi.
There were just cosmetic changes and … also few bytes at the end originating from the pre-upgraded file version which of course are meaningless. After removing these characters all returned to normal.
The same happened both on WinXP and linux.
Attachments (0)
Change History (6)
comment:1 by , 14 years ago
comment:2 by , 14 years ago
Summary: | trac-admin deploy - upgraded files contain leftovers in their end when new content is smaller. → [PATCH] trac-admin deploy - upgraded files contain leftovers in their end when new content is smaller. |
---|
Thanks for the prompt responce. I've just tried the patch. Yes, it works now. So ticket can be closed if patch is in the repository.
comment:3 by , 14 years ago
Milestone: | 0.12.1 → 0.11.7.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
comment:4 by , 14 years ago
Owner: | set to |
---|
comment:6 by , 14 years ago
Ah, sorry. I just came across this ticket and thought I had seen it applied.
Could you please try the following patch?
trac/env.py
os.fdopen(os.open(dest, os.O_CREAT | os.O_WRONLY), 'w')