Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have written an application, and I'm now interested in creating a debian package and setting up a PPA. The application is written primarily in XSLT, and includes a very thin front-end that can be written in any language that can access an XSLT processor. I currently have front-ends written in JavaScript (able to run in the browser client, and from the command-line under Rhino) and Python. I'd also like to write a front-end entirely in bash, and simply use one of the command-line XSLT processors available in apt. There are several available via apt, including xsltproc, xalan, and 4suite's xslt processor. I'd like to make the bash front-end flexible so that it is able to use any of these command-line clients, and will simply use whichever is available. My question is, how best can I express in terms of debian's package dependency system the relationship between my package and these three other packages, which is a logical disjunction (OR relationship). My package relies on xsltproc OR 4suite OR xalan. Ideally, when my package is installed, the user should be prompted to choose any of these three package to install as a dependency; and if one of these packages is already installed on the system when my package is installed, then no additional dependencies should be installed. Is such a thing possible with debian packages?

I'd appreciate any guidance into this anyone can offer. Thanks.

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

OR relationships can be expressed like xsltproc | 4suit | xalan in the Depends: field for the binary package in debian/control. The first package on the list will be preferred when none of them are currently on the system.

For further details, see http://www.debian.org/doc/debian-policy/ch-relationships.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.