From: Fabian Groffen Date: Sun, 2 Aug 2009 14:27:30 +0000 (-0000) Subject: fix bad substitution in pym/portage/const_autotool.py (disappearing backslashes)... X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=504f6c7ba11dabdf6857235b70c556ba5232a705;p=portage.git fix bad substitution in pym/portage/const_autotool.py (disappearing backslashes), bug #279550 svn path=/main/branches/prefix/; revision=13875 --- diff --git a/subst-install.in b/subst-install.in index d02968e0a..566555064 100644 --- a/subst-install.in +++ b/subst-install.in @@ -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 @@ sedexp=( -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" )