#11760: 'sage-location' shouldn't "initialize" .pc (pkg-config) files more than
once
-----------------------------+----------------------------------------------
Reporter: leif | Owner:
Type: defect | Status: positive_review
Priority: blocker | Milestone: sage-4.7.2
Component: scripts | Keywords: pkgconfig libpng Duplicate
definition SAGE_ROOT
Work_issues: | Upstream: N/A
Reviewer: John Palmieri | Author: Leif Leonhardy
Merged: | Dependencies:
-----------------------------+----------------------------------------------
Changes (by jhpalmieri):
* status: needs_review => positive_review
* reviewer: => John Palmieri
Comment:
Replying to [comment:18 leif]:
> Replying to [comment:17 jhpalmieri]:
> > The `sub` method only replaces one definition, not all of them.
>
> Nope. The optional `count` parameter defaults to 0, which means replace
all occurrences.
Sorry, I misread the documentation (thought it said "leftmost non-
overlapping occurrence" instead of "leftmost non-overlapping
occurrence'''s'''").
> Btw., with re.escape() typical paths get much longer... 8&
Yes, but you don't have to ever look at them, do you? Just pass them on
to `re`.
Anyway, things look good to me. In testing, the old version acts badly
if, for example, you delete "sage-location.txt", whereas the new version
does a good job of cleaning up the resulting mess. I've tried to break
the new version in other ways, but not successfully. There may still be
holes, but I'm not sure where. In any case, it's an improvement over the
previous version.
(If you feel like adding a comment about re.escape, in case someone else
works on this, go ahead. No need for further review in that case.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11760#comment:23>
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.