#11686: Race condition in matplotlib mkdir()
------------------------------+---------------------------------------------
   Reporter:  jdemeyer        |          Owner:  tbd          
       Type:  defect          |         Status:  needs_review 
   Priority:  minor           |      Milestone:  sage-4.7.2   
  Component:  packages        |       Keywords:               
Work_issues:                  |       Upstream:  N/A          
   Reviewer:  Leif Leonhardy  |         Author:  John Palmieri
     Merged:                  |   Dependencies:               
------------------------------+---------------------------------------------

Comment(by leif):

 Replying to [comment:27 jhpalmieri]:
 > Summarizing: [[BR]]
 >  [...] [[BR]]
 >  - in SPKG.txt, the prerequisites have been updated. [[BR]]
 >  - the patches now use "patch" for their application. [[BR]]
 >  - the patches are divided into ones specifically for Darwin, and ones
 for all platforms. [[BR]]
 >  - the Darwin patch passes 'libpng12' or 'libpng' to `try_pkgconfig`,
 depending on whether `pkg-config` is installed, instead of just always
 passing 'libpng12'. [[BR]]

 (May also read ''"... instead of just always passing ''' 'libpng' '''"'';
 it is at least not clear to what "instead" refers to, i.e. unmodifed code
 or unconditional application of the patch.)

 >  - as part of the patches from #10159, the installation procedure prints
 Sage's setting of the variable MPLCONFIGDIR. [[BR]]
 >  [...]

 I would have just added the above to the Changelog entry. :)

 [[BR]]

 > I don't really know the purpose of the setupext.py patch, so I don't
 feel qualified to modify what SPKG.txt says. If you have suggestions, I'd
 be happy to hear them.

 I rather meant noting that the patch is only applied on Darwin, and that
 it only changes the behaviour if `pkg-config` is not installed.

 __W.r.t. why this is necessary:__

 The assumption is that when `pkg-config` ''is'' installed, it will always
 pick up Sage's `libpng.pc` (which is a symbolic link to `libpng12.pc`), so
 MPL will always be linked to the correct, i.e. Sage's `libpng`, regardless
 of whether `"libpng"` or `"libpng12"` is used in `try_pkgconfig()`.

 If `pkg-config` is ''not'' available, and you pass just `"libpng"`
 (without `12`) to `try_pkgconfig()`, MPL might pick up some random system
 `libpng` (without the `12`), which can lead to name clashes and other
 errors because two different `libpng`s could be linked into Sage.

 So it should be pretty safe to just always pass `"libpng12"`, no matter
 what operating system and whether `pkg-config` is installed or not --
 Sorry for the previous noise...

 (On the other hand, it's also not bad to only apply such patches on
 [potentially] affected systems; if Sage's `libpng12` one day changes to,
 say, `libpng13`, we'd have to modify MPL for all systems to work. If we
 only used `"libpng12"` on e.g. Darwin instead, only Darwin would break on
 such an upgrade.)

 ----

 Is the following still current (for version 1.x)?
 {{{
 #!python
 ...
 config.add_section('gui_support')
 for backend in ('gtk', 'gtkagg', 'tkagg', 'wxagg', 'macosx', 'windowing'):
     config.set('gui_support', backend,  graphical_backend)
 ...
 }}}

 {{{
 #!sh
 $ hg log -v make-setup-config.py
 changeset:   37:0aef07ceab83
 user:        Jason Grout <[email protected]>
 date:        Fri Jun 11 12:06:36 2010 -0500
 ...
 }}}
 (That's the only entry, corresponding to
 `matplotlib-0.99.3-svn8415.spkg`.)

 I haven't tried to (attempt to) build any graphical backends.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11686#comment:28>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to