Re: make dist using git archive - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: make dist using git archive
Date
Msg-id dbff5b4f-21a9-4340-82ee-884b13ee6a3d@eisentraut.org
Whole thread Raw
In response to Re: make dist using git archive  ("Tristan Partin" <tristan@neon.tech>)
Responses Re: make dist using git archive
Re: make dist using git archive
List pgsql-hackers
On 25.01.24 17:25, Tristan Partin wrote:
> The way that this currently works is that you will fail at configure 
> time if bz2 doesn't exist on the system. Meson will try to resolve a 
> .path() method on a NotFoundProgram. You might want to define the bz2 
> target to just call `exit 1` in this case.
> 
> if bzip2.found()
>   # do your current target
> else
>   bz2 = run_target('tar.bz2', command: ['exit', 1])
> endif
> 
> This should cause pgdist to appropriately fail at run time when 
> generating the bz2 tarball.

Ok, done that way.

> For what it's worth, I run Meson 1.3, and the behavior of generating the 
> tarballs even though it is a dirty tree still occurred. In the new patch 
> you seem to say it was fixed in 0.60.

The problem I'm referring to is that before 0.60, alias_target cannot 
depend on run_target (only "build target").  This is AFAICT not 
documented and might not have been an intentional change, but you can 
trace it in the meson source code, and it shows in the PostgreSQL CI. 
That's also why for the above bzip2 issue I have to use custom_target in 
place of your run_target.

Attachment

pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: Small fix on COPY ON_ERROR document
Next
From: "David G. Johnston"
Date:
Subject: Re: Small fix on COPY ON_ERROR document