Hi, I''ve just installed 0.22.2 and believe I''ve discovered a bug (or oversight). I have an exec like this: exec { "change-to-local-mirror": command => "sed -i ''s#\(KERNEL_REPO.*=\).*#\1 $mirror#'' ${rulefile}", path => "/usr/bin:/usr/sbin:/bin", cwd => "/usr/src/xen-${xenrelease}_${xenpatchlevel}-src/buildconfigs/", logoutput => "true", before => Exec["make-prep-kernels"]; } Version 0.22.1 ran ok but version 0.22.2 produces the following warning: warning: Unrecognised escape sequence ''\('' in file /srv/puppet/manifests/classes/build-xen-kernel2.pp at line 160 warning: Unrecognised escape sequence ''\)'' in file /srv/puppet/manifests/classes/build-xen-kernel2.pp at line 160 warning: Unrecognised escape sequence ''\1'' in file /srv/puppet/manifests/classes/build-xen-kernel2.pp at line 160 As these are valid escape sequences for the sed statement is this an oversight or bug? If not, what is the correct way to deal with the above case. Thanks, Andrew _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 20 March 2007 10:13, Andrew Leach wrote:> Hi, > > I've just installed 0.22.2 and believe I've discovered a bug (or > oversight). > > I have an exec like this: > exec { "change-to-local-mirror": > command => "sed -i 's#\(KERNEL_REPO.*=\).*#\1 > $mirror#' ${rulefile}", > path => "/usr/bin:/usr/sbin:/bin", > cwd => > "/usr/src/xen-${xenrelease}_${xenpatchlevel}-src/buildconfigs/", > logoutput => "true", > before => > Exec["make-prep-kernels"]; > } > > Version 0.22.1 ran ok but version 0.22.2 produces the following warning: > warning: Unrecognised escape sequence '\(' in file > /srv/puppet/manifests/classes/build-xen-kernel2.pp at line 160 > warning: Unrecognised escape sequence '\)' in file > /srv/puppet/manifests/classes/build-xen-kernel2.pp at line 160 > warning: Unrecognised escape sequence '\1' in file > /srv/puppet/manifests/classes/build-xen-kernel2.pp at line 160 > > As these are valid escape sequences for the sed statement is this an > oversight or bug? If not, what is the correct way to deal with the above > case.- From the CHANGELOG[1]: | String escapes parse correctly in all cases now, thanks to a patch by | cstorey. So, yes those are valid escapes for sed, but not for puppet. If you want a backslash "\" in your command you'll need to double it. Regards, David [1] http://reductivelabs.com/svn/puppet/tags/REL_0_22_2/CHANGELOG - -- - - hallo... wie gehts heute? - - *hust* gut *rotz* *keuch* - - gott sei dank kommunizieren wir über ein septisches medium ;) -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF/62P/Pp1N6Uzh0URAm7BAJ9MwSpMNPbJrWcJaXiHy2DGwcBb6gCghN/H /wfECh7ZLOlpYwl4jldzPj0=W01F -----END PGP SIGNATURE----- _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Thanks David. On 20/03/07, David Schmitt <david@schmitt.edv-bus.at> wrote:> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Tuesday 20 March 2007 10:13, Andrew Leach wrote: > > Hi, > > > > I''ve just installed 0.22.2 and believe I''ve discovered a bug (or > > oversight). > > > > I have an exec like this: > > exec { "change-to-local-mirror": > > command => "sed -i > ''s#\(KERNEL_REPO.*=\).*#\1 > > $mirror#'' ${rulefile}", > > path => "/usr/bin:/usr/sbin:/bin", > > cwd => > > "/usr/src/xen-${xenrelease}_${xenpatchlevel}-src/buildconfigs/", > > logoutput => "true", > > before => > > Exec["make-prep-kernels"]; > > } > > > > Version 0.22.1 ran ok but version 0.22.2 produces the following warning: > > warning: Unrecognised escape sequence ''\('' in file > > /srv/puppet/manifests/classes/build-xen-kernel2.pp at line 160 > > warning: Unrecognised escape sequence ''\)'' in file > > /srv/puppet/manifests/classes/build-xen-kernel2.pp at line 160 > > warning: Unrecognised escape sequence ''\1'' in file > > /srv/puppet/manifests/classes/build-xen-kernel2.pp at line 160 > > > > As these are valid escape sequences for the sed statement is this an > > oversight or bug? If not, what is the correct way to deal with the above > > case. > > - From the CHANGELOG[1]: > > | String escapes parse correctly in all cases now, thanks to a patch by > | cstorey. > > > So, yes those are valid escapes for sed, but not for puppet. If you want a > backslash "\" in your command you''ll need to double it. > > > > Regards, David > > [1] http://reductivelabs.com/svn/puppet/tags/REL_0_22_2/CHANGELOG > - -- > - - hallo... wie gehts heute? > - - *hust* gut *rotz* *keuch* > - - gott sei dank kommunizieren wir über ein septisches medium ;) > -- Matthias Leeb, Uni f. angewandte Kunst, 2005-02-15 > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.6 (GNU/Linux) > > iD8DBQFF/62P/Pp1N6Uzh0URAm7BAJ9MwSpMNPbJrWcJaXiHy2DGwcBb6gCghN/H > /wfECh7ZLOlpYwl4jldzPj0> =W01F > -----END PGP SIGNATURE----- > _______________________________________________ > Puppet-users mailing list > Puppet-users@madstop.com > https://mail.madstop.com/mailman/listinfo/puppet-users >_______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users