mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: Guillermo Rodriguez Garcia <guille.rodriguez@gmail.com>
Cc: christian.melki@t2data.com, ptxdist@pengutronix.de
Subject: Re: [ptxdist] Image package creating several files
Date: Thu, 9 Mar 2023 10:21:51 +0100	[thread overview]
Message-ID: <20230309092151.GC3532@pengutronix.de> (raw)
In-Reply-To: <CABDcavZ1aMUVWFByE7DFaP6OY1f7nZLbA2_R9aP7sZ2ig78Qmg@mail.gmail.com>

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
> (<christian.melki@t2data.com>) 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 <PKG>_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 <PKG>_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 <PKG>_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 |



      reply	other threads:[~2023-03-09  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-08 15:56 Guillermo Rodriguez Garcia
2023-03-08 17:48 ` Christian Melki
2023-03-08 18:05   ` Guillermo Rodriguez Garcia
2023-03-09  9:21     ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230309092151.GC3532@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=christian.melki@t2data.com \
    --cc=guille.rodriguez@gmail.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox