Merge lp:~gz/bzr-windows-installers/runtime_libraries_in_lib_881203 into lp:bzr-windows-installers

Proposed by Martin Packman
Status: Rejected
Rejected by: Martin Packman
Proposed branch: lp:~gz/bzr-windows-installers/runtime_libraries_in_lib_881203
Merge into: lp:bzr-windows-installers
Diff against target: 34 lines (+7/-6)
1 file modified
build.py (+7/-6)
To merge this branch: bzr merge lp:~gz/bzr-windows-installers/runtime_libraries_in_lib_881203
Reviewer Review Type Date Requested Status
Martin Packman (community) Disapprove
Review via email: mp+83854@code.launchpad.net

Description of the change

Swap the funny manifest path hack around so the C and C++ runtime libraries get installed to the lib dir rather than the root install dir which may be added to %PATH% and break things.

I can't test that this actually works for machines that need the runtime bundled right now, and am not keen on landing this without knowing it works the same as the previous hack.

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

> I can't test that this actually works for machines that need the runtime bundled right now, and am not keen on landing this without knowing it works the same as the previous hack.

Does testing that require people build a new installer, or just run
the installer?

Either way you are probably better off asking on the list.

I don't think there is much point asking specifically for code review
if you know the results work; this kind of stuff is pretty empirical.

Revision history for this message
Martin Packman (gz) wrote :

It doesn't require the installer built, but does need some rather specific testing which is hard to get someone else to do correctly. Basically, either a virgin windows copy without the runtimes is needed, or fiddling with internal SxS directories to emulate that state. Then it's possible to examine what handles the bzr process has open and confirm it's finding the libraries we ship so won't fail if they are not already installed. Hopefully I'll be able to do that testing later this week, when I fix my windows box.

Revision history for this message
Martin Pool (mbp) wrote :

On 30 November 2011 22:50, Martin Packman <email address hidden> wrote:
> It doesn't require the installer built, but does need some rather specific testing which is hard to get someone else to do correctly. Basically, either a virgin windows copy without the runtimes is needed, or fiddling with internal SxS directories to emulate that state. Then it's possible to examine what handles the bzr process has open and confirm it's finding the libraries we ship so won't fail if they are not already installed. Hopefully I'll be able to do that testing later this week, when I fix my windows box.

So to be just a bit cavalier, you could just publish a new beta and
hope enough people will test it that one of them will hit the problem,
if there is a problem.

--
Martin

Revision history for this message
Vincent Ladeuil (vila) wrote :

> So to be just a bit cavalier, you could just publish a new beta and hope enough people will test it that one of them will hit the problem, if there is a problem.

With my RM hat: I think this is the way to go (and I don't feel it's that much cavalier), it's windows specific issue for which we need feedback, that's what beta testers are good at.

Revision history for this message
Martin Packman (gz) wrote :

This doesn't work. Fiddling with the name attribute is only tolerated because it's mostly ignored, not because it's treated as a path anywhere.

review: Disapprove

Unmerged revisions

193. By Martin Packman

Place the runtime libraries in under lib rather than next to the executables

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build.py'
2--- build.py 2011-07-05 10:12:36 +0000
3+++ build.py 2011-11-29 21:01:24 +0000
4@@ -409,23 +409,24 @@
5 # This isn't required for Python 2.5 or earlier because
6 # py2exe handles it then.
7 if self.python.find("26") >= 0:
8- copy_files(self.msvc_redist_dir, exe_dir, [
9+ lib_dir = os.path.join(exe_dir, "lib")
10+ copy_files(self.msvc_redist_dir, lib_dir, [
11 "msvcr90.dll",
12 "msvcp90.dll",
13 ])
14 # Mess around with manifests, see bug and related mp for reasons:
15 # <https://bugs.launchpad.net/bzr-windows-installers/+bug/632465>
16+ # <https://bugs.launchpad.net/bzr-windows-installers/+bug/881203>
17 m_name = "%s.manifest" % os.path.basename(self.msvc_redist_dir)
18 # Remove the file element for the dll bzr doesn't need
19 m_contents = file(os.path.join(self.msvc_redist_dir, m_name)
20 ).read().replace(' <file name="msvcm90.dll" />', "")
21- # Write the manifest to the root dir so the python dll finds it
22+ # Write the manifest to the root dir so the python dll finds it,
23+ # modifying the name to include in the 'lib' directory
24 file(os.path.join(exe_dir, m_name), "w").write(
25- m_contents)
26+ m_contents.replace('<file name="', '<file name="lib\\'))
27 # Write another copy to the lib folder for the extension modules
28- # that need it, modifying the dll names to look in the parent dir
29- file(os.path.join(exe_dir, "lib", m_name), "w").write(
30- m_contents.replace('<file name="', '<file name="..\\'))
31+ file(os.path.join(lib_dir, m_name), "w").write(m_contents)
32
33 # Generate the Installer spec file and compile it
34 iss_file = issgen.generate_iss(self.distro,

Subscribers

People subscribed via source and target branches