public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r13875 - main/branches/prefix
@ 2009-08-02 14:27 Fabian Groffen (grobian)
  0 siblings, 0 replies; only message in thread
From: Fabian Groffen (grobian) @ 2009-08-02 14:27 UTC (permalink / raw
  To: gentoo-commits

Author: grobian
Date: 2009-08-02 14:27:30 +0000 (Sun, 02 Aug 2009)
New Revision: 13875

Modified:
   main/branches/prefix/subst-install.in
Log:
fix bad substitution in pym/portage/const_autotool.py (disappearing backslashes), bug #279550

Modified: main/branches/prefix/subst-install.in
===================================================================
--- main/branches/prefix/subst-install.in	2009-08-01 20:02:37 UTC (rev 13874)
+++ main/branches/prefix/subst-install.in	2009-08-02 14:27:30 UTC (rev 13875)
@@ -4,6 +4,16 @@
 prefix="@prefix@"
 exec_prefix="@exec_prefix@"
 
+# for bug #279550 we have to do some nasty trick to make sure that sed
+# doesn't strip the backslash in the replacement value (because it can
+# be a backreference) and hence escape those.
+rootuser="@rootuser@"
+portagegroup="@portagegroup@"
+portageuser="@portageuser@"
+rootuser=${rootuser//\\/\\\\}
+portagegroup=${portagegroup//\\/\\\\}
+portageuser=${portageuser//\\/\\\\}
+
 # there are many ways to do this all dynamic, but we only care for raw
 # speed here, so let configure fill in this list and be done with it
 at='@'
@@ -24,11 +34,11 @@
 	-e "s,${at}PORTAGE_WGET${at},@PORTAGE_WGET@,g"
 	-e "s,${at}PORTAGE_XARGS${at},@PORTAGE_XARGS@,g"
 	-e "s,${at}datadir${at},@datadir@,g"
-	-e "s,${at}portagegroup${at},@portagegroup@,g"
-	-e "s,${at}portageuser${at},@portageuser@,g"
+	-e "s,${at}portagegroup${at},${portagegroup},g"
+	-e "s,${at}portageuser${at},${portageuser},g"
 	-e "s,${at}rootgid${at},@rootgid@,g"
 	-e "s,${at}rootuid${at},@rootuid@,g"
-	-e "s,${at}rootuser${at},@rootuser@,g"
+	-e "s,${at}rootuser${at},${rootuser},g"
 	-e "s,${at}sysconfdir${at},@sysconfdir@,g"
 )
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-08-02 14:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-02 14:27 [gentoo-commits] portage r13875 - main/branches/prefix Fabian Groffen (grobian)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox