#11760: 'sage-location' shouldn't "initialize" .pc (pkg-config) files more than
once
-----------------------+----------------------------------------------------
Reporter: leif | Owner:
Type: defect | Status: needs_review
Priority: blocker | Milestone: sage-4.7.2
Component: scripts | Keywords: pkgconfig libpng Duplicate definition
SAGE_ROOT
Work_issues: | Upstream: N/A
Reviewer: | Author: Leif Leonhardy
Merged: | Dependencies:
-----------------------+----------------------------------------------------
Comment(by jhpalmieri):
Regarding the comment
{{{
Will have weird effects in case SAGE_ROOT_absolute contains other
characters having special
meaning in regular expressions.
}}}
You could use [http://docs.python.org/library/re.html#re.escape re.escape]
to deal with this issue.
In `update_pkgconfig_files`, the code
{{{
# Delete all previous definitions of SAGE_ROOT:
config = def_pat.sub("", config)
}}}
The `sub` method only replaces one definition, not all of them. There
should be only one at this point anyway, of course. Perhaps change the
comment to reflect this?
Otherwise, the combined patch looks pretty good to me. I still have to
actually test it...
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11760#comment:17>
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.