7

I am creating a package that needs to depend on a package if another is installed, but needs a different dependency if no such package is installed. Is that possible using just the control file of the .deb, or are other tools needed? This package is actually meant for Ubuntu, so any tools unavailable in Ubuntu repositories can't be used.

  • The control file is static so no you can't change dependencies based on if a package is installed or not. What exactly do you want to achieve? Maybe have a look at Provides or do something like Depends: NotInstalled | Installed, – Ulrich Dangel Aug 3 '12 at 13:45
  • @UlrichDangel Can you add that as an answer? – hexafraction Aug 3 '12 at 13:51
7

The control file is static so no you can't change dependencies on some external parameters but the Debian Policy specifies | as a way to specify alternative package names, in your case it would be something like:

Depends: Package1 | Package2

where Package1 is the default dependency.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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