Commit 9fb8abf3 authored by Michael Hanus's avatar Michael Hanus
Browse files

Update description

parent f44a331b
......@@ -4,8 +4,8 @@ Hints for Package Administraion
This package contains hints for administrating packages
with the Curry Package Manager. The use of the package manager
is described in the
[manual of CPM](http://www-ps.informatik.uni-kiel.de/currywiki/_media/tools/cpm/manual.pdf)
and the [wiki page](http://www-ps.informatik.uni-kiel.de/currywiki/tools/cpm)
[manual of CPM](https://www-ps.informatik.uni-kiel.de/~cpm/DOC/cpm-3.1.0/manual.pdf)
and the [CPM's web page](http://www.curry-lang.org/tools/cpm)
contains a short introduction into its use.
Hence, the infos given here are for advanced use of CPM
......@@ -37,8 +37,8 @@ internal directories wen using one of the Curry systems.
This can easily be done with the shell script `cpm-switch`
stored in the directory `scripts` of this package.
In order to switch to some Curry system, e.g., `mycurry`,
create a file `.cpmrc_mycurry` in your home directory
In order to switch to some Curry system, e.g., `MYCURRY`,
create a file `.cpmrc_MYCURRY` in your home directory
which defines the binary of your Curry system as `curry_bin`.
For instance, it must contain at least the line
......@@ -47,18 +47,24 @@ For instance, it must contain at least the line
Then you can configure your local CPM files to use this
system by the command
cpm-switch mycurry
cpm-switch MYCURRY
This script puts some symbolic links for `.cpm/bin`
and copies the content of `.cpmrc_mycurry` into `.cpmrc`.
and copies the content of `.cpmrc_MYCURRY` into `.cpmrc`.
By defining a different `.cpmrc_` file, you can switch between
different Curry systems.
When `cpm-switch` is called with option `none`, i.e.,
cpm-switch none
then the configuration set by a previous call to `cpm-switch` is removed.
Uploading and updating packages in the global repository
--------------------------------------------------------
If the package source is stored on the git server
If the package source is stored on the CPM standard git server
<https://git.ps.informatik.uni-kiel.de>, i.e., the source specification
of the package has the form
......@@ -77,73 +83,5 @@ CPM's `upload` command, e.g.,
(available from version 2.1.0).
Otherwise, the package `cpm-manage` contains a simple tool to support
uploading and updating packages. Note the this
requires write access to the
[global package repository](https://git.ps.informatik.uni-kiel.de/curry-packages/cpm-index)!
To install the tool, run
> cypm install cpm-manage
Then you can use the following commands:
Uploading a new package:
------------------------
First, put the package into some git repo and set the source
specification in `package.json` to the URI of this repo.
Then go into the package (where the file `package.json` is stored)
and run
> cpm-manage add
This command tags the repo with the version number specified
in `package.json`, tests the package with `cypm test` and,
if everything is successful, updates your local copy of the global index.
Then it shows you a shell command to be executed to really
update the global index.
The same command could be used to upload a new version of some package,
but please read the following paragraph.
Updating a package:
-------------------
Due to the missing database infrastructure of the current CPM
implementation, one should avoid to create too many versions
of a package (since this slows down the use of CPM).
Hopefully, this will change in the near future.
For the time being, one can update an existing package
with the same version number. This could be done by
storing the updated package in its git repo and running the command
> cpm-manage update
This command re-tags the repo with the version number specified
in `package.json`, tests the package with `cypm test` and,
if everything is successful, updates your local copy of the global index.
If something was changed also in `package.json`, the
global index must also be updated, i.e., one has to go into
`~/.cpm/index` and push the updates to the global index.
Testing all packages:
---------------------
One can checkout and test all packages (compatible to your current
Curry system) by the command
> cpm-manage testall
Of course, this needs some time...
Showing a dependency graph of all packages:
-------------------------------------------
This can be done with the command
> cpm-manage showgraph
For packages whose source is stored on other servers, contact
the CPM team at `packages@curry-lang.org` to initiate the upload process.
......@@ -6,18 +6,24 @@ if [ $# -eq 0 ] ; then
CURRYSYSTEM=`expr $0 : '.*cpm-switch-\(.*\)'`
if [ -z "$CURRYSYSTEM" ] ; then
echo "Usage: cpm-switch <curry-system>"
echo "where <curry-system> is pakcs, kics2,..."
echo "where <curry-system> is none|pakcs|kics2|..."
exit 1
fi
elif [ $# -eq 1 ] ; then
CURRYSYSTEM=$1
else
echo "Usage: cpm-switch <curry-system>"
echo "where <curry-system> is pakcs, kics2,..."
echo "where <curry-system> is none|pakcs|kics2|..."
exit 1
fi
echo "Switching CPM config dirs to Curry system '$CURRYSYSTEM'..."
if [ $CURRYSYSTEM = none ] ; then
echo "Removing CPM config dirs..."
rm -rf $HOME/.cpm/bin $HOME/.cpmrc
exit
else
echo "Switching CPM config dirs to Curry system '$CURRYSYSTEM'..."
fi
# set ~/.cpmrc:
if [ ! -f $HOME/.cpmrc_$CURRYSYSTEM ] ; then
......@@ -29,7 +35,7 @@ fi
rm -f $HOME/.cpmrc && cp -p $HOME/.cpmrc_$CURRYSYSTEM $HOME/.cpmrc
# set cpm bin dir:
rm -f $HOME/.cpm/bin
rm -rf $HOME/.cpm/bin
mkdir -p $HOME/.cpm/bin_$CURRYSYSTEM
ln -s $HOME/.cpm/bin_$CURRYSYSTEM $HOME/.cpm/bin
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment