Re: ebuilds in XML
Uwe Reimann <[email protected]> Mon, 30 Jun 2003 03:27:27 +0200
| Newsgroups | gmane.linux.zynot.general |
|---|---|
| Message-ID | <[email protected]> |
Benjamin Judas wrote:
> Here is my idea of the ebuilds in XML:
>
> I am thinking of an ebuild completely written in XML.
This might be interesting. But I think we should think about the
features out package manager should have and then whether XML is the
technologie that best fits our requirements.
> When "emerging" a special xslt is applied to the XML-file which translates the
> XML-file into a regular shell-script which then is executed.
Unless we don't have any other use cases than generating shell scripts
out of the XML files, why should we wrap them in XML at all? Sure, there
are more use cases, like generating a web site describing the builds for
example. We should collect them to actually have a reason to use XML.
> Pleas see the attachments. I know, they aren't very impressive - it's just an
> example, how to translate them into a shell-script.
Benjamin, please consider some more complex dependencies. For example,
let a package depend on glibc>=2.2.3 and glibc<=2.2.5. I think, there
are some different ways to handle this. I am not happy with any of them:
1.: <package>2.2.3<=glibc<=2.2.5</package>
2.: <package>>=glibc-2.2.3 &&
<=glibc-2.2.5</package>
Those two have in common, that the dependency itself is not expresses in
XML. You still need a parser (which could be a shell) to compute the
dependency. So, XML is not much more than a wrapper. We won't be using
the power XML provides in those cases.
3.: <dep type="minimal">
<package version="2.2.3">glibc</package>
</dep>
<dep type="maximal">
<package version="2.2.5">glibc</package>
</dep>
It's not the syntax that matters here. The point is, that dependencies
are expressed in the semantics XML provides. I consider this to be a
good thing. My problem with that is, that this is much more to write.
Taken to the maximum, we'ld end up with some XML tags even for a simple
copy. Take ant's build scripts as an example. Ant is great, I use it for
all my java projects, but the scripts are not that easy to read.
> Take this as an impressive idea.
I am impressed by the power XML provides. I am not (yet) convinces, that
using it is a good idea.
> regards,
> Benjamin "beejay" Judas
>
Best regards, Uwe
> P.S. : I call the ebuilds "receipts" since they are receipts how to compile
> and install a package