Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFYvS-0001Da-EY for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 11:05:46 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFYvQ-0001mB-Sj for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 11:05:44 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFYvQ-0001lV-JR for pgsql-hackers@lists.postgresql.org; Wed, 11 Jan 2023 11:05:44 +0000 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFYvN-0003VU-5S for pgsql-hackers@lists.postgresql.org; Wed, 11 Jan 2023 11:05:43 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.west.internal (Postfix) with ESMTP id C52842B067F3; Wed, 11 Jan 2023 06:05:37 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Wed, 11 Jan 2023 06:05:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1673435137; x= 1673442337; bh=zszfviA7G8/Zj3N4aM5tqAjsi8RIggQLbNpX7gi7Ybk=; b=O MImZzejmaH49hAQ3jtoAv9XMfxlwmnY8Vou6c1myGPQEasZp2RvLbPZ0CE41wxGa vJQ/QWbPh7W1NKdpa5548VIhWE+4qaHMZcTOtdSGI9itzfm7QhhjKs/OL5MXnR9u 2DB7ICPjnxUE9wu74DQ2U5fyluURx5yhFp/jxazgycmmvSvH8SCXAVAnOSJDC3Wf LKWGcgmJy7kOM6OmGJZMfMksf3QDIR7j2RBBNtZh5h0qNrLNnF8SuKiblRDrm/xN P9XEmCoOWF0/5Mb9U9e3yTac1u9zXqgaO4APllfFVuiPcC7cBkNlD25AL1kQhQzk H5p9X8C03fgnzEVve7AdQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrleeggddvvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomheprfgvthgv rhcugfhishgvnhhtrhgruhhtuceophgvthgvrhdrvghishgvnhhtrhgruhhtsegvnhhtvg hrphhrihhsvggusgdrtghomheqnecuggftrfgrthhtvghrnhepheelffeggedujeetiefh leetuddvieffhfffvdejvdffgeejkeduleduheduieefnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepphgvthgvrhdrvghishgvnhhtrhgruhht segvnhhtvghrphhrihhsvggusgdrtghomh X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Jan 2023 06:05:35 -0500 (EST) Message-ID: <2214b8bb-d3e2-5978-049b-43eda65a66a2@enterprisedb.com> Date: Wed, 11 Jan 2023 12:05:34 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: meson oddities Content-Language: en-US To: Andres Freund Cc: Tom Lane , Andrew Dunstan , PostgreSQL Hackers References: <91b563cc-fa78-0011-5efc-ce61d277d64f@dunslane.net> <1197537.1668546515@sss.pgh.pa.us> <20221115234042.zkxyxzv5wgewit33@awork3.anarazel.de> <030d04cc-d4f3-cd28-5bcb-b2b5d00f0015@enterprisedb.com> <20221116164010.uxsrhsqiqhftvkfp@awork3.anarazel.de> <1360237.1668617650@sss.pgh.pa.us> <20221116170747.zpaijt6zz7lgkffd@awork3.anarazel.de> <8efbb197-c55a-0947-35ba-6b8403d9baff@enterprisedb.com> <20230104193502.ax5gmgt6yqznolvm@awork3.anarazel.de> <20230104225354.nye62wttsvmicpzw@awork3.anarazel.de> From: Peter Eisentraut In-Reply-To: <20230104225354.nye62wttsvmicpzw@awork3.anarazel.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 04.01.23 23:53, Andres Freund wrote: >> dir_data = get_option('datadir') >> -if not (dir_data.contains('pgsql') or dir_data.contains('postgres')) >> +if not ((dir_prefix/dir_data).contains('pgsql') or (dir_prefix/dir_data).contains('postgres')) >> dir_data = dir_data / pkg >> endif > Hm. Perhaps we should just test once whether prefix contains pgsql/postgres, > and then just otherwise leave the test as is? There afaict can't be a > dir_prefix/dir_* that matches postgres/pgsql that won't also match either of > the components. You mean something like dir_prefix_contains_pg = (dir_prefix.contains('pgsql') or dir_prefix.contains('postgres')) and if not (dir_prefix_contains_pg or (dir_data.contains('pgsql') or dir_data.contains('postgres')) Seems more complicated to me. I think there is also an adjacent issue: The subdir options may be absolute or relative. So if you specify --prefix=/usr/local and --sysconfdir=/etc/postgresql, then config_paths_data.set_quoted('SYSCONFDIR', dir_prefix / dir_sysconf) would produce something like /usr/local/etc/postgresql. I think maybe we should make all the dir_* variables absolute right at the beginning, like dir_lib = get_option('libdir') if not fs.is_absolute(dir_lib) dir_lib = dir_prefix / dir_lib endif And then the appending stuff could be done after that, keeping the current code.