[pacman-dev] [PATCH] makepkg: trim trailing space from whitespace sensitive vars

2011-11-17 Thread Dave Reisner
Declarations such as: pkgver=2.11# foo will work, but trimming off the comment (without trimming the trailing whitespace) will result in an incorrect validation error. Bash automatically trims this trailing whitespace and does the right thing under the covers, so we should honor this as well.

[pacman-dev] [PATCH] makepkg: trim trailing space from whitespace sensitive vars

2011-11-18 Thread Dave Reisner
This applies to pkgver, pkgrel, and epoch and ensures that any trailing whitespace outside of the context of the variable declaration itself is properly trimmed. The Bash parser will ignore this, and so should we. We don't need to worry about leading space because it would force a syntax error, or

Re: [pacman-dev] [PATCH] makepkg: trim trailing space from whitespace sensitive vars

2011-11-17 Thread Dan McGee
On Thu, Nov 17, 2011 at 1:09 PM, Dave Reisner wrote: > Declarations such as: > > pkgver=2.11    # foo > > will work, but trimming off the comment (without trimming the trailing > whitespace) will result in an incorrect validation error. Bash automatically > trims this trailing whitespace and does

Re: [pacman-dev] [PATCH] makepkg: trim trailing space from whitespace sensitive vars

2011-11-17 Thread Lukas Fleischer
On Thu, Nov 17, 2011 at 08:28:27PM -0600, Dan McGee wrote: > On Thu, Nov 17, 2011 at 1:09 PM, Dave Reisner wrote: > > Declarations such as: > > > > pkgver=2.11    # foo > > > > will work, but trimming off the comment (without trimming the trailing > > whitespace) will result in an incorrect valida

Re: [pacman-dev] [PATCH] makepkg: trim trailing space from whitespace sensitive vars

2011-11-18 Thread Allan McRae
On 18/11/11 12:28, Dan McGee wrote: On Thu, Nov 17, 2011 at 1:09 PM, Dave Reisner wrote: Declarations such as: pkgver=2.11# foo will work, but trimming off the comment (without trimming the trailing whitespace) will result in an incorrect validation error. Bash automatically trims this tr

Re: [pacman-dev] [PATCH] makepkg: trim trailing space from whitespace sensitive vars

2011-11-19 Thread Allan McRae
On 18/11/11 23:35, Dave Reisner wrote: This applies to pkgver, pkgrel, and epoch and ensures that any trailing whitespace outside of the context of the variable declaration itself is properly trimmed. The Bash parser will ignore this, and so should we. We don't need to worry about leading space