FS#9558 - Regex broken when using _svntrunk where log contains lines starting with 'r' [patch included]
Attached to Project:
Pacman
Opened by Patrick Brennan (pat) - Wednesday, 13 February 2008, 02:34 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 13 February 2008, 02:38 GMT
Opened by Patrick Brennan (pat) - Wednesday, 13 February 2008, 02:34 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 13 February 2008, 02:38 GMT
|
Details
Summary and Info:
When using makepkg against certain SVN based package builds, makepkg exits with the following error: ==> Determining latest svn revision... -> Version found: 3823 emove sed: -e expression #1, char 27: unterminated `s' command This problem occurs as the sed regex attempts to match the SVN revision number which is prefixed with an 'r'. In this case the second line of the SVN log begins with the word 'remove'. I have modified my makepkg script as follows to resolve the issue (this may not be the best approach and may have other edge-cases that also fail): --- makepkg 2008-02-13 14:37:08.000000000 +1300 +++ makepkg~ 2008-02-13 14:36:45.000000000 +1300 @@ -1001,7 +1001,7 @@ newpkgver=$(date +%Y%m%d) elif [ ! -z ${_svntrunk} ] && [ ! -z ${_svnmod} ] ; then msg "$(gettext "Determining latest svn revision...")" - newpkgver=$(svn log $_svntrunk --limit 1 | sed -n 's/^r\([0-9]*\) .*$/\1/p') + newpkgver=$(svn log $_svntrunk --limit 1 | sed -n 's/^r\([^ ]*\) .*$/\1/p') elif [ ! -z ${_bzrtrunk} ] && [ ! -z ${_bzrmod} ] ; then msg "$(gettext "Determining latest bzr revision...")" newpkgver=$(bzr revno ${_bzrtrunk}) This fault should be reproduceable using the following PKGBUILD (at least as of revision 3823 - subsequent revisions may make this fault difficult to reproduce without creating your own SVN repository): pkgname=zaptel-svn-local pkgdesc="Zapatel Drivers for Asterisk" pkgver=1 pkgrel=1 _svntrunk=http://svn.digium.com/svn/zaptel/branches/1.4 _svnmod=zaptel arch=(i686 x86_64) Many Thanks, Patrick Brennan |
This task depends upon
Closed by Dan McGee (toofishes)
Wednesday, 13 February 2008, 02:38 GMT
Reason for closing: Duplicate
Additional comments about closing: Wowzers, two in one day! Dupe of FS#9552
. And this is not high priority...
Wednesday, 13 February 2008, 02:38 GMT
Reason for closing: Duplicate
Additional comments about closing: Wowzers, two in one day! Dupe of