From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Fri, 07 Oct 2022 09:38:10 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oghvv-000F71-JQ for lore@lore.pengutronix.de; Fri, 07 Oct 2022 09:38:10 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1oghvt-0005AD-7g; Fri, 07 Oct 2022 09:38:09 +0200 Received: from ptx.hi.pengutronix.de ([2001:67c:670:100:1d::c0]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oghuy-0005A4-Gh; Fri, 07 Oct 2022 09:37:12 +0200 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1oghur-0000cX-MT; Fri, 07 Oct 2022 09:37:05 +0200 Date: Fri, 7 Oct 2022 09:37:05 +0200 From: Michael Olbrich To: Richard OGrady Message-ID: <20221007073705.GJ26936@pengutronix.de> Mail-Followup-To: Richard OGrady , "ptxdist@pengutronix.de" References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [ptxdist] pkg-config-wrapper X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: "ptxdist@pengutronix.de" Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false Hi, On Wed, Oct 05, 2022 at 08:44:44PM +0000, Richard OGrady wrote: > Debugging a prepare stage issue so trying to understand this chunk of code in pkg-config-wrapper. > > for pkg in ${pkgs}; do > if [[ ! " ${whitelist} " =~ " ${pkg} " && ! "${pkg}" =~ '-uninstalled' ]]; then > echo "$(basename ${0}): warning: blocking '${pkg}': not selected by '${PKGCONFIG_WHITELIST_SRC}'" >&${ERROR_FD} > exit 1 > fi > done > > Where does ${whitelist} come from? Have tried to trace this back and best guess is it may come from ../state/${PKGCONFIG_WHITELIST_SRC}. pkgconfig . > > If this is the case, perhaps pkg-config-wrapper can't be used during prepare as the .pkgconfig file isn't there yet? ${whitelist} is defined as PKGCONFIG_WHITELIST_HOST or PKGCONFIG_WHITELIST_TARGET depending on whether the host or cross pkgconfig is called. For example PKGCONFIG_WHITELIST_HOST is used by when the Linux kernel looks for openssl to build a host tool. These variables are filled by the .pkgconfig files from all packages that are selected in the .in file. So those are already available during the prepare stage. During the install stage the new .pkgconfig for the package is created. It is filled with the name of any .pc file the package itself provides and the content of the .pkgconfig files of all direct dependencies. This way, the .pkgconfig will contain all pkg-config packages of the ptxdist package and all its dependencies. So if you hit this then your package is not selecting the necessary dependencies. Btw, if you run ptxdist with '-v' then the full prepare command is logged including PKGCONFIG_WHITELIST_HOST= / PKGCONFIG_WHITELIST_TARGET= environment variables. Take a look, what's actually listed there. Michael -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |