All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* Naming images
@ 2021-03-29 12:33 Damien LEFEVRE
  2021-03-29 13:14 ` [yocto] " Quentin Schulz
  0 siblings, 1 reply; 3+ messages in thread
From: Damien LEFEVRE @ 2021-03-29 12:33 UTC (permalink / raw
  To: yocto

[-- Attachment #1: Type: text/plain, Size: 531 bytes --]

Hi,

In my build system the generated images are in this format:

imagename-machine-timestamp.img

For release builds, I'd like to replace the time stamp with the image
version. I could rename the image after the build but is there a better way?

I found a BUILDNAME variable but it has no effect.

Also should the timestamp written in /etc/version match the one from the
image name?

For some reason for me it doesn't. /etc/version is 20180309123456 while the
one from the image name is 20210329064542.

-Damien

[-- Attachment #2: Type: text/html, Size: 716 bytes --]

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

* Re: [yocto] Naming images
  2021-03-29 12:33 Naming images Damien LEFEVRE
@ 2021-03-29 13:14 ` Quentin Schulz
  2021-03-30 11:03   ` Damien LEFEVRE
  0 siblings, 1 reply; 3+ messages in thread
From: Quentin Schulz @ 2021-03-29 13:14 UTC (permalink / raw
  To: Damien LEFEVRE; +Cc: yocto

Hi Damien,

On Mon, Mar 29, 2021 at 03:33:09PM +0300, Damien LEFEVRE wrote:
> Hi,
> 
> In my build system the generated images are in this format:
> 
> imagename-machine-timestamp.img
> 
> For release builds, I'd like to replace the time stamp with the image
> version. I could rename the image after the build but is there a better way?
> 

IMAGE_NAME variable is the one specifying the name which should be used
for the final image. c.f. https://docs.yoctoproject.org/ref-manual/variables.html#term-IMAGE_NAME

By default, its value is "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"

IMAGE_VERSION_SUFFIX is by default set to "-${DATETIME}" as documented
here: https://docs.yoctoproject.org/ref-manual/variables.html#term-IMAGE_VERSION_SUFFIX

Therefore to put the image version, you just need to change
IMAGE_VERSION_SUFFIX to what you want it to contain.

Cheers,
Quentin

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

* Re: [yocto] Naming images
  2021-03-29 13:14 ` [yocto] " Quentin Schulz
@ 2021-03-30 11:03   ` Damien LEFEVRE
  0 siblings, 0 replies; 3+ messages in thread
From: Damien LEFEVRE @ 2021-03-30 11:03 UTC (permalink / raw
  To: Quentin Schulz; +Cc: yocto

[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]

Thanks Quentin! That's just what I needed.

Do you know if there's a variable to control the content of /etc/version?

Cheers,
-Damien

On Mon, Mar 29, 2021 at 4:14 PM Quentin Schulz <
quentin.schulz@streamunlimited.com> wrote:

> Hi Damien,
>
> On Mon, Mar 29, 2021 at 03:33:09PM +0300, Damien LEFEVRE wrote:
> > Hi,
> >
> > In my build system the generated images are in this format:
> >
> > imagename-machine-timestamp.img
> >
> > For release builds, I'd like to replace the time stamp with the image
> > version. I could rename the image after the build but is there a better
> way?
> >
>
> IMAGE_NAME variable is the one specifying the name which should be used
> for the final image. c.f.
> https://docs.yoctoproject.org/ref-manual/variables.html#term-IMAGE_NAME
>
> By default, its value is
> "${IMAGE_BASENAME}-${MACHINE}${IMAGE_VERSION_SUFFIX}"
>
> IMAGE_VERSION_SUFFIX is by default set to "-${DATETIME}" as documented
> here:
> https://docs.yoctoproject.org/ref-manual/variables.html#term-IMAGE_VERSION_SUFFIX
>
> Therefore to put the image version, you just need to change
> IMAGE_VERSION_SUFFIX to what you want it to contain.
>
> Cheers,
> Quentin
>

[-- Attachment #2: Type: text/html, Size: 1900 bytes --]

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

end of thread, other threads:[~2021-03-30 11:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-29 12:33 Naming images Damien LEFEVRE
2021-03-29 13:14 ` [yocto] " Quentin Schulz
2021-03-30 11:03   ` Damien LEFEVRE

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.