v0.3.0 made big trees fast. This one makes them yours: on a sourced ROS 2
machine most of what rostree can see belongs to the distro, and until now there
was no way to say so.
Added
- Scope filters on every command that walks the graph (
tree,graph,why,
rdeps,check,diff):-w/--only-workspace— ignore packages installed under/opt/ros--include GLOB/--exclude GLOB— repeatable shell globs on package names
(--include 'nav2_*',--exclude '*_msgs'); excludes win over includes- A filtered-out package is neither shown nor followed, so anything reachable
only through it disappears with it. Commands report what was hidden rather
than silently presenting a smaller tree as the whole truth.
--dep-type runtime|build|test|allto choose whichpackage.xmltags to
follow.-r/--runtimestays as a shorthand for--dep-type runtime.rostree diff— what did this package gain, lose or bump?rostree diff <a> <b>compares two packagesrostree diff <pkg> --save FILEsnapshots the current dependency set, and
--against FILEcompares against it after a rebuild- Reports added / removed / version-changed and exits non-zero on any drift
rostree check --junit FILEwrites a JUnit XML report for CI dashboards.DependencyNode.hidden_childrenrecords how many dependencies a truncated node
is not showing, so… N morenever promises more than the tree would print.build_dependency_tree()andbuild_dependency_graph()acceptpackage_filter,
reportand (on the tree)include_tags.- Bandit runs in CI and pre-commit and is in the
devextra, so
bandit -c pyproject.toml -r src testsreproduces the security scan that gates
pull requests instead of it existing only in a dashboard..codacy.yamlrecords
which rules are switched off for the test suite and why; accepted findings under
src/carry an inline suppression with its reason, and
development.md writes down where those
comments have to sit, which is less obvious than it sounds.
Changed
rdeps --workspace-onlyis now--only-workspace; the old spelling still works.- The JUnit writer moved out of
cli.pyintocore/junit.py. It is the only code
in rostree that writes XML and never reads any, and keeping it separate lets that
argument be made once, at the top of a short file, instead of on every line of a
1,300-line module. - The TUI's widget guards no longer catch bare
Exception. Eleventry/except Exception: passblocks aroundquery_onebecame
contextlib.suppress(QueryError, ScreenStackError), so a bug inside a guarded
block raises instead of disappearing. The two guards that are deliberately
broad — best-effort tree expansion and collapse, which a background rebuild can
interrupt — say so in a comment.
Security
package.xmlis now parsed with defusedxml,
a new runtime dependency.core/parser.pyis the only place rostree reads XML it
did not write, and a manifest is just a file in a workspace: one declaring
entities could previously make the parser expand them until it ran out of memory.
Such a manifest is now refused, which reports the package as unreadable instead
of hanging. ADOCTYPEthat declares nothing still parses, so this drops no
package that used to work.