On Mon, Mar 02, 2015 at 02:11:05PM +0100, Sébastien Jodogne wrote:

> > Again, Debian strictly recommends against modifying files of
> > other packages. However, this might be solved by a (really
> > small) package orthanc-sqlite which CONFLICTS: with
> > orthanc-postgresql, both of which providing orthanc-backend
> > and both providing /etc/init.d/orthanc.init as appropriate.
> > 
> > Orthanc itself would then depend on orthanc-backend (which is
> > satisfied by both -sqlite and -postgresql).
> 
> OK, got it!
> 
> Andreas, if you don't mind, I will therefore modify the "orthanc" package in 
> the following way:
> 
> - All the content of the current "orthanc" package (notably the main binary 
> "/usr/sbin/Orthanc") will be moved to some new package "orthanc-backend",
> - "orthanc" will only provide "/etc/init.d/orthanc",
> - "orthanc" will depend on "orthanc-backend".
> 
> The newly added "orthanc-postgresql" package will:
> 
> - depend on "orthanc-backend",
> - conflict on "orthanc", and
> - provide an alternate version of "/etc/init.d/orthanc" with postgresql in 
> Required-Start and Required-Stop.

While, technically, this should work it does sound a bit
backwards to me.

I would provide the following packages:

        orthanc
                main binary and general infrastructure
                all the non-backend stuff
        orthanc-sqlite
                nearly empty package (?)
                only providing orthanc.init without postgresql
                perhaps providing backup/restore scripts for sqlite DB ?
                Conflicts: orthanc-postgresql
        orthanc-postgresql
                providing orthanc.init with postgresql
                providing PG backend plugin
                Conflicts: orthanc-sqlite

Package orthanc could either Depends: on "orthanc-sqlite |
orthanc-postgresql" in which case either of which would
satisfy the dependency. If either is pre-installed or
co-installed in this invocation of apt-get the other wouldn't
get installed. Both cannot be co-installed at the same time
due to the conflict. One _must_ be installed due to the
Depends.

Alternatively, both -sqlite and -postgresql could Provides: a
(virtual) package "orthanc-backend" which does not contain
anything and doesn't really exist either. Orthanc itself
would then only depend on orthanc-backend (and not both of
-sqlite and -postgresql explicitely). That way, it is a lot
easier to add another backend: Just upload orthanc-oracle
which also Provides: orthanc-backend ...  The drawback is
that you cannot "force" a "preference" (which is possible by
the order of ORed alternatives in "orthanc-sqlite |
orthanc-postgresql".

Pick your poison ...

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346


-- 
To UNSUBSCRIBE, email to debian-med-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/20150302133050.gg11...@hermes.hilbert.loc

Reply via email to