petere / pex

light-weight package manager for PostgreSQL
Other
98 stars 2 forks source link

Install specific/older versions #6

Open jacobsvante opened 8 years ago

jacobsvante commented 8 years ago

It would be nice to be able to install specific versions of the extensions.

For example with the following syntax for the .yml package description:

homepage: http://postgis.net/
latest_version: 2.2.2
versions:
  - 2.2.2:
    url: http://download.osgeo.org/postgis/source/postgis-2.2.2.tar.gz
    sha1: f82fa96c4c73e8a94091b51f2e528a8146b03597
  - 2.2.1:
    url: http://download.osgeo.org/postgis/source/postgis-2.2.1.tar.gz
    sha1: 615f86c34ed4431383432d34f4b6d558c71fb94f

The default would be to use the latest available version when installing. To override you would do:

pex install postgis@2.2.1

With above syntax it would be easy to install multiple packages at different versions:

pex install postgis@2.2.1 pg_jobmon pg_partman@2.3.0
petere commented 8 years ago

The intended way to do that is to maintain a branch of the package description files with exactly the package versions you want.

jacobsvante commented 8 years ago

So a branch with one file per version? How does one install from a specific branch in an easy way without knowing all the gritty details?

petere commented 8 years ago

Think of Homebrew. The master branch only provides the latest (or otherwise vetted) version, but if you want to have a different version or something, you edit the repository and store it in a private branch. The user interface to all this is not terribly elegant, but it's the way in general.

jacobsvante commented 8 years ago

Yeah I know that's the way it works with homebrew. Personally I don't like their way of working with different versions, and I've run into issues countless of times when software has required different versions. Especially when it comes to PostgreSQL. But it's your project and your man-hours so the final call is obviously yours to make 😊