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'm working on a project which gets installed as an Ubuntu package. This is part of the code for generating the database (modified):

CREATE EXTENSION plpythonu;

CREATE FUNCTION foo (str text) RETURNS text AS $$
...
$$ LANGUAGE plpythonu;

Because of this, I've put postgresql-plpython on my Depends row.

This works fine as long as I'm simply installing everything on either Ubuntu 12.04 LTS or 14.04 LTS, but I run into problems when I upgrade from 12.04 to 14.04. After the OS upgrade, both PostgreSQL 9.1 and 9.3 are installed pending the database upgrade, but despite this only postgresql-plpython-9.1 (not postgresql-plpython-9.3) is installed. It seems like Ubuntu gets confused when there are two postgresql versions. With only one version, installing postgresql-plpython is not a problem, but with two versions I get

Package postgresql-plpython is a virtual package provided by:
  postgresql-plpython-9.1 9.1.13-0ubuntu0.12.04
  postgresql-plpython-9.3 9.3.5-0ubuntu0.14.04.1
You should explicitly select one to install.

If I manually run apt-get install postgresql-plpython-9.3 before running pg_upgradecluster 9.1 main everything works, but I would prefer it if I could write proper dependencies.

Can I somehow depend on postgresql-plpython being installed for every installed version of postgresql?

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.