Gentoo Archives: gentoo-commits

From: "Fabian Groffen (grobian)" <grobian@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r13875 - main/branches/prefix
Date: Sun, 02 Aug 2009 14:27:39
Message-Id: E1MXc2D-0000O0-NG@stork.gentoo.org
1 Author: grobian
2 Date: 2009-08-02 14:27:30 +0000 (Sun, 02 Aug 2009)
3 New Revision: 13875
4
5 Modified:
6 main/branches/prefix/subst-install.in
7 Log:
8 fix bad substitution in pym/portage/const_autotool.py (disappearing backslashes), bug #279550
9
10 Modified: main/branches/prefix/subst-install.in
11 ===================================================================
12 --- main/branches/prefix/subst-install.in 2009-08-01 20:02:37 UTC (rev 13874)
13 +++ main/branches/prefix/subst-install.in 2009-08-02 14:27:30 UTC (rev 13875)
14 @@ -4,6 +4,16 @@
15 prefix="@prefix@"
16 exec_prefix="@exec_prefix@"
17
18 +# for bug #279550 we have to do some nasty trick to make sure that sed
19 +# doesn't strip the backslash in the replacement value (because it can
20 +# be a backreference) and hence escape those.
21 +rootuser="@rootuser@"
22 +portagegroup="@portagegroup@"
23 +portageuser="@portageuser@"
24 +rootuser=${rootuser//\\/\\\\}
25 +portagegroup=${portagegroup//\\/\\\\}
26 +portageuser=${portageuser//\\/\\\\}
27 +
28 # there are many ways to do this all dynamic, but we only care for raw
29 # speed here, so let configure fill in this list and be done with it
30 at='@'
31 @@ -24,11 +34,11 @@
32 -e "s,${at}PORTAGE_WGET${at},@PORTAGE_WGET@,g"
33 -e "s,${at}PORTAGE_XARGS${at},@PORTAGE_XARGS@,g"
34 -e "s,${at}datadir${at},@datadir@,g"
35 - -e "s,${at}portagegroup${at},@portagegroup@,g"
36 - -e "s,${at}portageuser${at},@portageuser@,g"
37 + -e "s,${at}portagegroup${at},${portagegroup},g"
38 + -e "s,${at}portageuser${at},${portageuser},g"
39 -e "s,${at}rootgid${at},@rootgid@,g"
40 -e "s,${at}rootuid${at},@rootuid@,g"
41 - -e "s,${at}rootuser${at},@rootuser@,g"
42 + -e "s,${at}rootuser${at},${rootuser},g"
43 -e "s,${at}sysconfdir${at},@sysconfdir@,g"
44 )