Generalize the sed expression in filter_readonly_variables() so that
authorZac Medico <zmedico@gentoo.org>
Thu, 22 Nov 2007 22:00:36 +0000 (22:00 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 22 Nov 2007 22:00:36 +0000 (22:00 -0000)
it will work with things like 'declare -xr' as well as 'declare -rx'.
(trunk r8605)

svn path=/main/branches/2.1.2/; revision=8606

bin/ebuild.sh

index e03b18fa337de6f07be8de71457793b80537f4ae..8ad15241d260ac05835998218620b4cfe0eeee9a 100755 (executable)
@@ -1394,7 +1394,7 @@ filter_readonly_variables() {
        # listed in READONLY_EBUILD_METADATA, since having any readonly attributes
        # persisting in the saved environment can be inconvenient when it
        # eventually needs to be reloaded.
-       egrep -v -e "${var_grep}" | sed 's:^declare -rx:declare -x:'
+       egrep -v -e "${var_grep}" | sed 's:^declare[[:space:]]\+-\([[:alnum:]]*\)r\([[:alnum:]]*\)[[:space:]]\+:declare -\1\2 :'
 }
 
 # @FUNCTION: preprocess_ebuild_env