From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 09 Mar 2023 10:22:03 +0100 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 1paCTK-00EdvG-4F for lore@lore.pengutronix.de; Thu, 09 Mar 2023 10:22:03 +0100 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 1paCTK-0003MR-Bf; Thu, 09 Mar 2023 10:22:02 +0100 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 1paCT9-0003MG-Qd; Thu, 09 Mar 2023 10:21:51 +0100 Received: from mol by ptx.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1paCT9-00084E-8i; Thu, 09 Mar 2023 10:21:51 +0100 Date: Thu, 9 Mar 2023 10:21:51 +0100 From: Michael Olbrich To: Guillermo Rodriguez Garcia Message-ID: <20230309092151.GC3532@pengutronix.de> Mail-Followup-To: Guillermo Rodriguez Garcia , ptxdist@pengutronix.de, christian.melki@t2data.com References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit 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] Image package creating several files 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: christian.melki@t2data.com, 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, Mar 08, 2023 at 07:05:55PM +0100, Guillermo Rodriguez Garcia wrote: > El mié, 8 mar 2023 a las 18:49, Christian Melki > () escribió: > > On 3/8/23 16:56, Guillermo Rodriguez Garcia wrote: > > > Hello all, > > > > > > I have created an image package that signs some files. > > > This package creates two separate files. > > > > > > What is the recommended way to handle this? From the documentation > > > (https://www.ptxdist.org/doc/ref_make_variables.html#image-packages), > > > I believe that _IMAGE is expected to contain the filename of one > > > single file. For example the "clean" target uses this to know which > > > file to delete. > > > > > > How can this be adapted for cases where more than one file is generated? > > > > > > > Not sure what you mean by _IMAGE. But iirc, > > barebox (etc) image installing packages handle this. > > The rules can install multiple files into image directories and are > > capable of cleaning up after themselves. > > Yes but that is a "regular" package. > I am referring to "image packages", which are a bit different; see the > documentation here: > https://www.ptxdist.org/doc/ref_make_variables.html#image-packages > > In these packages, the _IMAGE variable points to a file (the > image that is created by the rule). The clean target is automatically > generated based on this variable. My question is how to do this if the > package generates more than one image. You should be able to use ptx/image-install in the image rule. Just like regular packages. File installed with this are recorded and later removed in the clean stage. Note that generating more than one file in an image rule can cause problems with dependencies because PTXdist doesn't know about the extra files. 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 |