[aur-dev] [PATCH] Use bash script to parse pkgbuilds

Sebastian Nowicki sebnow at gmail.com
Thu Jun 12 14:17:39 EDT 2008


On 10/06/2008, at 12:16 AM, Callan Barrett wrote:

> On Sun, Jun 8, 2008 at 7:19 PM, Callan Barrett  
> <wizzomafizzo at gmail.com> wrote:
>> Ok this is a test to get a bash script to parse pkgbuilds rather than
>> the current crazy way it's done now.
>>
>> The pkgbuild is sent through a bash script (thanks Xilon) and the  
>> vars
>> are output so the result can be evaluated by PHP, this way nothing  
>> can
>> get missed and there are no bugs with what's parsed. This also gets
>> rid of the package contents stuff, didn't really have a choice but it
>> seems it's not used for anything, only wasted space. As far as I can
>> tell this fixes about 4 bugs currently open on the bug tracker so
>> aside from being a huge improvement over the current parsing stuff
>> (has anyone ever looked at what that parses, wow) it also fixes a lot
>> of bugs. The only downside to it is we can't tell whether a variable
>> actually exists or is just empty so no more hand holding and doing
>> some faux validation, we parse what we need and the rest of the
>> pkgbuild is up to the maintainer.
>>
>> Although I'm not suggesting we apply *this* patch to the AUR I am
>> suggesting we apply some cleaned up form of it since it would be a
>> great improvement. This patch does work fine by the way it's just a
>> bit messy.
>>
>> --
>> Callan Barrett
>>
>
> Note to self: restricted mode is apparently not as restricted as it
> sounds, need to look into that and probably how namcap deals with it.

What do you mean? If the path is set to nothing, executables sare not  
found, so any sort of "rm -rf /" spits out an error. I tested it quite  
a bit with various commands like that - they don't work.

Btw, credit should really go to namcap, I just modified the script  
that's used there.

ps. WWDC is awesome!




More information about the aur-dev mailing list