On Sun, Sep 23, 2007 at 12:30:21PM +0100, Essien Ita Essien wrote: > Xavier wrote: > > On Sun, Sep 23, 2007 at 09:28:54AM +0100, Essien Ita Essien wrote: > >> yeah... that's my point actually. That we're currently limiting our > >> thinking because we're using bash to interpret the raw PKGBUILD. True a > >> selfwritten parser may not be *that* simple to write... (though its > >> really not that hard to write a custom makepkg script to bash script > >> translator) but if its a path that would be worth investigating, I'm > >> saying we shouldn't limit ourselves just based on the fact that it is > >> currently _directly_ intepreted by bash himself :) > >> > > > > But then, what would be the reason of having makepkg written in bash? > > > > There was a little discussion recently on pacman-dev ML. Someone asked > > why makepkg was written in bash, since this prevents it from using libalpm > > directly. > > For example, pacman has an hidden (undocumented) -T option used only by > > makepkg > > for dependency checking. So if makepkg could use libalpm directly instead, > > it > > would probably be cleaner : > > http://archlinux.org/pipermail/pacman-dev/2007-September/009316.html > > > > The main argument for having makepkg in bash is that PKGBUILDs themselves > > are > > in bash : > > http://archlinux.org/pipermail/pacman-dev/2007-September/009323.html > > hmmm... you know... that is a very good question to (re?)ask. Do we > really need to limit makepkg to be written in bash just because the > PKGBUILDs themselves _have_ to be in bash? > > That aside, there is another approach. We can have a helper program > translate the PKGBUILDs into a bash script just before the rest of > makepkg takes over. Truth be told, our PKGBUILDs are simple and easy to > write and straying far away from our bash origins will _not_ be in our > best intrests. > > I suggest that we make the PKGBUILDs bash scripts with just a little bit > of advancements. We can then use a preprocessor to convert our little > advancements back to pure bash before we bash them! :) > > All in all, its not something that will happen immedietly, but I think > we should remember to Keep Simple Things Simple And No Simpler, But Also > Make Complex Things Possible in A Simple Way.
I'd be surprised if you could write a simple PKGBUILD to bash translator. Parsing "almost bash", understanding the syntax, and then converting it would be pretty complicated. Jason
pgpenIHPoDNuH.pgp
Description: PGP signature
_______________________________________________ arch mailing list arch@archlinux.org http://archlinux.org/mailman/listinfo/arch