On 2/24/08, Felipe Contreras <[EMAIL PROTECTED]> wrote:
> On Sat, Feb 23, 2008 at 10:45 PM, Alec Warner <[EMAIL PROTECTED]> wrote:
>  > On 2/20/08, Felipe Contreras <[EMAIL PROTECTED]> wrote:
>
> >  >  b) Error are difficult to handle since bash doesn't have exceptions
>  >
>  >  I disagree here: most errors are fatal anyway any non fatal errors can
>  >  be printed and saved via the elog facility.
>
>
> Yes, for the most common usage that's true, but that think about this
>  example: I'm compiling gstreamer-plugins-good, which needs libraw1394,
>  but the compilation fails, perhaps that user is not interested in that
>  particular plugin so a dialog can pop up and the user can choose if to
>  continue without the libraw stuff or fail.
>
>  I'm sure that can be done without exceptions but as the complexity
>  increases properly checking/passing around error values/messages
>  becomes tedious.

This has nothing to do with the build system and everything to do with
the package manager actually processing information provided.

>
>
>  >  >  c) Persistent information is difficult to achieve (no database stuff)
>  >
>  >  How is this a bash limitation?  Most languages don't have 'database
>  >  stuff' built in.
>  >  I don't see how saving stuff to files is much different than the env
>  >  dumping we do in bash?
>
>
> I guess it's mostly the burden of serializing/parsing all that stuff.

But the code is written already...

>
>
>  >  >  A more featured language could allow for example: filtered output,
>  >  >  exception handling->state storage->resuming.
>  >  >
>  >  >  But the big deal is with the package definition, recently I learned
>  >  >  about Domain Specific Languages, and I think that is the best option.
>  >  >
>  >  >  A new dsl allows many interesting features in the package definition
>  >  >  itself like: inheritance, exceptions, arrays, hash tables, objects,
>  >  >  modules, documentation, information messages, etc.
>  >
>  >  Note that most languages allow for the same things...so why would we
>  >  author our own language?  What runtime would it use?
>
>
> The language can be something very simple that has bash embedded. That
>  has the advantage that you can just copy paste what you are doing
>  already.
>
>  As more ideas appear the DSL can be updated, but still, the embedded
>  bash would always be there.
>
>  <snip/>
>
> >  >  This is based on an already working prototype made in Ruby, so it's
>  >  >  biased towards Ruby facilities.
>  >
>  >  It looks Rakish ;)
>
>
> Perhaps, the only interesting thing here is that those commands are
>  not defined internally. There's an auxiliary bash shell that is
>  running those commands. Not like "system" calls, which loose the
>  environment between calls, this is something that cooperates nicely.
>
>
>  >  >  I've tried different build systems: rpm, dpkg, autopackage.
>  >  >  Unfortunately I never tried ebuild because it was based on bash as far
>  >  >  as I could tell.
>  >
>  >  Typically a 'build system' would refer to 'autotools' or 'ant' or
>  >  'setuptools' not an ebuild.
>
>
> Is there such a big difference?
>
>  I'm sure it's possible to by-pass autotools and write down all the
>  commands required to build something in an ebuild. Similarly it's
>  possible to use autotools to compile and install a bunch of packages.
>
>  Those "build systems" also need to be updated, but that's another story.

Updating for the sake of 'stuff being old' is not a compelling case.

>
>
>  >  >  After almost a decade of using Linux I still haven't found a build
>  >  >  system that suits all my needs. AFAIK ebuild is the most advanced but
>  >  >  it's still relying on ancient technology (bash scripts) so there will
>  >  >  always be limitations despite the brilliant ideas.
>  >
>  >  Bash is not 'ancient' and it works suprisingly well for the vast
>  >  majority of cases.  I realize using a high level language would
>  >  probably make some tasks easier (mmm dicts and real arrays).  There is
>  >  the matter of porting over 10000 ebuilds however ;)
>
>
> Yeah, bash is pretty good for many things, just doesn't scale that much.
>
>  At some point someone decided the current status was not good enough
>  and decided to create ebuild, even though he was well aware that
>  thousands of already existing instructions about how to build packages
>  would have to be re-written.
>
>  If it's easy to write people will possibly even write more of those.
>  Take for example ArchLinux which also has around 10,000 packages
>  simply because it's so easy to write them.
>
>  And with something that is distribution agnostic, different
>  communities can benefit from sharing the same rules.

What is 'distribution agnostic'?

Technically most things are; rpm is used by many distros and is
basically similar to what we have (phases, a meta language used to
move files around, bad dependencies).  So is a debian rules file.  How
are these 'distro specific'?

>
>
>  >  >
>  >  >  The core of a distribution is the "packaging" system, and the core of
>  >  >  the packaging system is the building system, which has no reason not
>  >  >  to be distribution agnostic, and actually, packaging system agnostic.
>  >  >
>  >  >  Why not create a new build system with a state of the art programming
>  >  >  language, and an advanced DSL that actually other distributions could
>  >  >  use?
>  >
>  >  I would talk to Drobbins, he was talking about something like this to
>  >  manage complexity.
>
>
> Will do.

So the biggest problem I see here is that this all seems like academic
handwaving.  You don't move from an established yet complex format
like ebuild to some other random format that no one has ever used
before.  Someone needs to come up with something, foster it, get 500
packages written that use it with a package manager that can actually
install them.. Spell out the advantages of why the new format kicks
ass and what it gives over the others (rpm, ebuild, deb, others...)
and then maybe people will move.

I would posit that most developers don't care because ebuild works for
them and there exists a small percentage of packages that could
benefit from a better system.

>
>  Best regards.
>
>
>  --
>
> Felipe Contreras
>  --
>  gentoo-dev@lists.gentoo.org mailing list
>
>
-- 
gentoo-dev@lists.gentoo.org mailing list

Reply via email to