[Bro-Dev] Package manager meta data

Siwek, Jon jsiwek at illinois.edu
Mon Nov 21 10:24:21 PST 2016

> On Nov 21, 2016, at 10:38 AM, Robin Sommer <robin at icir.org> wrote:
> On Mon, Nov 21, 2016 at 15:53 +0000, you wrote:
>> When selecting a version, `bro-pkg update` only considers newer x.y.z
>> release tags for that package.  When selecting a branch, it tracks
>> updates along that branch.
> Ok, sounds like I should think about it not as "master" then, but as
> "HEAD on the master branch”.

For packages tracking a git branch, bro-pkg will update to the latest commit at the end of the branch.

Maybe I’m getting git terminology wrong, but I thought ‘master’ is always a reference to the latest commit at the end of the branch and HEAD usually means whatever commit is locally checked out (maybe not latest commit).  So thinking of it as ‘master’ sounds right to me, but whatever you think of as the “end of the branch” is what bro-pkg is tracking.

> So let's say the first time I install a
> package, there're tags v1.0 and v1.1 on master, but master's HEAD is
> already a bit ahead, without a new version set yet. What gets
> installed when I don't specify a version? 1.1?

1.1 is installed by default.  (rationale is to give preference to latest stable release over dev versions)

> And what does update do
> when (1) later a new version got set, and (2) master then moves beyond
> that version?

(1) it installs the newer version tag (“newer” meaning the version number is greater than before)
(2) it doesn’t care what gets added on master, the local install isn’t updated

In other words, if you install a specific release tag of a package (by default or by choice), you only receive stable release updates.

If you install a package’s branch (by default or by choice), updates will be tracking the latest commit at the end of that branch.

> It would be good to spell this all out clearly in the documentation,
> including in the quick start / examples, so that people understand how
> to use the versioning effectively.

Just added another section also linked to it in quickstart:


The upgrade command docs also have a brief description of how it works.

- Jon

More information about the bro-dev mailing list