Skip site navigation (1) Skip section navigation (2)

Re: Extensions Dependency Checking

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, "pgsql-hackers(at)postgresql(dot)org Hackers" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Extensions Dependency Checking
Date: 2011-04-04 22:43:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Mon, Apr 4, 2011 at 5:48 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> ... In particular I'm really skeptical of the theory that we need
>> or should want version restrictions in Requires references. The
>> equivalent feature in RPM is deprecated for Fedora/RedHat packaging use,
>> and I see no reason why we'd need it more than they do.

> Oh, really?  How can you possibly get by without it?  Dependencies of
> this type are all over the place.

Yeah, but the proposed solution doesn't actually fix the problem.
There are various issues, but the fundamental objection is that when you
really need it the information is usually wrong/obsolete, especially if
it's maintained by hand.  As an example, if we have foo depending on
bar and it says "Requires: bar >= 2.0", that's all well and good, but
it tells us nothing whatsoever about whether this version of foo will
work with bar 3.0, especially if 3.0 postdates the time when the foo
author put that into his specfile.  Maybe we should really interpret
that as "Requires: bar >= 2.0 && < 3.0", or maybe not.  It's also very
easy for foo's author to start using some nice_bar_function() without
realizing that that was actually only added in bar 2.1.

If you want automatic dependency checking to actually do something
useful, you need something very substantially finer-grained and more
complex than this.  In the Fedora world they're mostly depending on
per-shared-library sonames and per-exported-symbol symbol versioning,
and even then it doesn't always do what you wished.  But I'll note
that neither of those mechanisms bothers to infer any version ordering:
either you have a match, or you don't.

The equivalent thing of what's now considered good packaging practice
would probably be to extract lists of specific objects provided or
required by a module, preferably automatically.  The requires side of
that might be doable just by inspecting pg_depend.  The provides side
would be harder, mainly because you'd want some way to omit objects
that are considered purely internal to a module.

Anyway, I'm uneager to adopt a practice that was discredited years ago
among real packaging systems.  I think it'll just delay somebody
deciding to fix it properly.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2011-04-04 22:57:30
Subject: Re: Extensions Dependency Checking
Previous:From: Stephen FrostDate: 2011-04-04 22:41:59
Subject: Re: time table for beta1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group