Thread: Missing virtual provides on postgresql-9.4 deb

Missing virtual provides on postgresql-9.4 deb

From
James Laska
Date:
Greetings,

While installing postgresql-9.4, I noticed that the deb does not offer a `Provides: postgresql`.  I believe the convention for the comparable rpm builds is to offer a virtual provides so that any packages requiring the `postgresql` server capability continue to function after installing postgresql-9.4, but removing the Ubuntu-packaged `postgresql` package.

It seems this convention was followed for the postgresql-client-9.4 as it offers the following virtual Provides:

Provides: postgresql-client

Any reason not to add the following virtual provides to the `control` file for the postgresql-9.4 deb package?

Provides: postgresql

Thanks,
James

Re: Missing virtual provides on postgresql-9.4 deb

From
Christoph Berg
Date:
Re: James Laska 2015-06-24 <CAFyeYZ4xvd4O8JrOx=uydMSoQMW5XtHS_t5eWBxYboCwo0NdyQ@mail.gmail.com>
> While installing postgresql-9.4, I noticed that the deb does not offer a
> `Provides: postgresql`.  I believe the convention for the comparable rpm
> builds is to offer a virtual provides so that any packages requiring the
> `postgresql` server capability continue to function after installing
> postgresql-9.4, but removing the Ubuntu-packaged `postgresql` package.
>
> It seems this convention was followed for the postgresql-client-9.4 as it
> offers the following virtual Provides:
>
> Provides: postgresql-client
> >
>
> Any reason not to add the following virtual provides to the `control` file
> for the postgresql-9.4 deb package?
>
> Provides: postgresql

Hi,

the problem here is that "postgresql" is a real package as well. If
something "Depends: postgresql" to get the 'current' server version as
defined by that package, that shouldn't be satisfied by some other
postgresql-x.y package.

Now you could argue that the same holds for the client package, though
the client packages are much more interchangeable, while the server
really only works with the same version that wrote the data in PGDATA.
Also, that would break upgrades where we rely on postgresql.deb
pulling in the new version.

I'm not saying we can't change this, though there's some reason behind
the way it currently is. Martin, do you remember if that "Provides:"
mismatch between server and client was intended, or did we just forget
that? Should we rather remove it from the client packages as well?

Christoph
--
cb@df7cb.de | http://www.df7cb.de/

Attachment

Re: Missing virtual provides on postgresql-9.4 deb

From
James Laska
Date:

On Wed, Jun 24, 2015 at 5:02 AM, Christoph Berg <cb@df7cb.de> wrote:
I'm not saying we can't change this, though there's some reason behind
the way it currently is. Martin, do you remember if that "Provides:"
mismatch between server and client was intended, or did we just forget
that? Should we rather remove it from the client packages as well?

My familiarity with virtual provides is so that any packages with have a non-versioned dependency on postgres, will be satisfied by whatever version of postgres* installed.  It's commonly used when co-installing packages of the same name (different versions).  Dependencies that require a specific version should do so in their "Depends" statement.

This convention is already used in the postgresql-9.4 RPM packages, as seen below. 

# rpm -q --provides postgresql94-server
config(postgresql94-server) = 9.4.4-1PGDG.rhel7
postgresql-server
postgresql94-server = 9.4.4-1PGDG.rhel7
postgresql94-server(x86-64) = 9.4.4-1PGDG.rhel7

On RPM based systems, this allows one to install postgresql94-server, and later remove postgresql-server.  The virtual provides ensure any packages with a postgresql-server requirement remain on the system, after `postgresql-server` has been removed (since the dependency is met by postgresql94-server).

Thanks,
James

Re: Missing virtual provides on postgresql-9.4 deb

From
Peter Eisentraut
Date:
On 6/23/15 9:06 PM, James Laska wrote:
> While installing postgresql-9.4, I noticed that the deb does not offer a
> `Provides: postgresql`.  I believe the convention for the comparable rpm
> builds is to offer a virtual provides so that any packages requiring the
> `postgresql` server capability continue to function after installing
> postgresql-9.4, but removing the Ubuntu-packaged `postgresql` package.

What package would want a dependency on a locally installed server but
does not care about the major version of the server package?



Re: Missing virtual provides on postgresql-9.4 deb

From
"Joshua D. Drake"
Date:
On 06/27/2015 04:15 PM, Peter Eisentraut wrote:
>
> On 6/23/15 9:06 PM, James Laska wrote:
>> While installing postgresql-9.4, I noticed that the deb does not offer a
>> `Provides: postgresql`.  I believe the convention for the comparable rpm
>> builds is to offer a virtual provides so that any packages requiring the
>> `postgresql` server capability continue to function after installing
>> postgresql-9.4, but removing the Ubuntu-packaged `postgresql` package.
>
> What package would want a dependency on a locally installed server but
> does not care about the major version of the server package?

psycopg2
php-pg (or whatever it is called)

etc...


--
Command Prompt, Inc. - http://www.commandprompt.com/  503-667-4564
PostgreSQL Centered full stack support, consulting and development.
Announcing "I'm offended" is basically telling the world you can't
control your own emotions, so everyone else should do it for you.


Re: Missing virtual provides on postgresql-9.4 deb

From
Peter Eisentraut
Date:
On 6/27/15 10:14 PM, Joshua D. Drake wrote:
>> What package would want a dependency on a locally installed server but
>> does not care about the major version of the server package?
>
> psycopg2
> php-pg (or whatever it is called)

Those don't depend on server packages.




Re: Missing virtual provides on postgresql-9.4 deb

From
Martin Pitt
Date:
Hello all,

Christoph Berg [2015-06-24 11:02 +0200]:
> I'm not saying we can't change this, though there's some reason behind
> the way it currently is. Martin, do you remember if that "Provides:"
> mismatch between server and client was intended, or did we just forget
> that? Should we rather remove it from the client packages as well?

-server not having a "Provides: postgresql" is very much intended, for
the very reason Peter and you pointed out. I believe with the current
structure of the metapackages we should drop the Provides: from the
-client-X.Y packages as well, to avoid this kind of confusion. If you
don't care about which particular client you want, you generally want
the latest one (as it's able to talk to all server versions), and it
should be upgraded automatically.

Thanks,

Martin
--
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)

Attachment

Re: Missing virtual provides on postgresql-9.4 deb

From
"Joshua D. Drake"
Date:
On 06/27/2015 09:01 PM, Peter Eisentraut wrote:
>
> On 6/27/15 10:14 PM, Joshua D. Drake wrote:
>>> What package would want a dependency on a locally installed server but
>>> does not care about the major version of the server package?
>>
>> psycopg2
>> php-pg (or whatever it is called)
>
> Those don't depend on server packages.
>

Right, sorry.

JD


>


--
The most kicking donkey PostgreSQL Infrastructure company in existence.
The oldest, the most experienced, the consulting company to the stars.
Command Prompt, Inc. http://www.commandprompt.com/ +1 -503-667-4564 -
24x7 - 365 - Proactive and Managed Professional Services!