Christian Grün wrote:
Hi,
if you delete packages, it is sufficient to specify the namespace, which is why I'm inclined to disallow the installation of a package that has already been installed with a different version - or automatically replace/update it. What do you think?
In xrepo, the command-line program to manage an on-disk repository, the remove operation takes an optional version number as parameter. If it is not there and there is only one version installed, it is removed. If the version number is there, only that version of the package is removed, if any.
Note also that the package is identified by a name, which is a URI, but is not (necessarily) a namespace URI.
Beside that, we may still extend the output of the repo:list() function to sth. similar to the following example:
<package uri="http://www.functx.com" version="1.0"/> ...
What "xrepo list" outputs is something like:
http://example.org/lib/my-pkg 1.0.0, in my-pkg-1.0.0 1.0.1, in my-pkg-1.0.1 http://example.com/lib/something-else 2.3, in something-else-2.3
Of course, this is text-oriented because it is called by humans from the command line, but the idea remains the same (and the "in" is the name of the sub-directory within the repository directory where the package is installed, which might have no sense in a repository not on disk).
alternatives to the EXPath Packaging spec, which are easier to build and maintain.
The versioning issues can seem sometimes a bit of extra work, but in my humble opinion this is a key factor for building a robust, built- to-last packaging system. As per easiness of building packages, you can have a look at XProject at http://expath.org/modules/xproject/, which provides a tool to automatically build a package based on few meta-information about the project itself and annotations within the components (or directly the target namespace within the XQuery library modules).
In particular, there is a plugin for oXygen that contains everything ready-to-be-installed in oXygen and providing all features via simple buttons: http://expath.org/modules/xproject/oxygen.
Regards,
-- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/