Re: [aur-dev] Safe and relatively reliable PKGBUILD parser.

2010-01-09 Thread Sebastian Nowicki
On 09/01/2010, at 2:50 AM, Xyne wrote: What was the problem with that from Sebastian which was discussed earlier on the mailing lists, IRCs ? How does it know more ? I don't know. I wrote this because I needed a PKGBUILD parser in Perl for Bauerbill. Maybe it's better, maybe it's worse. I

Re: [aur-dev] Safe and relatively reliable PKGBUILD parser.

2010-01-09 Thread Xyne
It is quite a clever idea. I haven't seen this approach before. I haven't looked at it thoroughly, but it looks like you're simply sourcing the PKGBUILD with some trickery not to execute the code. Why then the need for further parsing? Does `set` produce raw bash, e.g.

Re: [aur-dev] Safe and relatively reliable PKGBUILD parser.

2010-01-09 Thread Loui Chang
On Sat 09 Jan 2010 21:23 +0100, Xyne wrote: You haven't fully understood how it works so I hope you don't mind if I try to explain it again. I first check the PKGBUILD with /bin/bash -n PKGBUILD. If this command exits without error then the PKGBUILD contains valid syntax, most importantly

Re: [aur-dev] patch for AUR about setting the DEFAULT_LANG

2010-01-09 Thread Loui Chang
On Mon 30 Nov 2009 17:27 +0800, Athurg Gooth wrote: When i port a chinese version AUR, I fount this bug. That once i setting a default language to sth(eg: zh_CN) by change DEFAULT_LANG macr define in web/lib/config.inc, it won't work, and this language page(here is zh_CN) could not show its

Re: [aur-dev] Safe and relatively reliable PKGBUILD parser.

2010-01-09 Thread Xyne
Loui Chang wrote: Wow this is quite clever. It definitely would make the job of parsing much easier. Thanks for the explanation. :) I intend to flesh out the parser as special cases pop up. As already mentioned, there will be limits to what it can do depending on whether the packager uses