Re: Setting default version in Poudriere

From: Edward Sanford Sutton, III <mirror176_at_hotmail.com>
Date: Fri, 05 Jul 2024 08:57:19 UTC
On 7/4/24 13:57, Pat wrote:
> Hello,
> 
> Got a couple of rather silly question, but I can't find a definitive 
> answer to either.
> 
> If I build PostgreSQL15-server, I get version 15.7. That is the latest 
> version, so not unexpected.
> 
> I would like to build version 15.6. Ideally I would like to have both 
> versions available because for the most part I want to install 15.7, but 
> I need 15.6 at the moment.
> 
> So my questions are:
> How do I configure things to have both versions available?
> If that is not possible, how do I set the default to be 15.6 for now, 
> with the intent of undoing that after my testing?

   There is only one port for version 15; to use 15.6 you need a copy of 
the ports tree with any git commit from 
6fa897631d45dd11a5b1fcea5993590f9ccbef48 to before 
ade1c57e3a72ec9c4a7c02ce28dbfbd5efcce373 (probably 
de67baaee9ffaf88fa80dcda1f89d83df424d0a4 but I'm bad at sorting through 
git hashes). You could also manually patch the tree to have an older 
copy in place of the newer one.
   With poudriere, you can have multiple ports trees which once created 
you can then select for tasks such as `poudriere bulk -j 14 -p outdated 
databases/postgresql15-server`
   I'm not sure how easily you can have just a directory separate from 
the ports tree for poudriere to use in a port's place but tools such as 
ports-mgmt/portdowngrade may simplify the process for downgrading the 
port but I haven't tried it since git.
   If you want both versions available simultaneously from 1 poudriere 
run, I presume you need to add a new unique tree entry that is a copy of 
15.6 under its own named path and add it to databaes's Makefile. If you 
are just doing some a/b testing where you want to keep bouncing back and 
forth, I'd just have the tree with the old version as a separate ports 
tree and do the poudriere build of it and the updated version as 2 
separate repos then change which one pkg looks at and (force?) 
installation of packages for each test.

> Thanks,
> Pat