build_image: is it possible to add a tag to build

32 views
Skip to first unread message

Waldemar

unread,
Sep 5, 2016, 5:12:08 AM9/5/16
to Chromium OS dev
Hi,

I play with different images a bit  and I've  found it difficult to handle different build with different content.  Is there an option to pass a tag to a build  which would be reflected in  dir name for specific image  build/image/... ?


Thanks,



 

Mike Frysinger

unread,
Sep 5, 2016, 1:14:22 PM9/5/16
to Waldemar, Chromium OS dev
are you talking about /etc/lsb-release ?  or something else ?

for lsb, there's a few vars you can set.  see build_library/base_image_util.sh and the cros_set_lsb_release call for some of the CHROMEOS_xxx vars you can export.
-mike

--
--
Chromium OS Developers mailing list: chromiu...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en


Waldemar

unread,
Sep 6, 2016, 4:04:16 AM9/6/16
to Chromium OS dev, waldemar.r...@gmail.com
No, I was referring to dir naming convention for OUTPUT_DIR  to see explicitly  what  my build includes. Private tag at the end would be very useful.

Meantime, I managed to check   that $IMAGE_SUBDIR is responsible for this.

build_library/build_image_util.sh:IMAGE_SUBDIR="R${CHROME_BRANCH}"

build_library
/build_image_util.sh:  IMAGE_SUBDIR="${IMAGE_SUBDIR}-${CHROMEOS_VERSION_STRING}-a\
build_library/build_image_util.sh:  IMAGE_SUBDIR="
${IMAGE_SUBDIR}-${FLAGS_version}"


From above it seems like FLAGS_version could do the trick. I am not sure, however, if that supposed to be used like a private version tag ?

$ FLAGS_version=my_private_tag ./build_image ....

Mike Frysinger

unread,
Sep 6, 2016, 4:43:45 PM9/6/16
to Waldemar, Chromium OS dev
any variable you see like FLAGS_xxx comes directly from the command line and should never be set via the env.  so there will be a --version option to build_image which automatically turns into FLAGS_version.  see the shflags project if you want more details on that.

this flag isn't used just to control the output directory though ... it will set the build/branch/patch versions and the overall version string too.  maybe you're OK with that.

if you just want to add a custom suffix to the output directory, look at build_image's --build_attempt flag instead.  that should only be used when creating the output directory afaict.
-mike

Waldemar Rymarkiewicz

unread,
Sep 7, 2016, 6:05:42 AM9/7/16
to Mike Frysinger, Chromium OS dev
Hi,

On 6 September 2016 at 22:43, Mike Frysinger <vap...@chromium.org> wrote:
> any variable you see like FLAGS_xxx comes directly from the command line and
> should never be set via the env. so there will be a --version option to
> build_image which automatically turns into FLAGS_version. see the shflags
> project if you want more details on that.

Good to know, was not aware about shflags. Thanks.

> this flag isn't used just to control the output directory though ... it will
> set the build/branch/patch versions and the overall version string too.
> maybe you're OK with that.

That's works for me.

> if you just want to add a custom suffix to the output directory, look at
> build_image's --build_attempt flag instead. that should only be used when
> creating the output directory afaict.

build_attempt is defined as integer, so I can imagine that this is
intended to have a different attempts to build but not really suffix
with a string. String won't work. So seems --version is the best fit.

Anyway, thanks I understand things better now.

/Waldek
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages