mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] Image package creating several files
@ 2023-03-08 15:56 Guillermo Rodriguez Garcia
  2023-03-08 17:48 ` Christian Melki
  0 siblings, 1 reply; 4+ messages in thread
From: Guillermo Rodriguez Garcia @ 2023-03-08 15:56 UTC (permalink / raw)
  To: ptxdist

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?

Thanks,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Image package creating several files
  2023-03-08 15:56 [ptxdist] Image package creating several files Guillermo Rodriguez Garcia
@ 2023-03-08 17:48 ` Christian Melki
  2023-03-08 18:05   ` Guillermo Rodriguez Garcia
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Melki @ 2023-03-08 17:48 UTC (permalink / raw)
  To: ptxdist

Hi.

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.

> Thanks,
> 
> Guillermo Rodriguez Garcia
> guille.rodriguez@gmail.com
> 




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Image package creating several files
  2023-03-08 17:48 ` Christian Melki
@ 2023-03-08 18:05   ` Guillermo Rodriguez Garcia
  2023-03-09  9:21     ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Guillermo Rodriguez Garcia @ 2023-03-08 18:05 UTC (permalink / raw)
  To: ptxdist, christian.melki

Hi Christian,

El mié, 8 mar 2023 a las 18:49, Christian Melki
(<christian.melki@t2data.com>) escribió:
>
> Hi.
>
> 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.

BR,

Guillermo Rodriguez Garcia
guille.rodriguez@gmail.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] Image package creating several files
  2023-03-08 18:05   ` Guillermo Rodriguez Garcia
@ 2023-03-09  9:21     ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2023-03-09  9:21 UTC (permalink / raw)
  To: Guillermo Rodriguez Garcia; +Cc: christian.melki, ptxdist

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 |



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-09  9:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-08 15:56 [ptxdist] Image package creating several files 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox