# Bro updates force some bro-pkg rebuilds.. sometimes.

**URL:** <https://community.zeek.org/t/bro-updates-force-some-bro-pkg-rebuilds-sometimes/5201>\
**Category:** Zeek\
**Created:** [February 28, 2018, 8:27pm UTC](https://community.zeek.org/t/bro-updates-force-some-bro-pkg-rebuilds-sometimes/5201 "2018-02-28T20:27:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dopheide](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dopheide](https://community.zeek.org/u/dopheide)\
**Post date:** [February 28, 2018, 8:27pm UTC](https://community.zeek.org/t/bro-updates-force-some-bro-pkg-rebuilds-sometimes/5201/1 "2018-02-28T20:27:44Z")

</div>

I’m sure others have experienced this, when updating Bro, packages with C++ components will need to be re-installed/rebuilt (sometimes, not always). There may be some crazy C++ way of avoiding that, but outside of that I’ve been trying to come up with options to suggest so our upgrade process can be more easily automated.

What do folks think about a couple options to bro-pkg such as:

1. a new package.meta file field:

rebuild=yes  
2) And a corresponding bro-pkg command: bro-pkg rebuild [nodeps]

Separately, but kinda related, I wouldn’t mind a ‘–yes’ flag or something similar when packages aren’t being installed interactively.

Alternatively, the idea has been tossed around that we build the bro packages we use into RPMs, but then that sorta defeats the bro-pkg command entirely.

-Dop

---

<div class="post-metadata">

**Author:** ![JonZeolla](https://avatars.discourse-cdn.com/v4/letter/j/ccd318/32.png) [@JonZeolla](https://community.zeek.org/u/JonZeolla)\
**Post date:** [February 28, 2018, 8:38pm UTC](https://community.zeek.org/t/bro-updates-force-some-bro-pkg-rebuilds-sometimes/5201/2 "2018-02-28T20:38:36Z")

</div>

Sounds appealing to me, I would use it if it existed.

Jon

---

<div class="post-metadata">

**Author:** ![Jon\_Siwek](https://avatars.discourse-cdn.com/v4/letter/j/71c47a/32.png) [@Jon\_Siwek](https://community.zeek.org/u/Jon_Siwek)\
**Post date:** [March 1, 2018, 2:59am UTC](https://community.zeek.org/t/bro-updates-force-some-bro-pkg-rebuilds-sometimes/5201/3 "2018-03-01T02:59:29Z")

</div>

> What do folks think about a couple options to bro-pkg such as:  
> 1) a new package.meta file field:  
> rebuild=yes

I wonder if that's needed since bro-pkg can already see what packages  
have specified a 'build\_command' ? i.e. bro-pkg can simply rebuild any  
package that has supplied a build command. I'd think that even for  
packages which don't strictly require a rebuild, it's not harmful to  
rebuild/reinstall anyway.

> 2) And a corresponding bro-pkg command: bro-pkg rebuild [nodeps]

Makes sense to me. Unless there's further feedback from this thread,  
I'd say go ahead and create an issue on on github for adding a  
'rebuild' command or take a crack at a PR in case I don't get to it  
immediately.

Possibly a workaround to do in the meantime would be to do:

bro\-pkg bundle everything\.bundle bro-pkg unbundle everything.bundle  
$ rm everything.bundle

Which should result in a rebuild/reinstall of all installed packages.

> Separately, but kinda related, I wouldn't mind a '--yes' flag or something  
> similar when packages aren't being installed interactively.

The --force flag will suppress all interactive prompts. Does that  
work like you need?

- Jon

---

<div class="post-metadata">

**Author:** ![dopheide](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dopheide](https://community.zeek.org/u/dopheide)\
**Post date:** [March 1, 2018, 3:25am UTC](https://community.zeek.org/t/bro-updates-force-some-bro-pkg-rebuilds-sometimes/5201/4 "2018-03-01T03:25:12Z")

</div>

> I wonder if that's needed since bro-pkg can already see what packages  
> have specified a 'build\_command' ? i.e. bro-pkg can simply rebuild any  
> package that has supplied a build command. I'd think that even for  
> packages which don't strictly require a rebuild, it's not harmful to  
> rebuild/reinstall anyway.

Great point, build\_command serves the same purpose.

> \> 2) And a corresponding bro-pkg command: bro-pkg rebuild [nodeps]
> 
> Makes sense to me. Unless there's further feedback from this thread,  
> I'd say go ahead and create an issue on on github for adding a  
> 'rebuild' command or take a crack at a PR in case I don't get to it  
> immediately.
> 
> Possibly a workaround to do in the meantime would be to do:
> 
> bro\-pkg bundle everything\.bundle bro-pkg unbundle everything.bundle  
> $ rm everything.bundle
> 
> Which should result in a rebuild/reinstall of all installed packages

Good to know. I may take a stab at a PR for 'rebuild', but I can't promise  
anything soon either. Will wait for additional community feedback.

> \> Separately, but kinda related, I wouldn't mind a '--yes' flag or  
> something  
> \> similar when packages aren't being installed interactively.
> 
> The --force flag will suppress all interactive prompts. Does that  
> work like you need ?

Not sure I realized --force was an option, but that should work.

Thanks, Jon.

-Dop

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:45pm UTC](https://community.zeek.org/t/bro-updates-force-some-bro-pkg-rebuilds-sometimes/5201/5 "2022-05-06T15:45:36Z")

</div>


