[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Urgent wx-related production problem
From: |
Greg Chicares |
Subject: |
Re: [lmi] Urgent wx-related production problem |
Date: |
Tue, 05 Feb 2008 03:17:25 +0000 |
User-agent: |
Thunderbird 2.0.0.9 (Windows/20071031) |
On 2008-02-02 14:19Z, Vaclav Slavik wrote:
>
> Greg Chicares wrote:
>> Problem: Spurious duplication of initial element when pasting
>> data from ms 'excel' into an lmi textcontrol: anomaly observed
>> with wx-2.8.6, but not with a 2006-12-04 wx snapshot.
>
> There was a bug in wxWidgets that caused WM_PASTE to be processed
> twice in this particular case. It's fixed in SVN now, the patch is
> here (it's quite small and applies cleanly to 2.8.6):
> http://svn.wxwidgets.org/viewvc/wx/wxWidgets/branches/WX_2_8_BRANCH/src/msw/textctrl.cpp?view=patch&r1=51504&r2=51503&pathrev=51504
That's the magic I needed. Thanks. Fixed 20080204T1453Z in lmi HEAD.
I'm well aware who wrote the wx patch guidelines, having studied
them carefully numerous times; the audience I'm speaking to below
is our future employees.
For consistency and generality [1], I made and committed one patch
for each of wx-2.8.6 and wx-2.8.7, and copied my shell commands here
for posterity [2]. It's likely that someday we'll want another patch
- for one or both of those versions,
- or for a future wx version,
- and probably in a different part of the wx tree,
so I extended 'install_wx.make' to apply any version-specific wx
patch automatically. One (combined) patchset for each wx version
should suit any general need that may arise.
This certainly took a little more time than just applying the svn
patch to our local copies, and the shell commands are kind of
laborious--unpacking enormous tarballs just to change a few lines.
But I don't care about that if I can make it robust enough that
next time it can be done reliably but without deep thought, and
preferably by someone else whom we haven't hired yet. Besides, a
couple years ago we "saved time" with a quick and dirty chain of
patches for various gnome xml libraries, then had headaches at an
inopportune moment later on--so I've come to appreciate patchsets
of documented provenance, that apply in the same direction, all
with the same '--strip' parameter.
---------
[1] quoted from 'install_miscellanea.make':
# Patches were generated according to this advice:
#
# http://www.linuxfromscratch.org/patches/submit.html
# "When creating the patch, you should be in a directory just above
# the package directory so that the resulting patch can be applied
# with patch -p1"
#
# because they generally span multiple subdirectories. Use commands
# like these if they ever need to be regenerated:
#
# cd /tmp
# diff --recursive --unified=3 original modified >foo.patch
# patch --strip=1 --dry-run --directory=/wherever/scratch </tmp/foo.patch
[2] I used these shell commands for wx-2.8.7, and a trivial variant
of them for wx-2.8.6:
patch_url='http://svn.wxwidgets.org/viewvc/wx/wxWidgets/branches/WX_2_8_BRANCH/src/msw/textctrl.cpp?view=patch&r1=51504&r2=51503&pathrev=51504'
cd /tmp
mkdir original
mkdir modified
pushd original; tar -xjf ../lmi_cache/wxWidgets-2.8.7.tar.bz2; popd
pushd modified; tar -xjf ../lmi_cache/wxWidgets-2.8.7.tar.bz2; popd
wget --output-document=raw_patch $patch_url
pushd modified; patch --dry-run
--directory=/tmp/modified/wxWidgets-2.8.7 --strip=3 < ../raw_patch; popd
pushd modified; patch --no-backup-if-mismatch
--directory=/tmp/modified/wxWidgets-2.8.7 --strip=3 < ../raw_patch; popd
diff --recursive --unified=3 original modified >wx-2.8.7.patch
patch --strip=1 --dry-run --directory=/opt/lmi/wx-scratch <wx-2.8.7.patch