Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 64845 Build 61728: arc lint + arc unit
Event Timeline
note: I'll split the few housekeeping bits out pre-commit, I decided they weren't major enough to worry about creating separate views for. Still needs documentation, but I wanted to get an early version up.
See also tools/pkgbase/metalog_reader.lua - will take a look at migrating to using this module instead later on
Hmm, I had missed that; I'll take a look and see if there's any inspiration I can draw back into this module.
"kevans provided some initial review" -- ouch, I should have remembered that... OTOH, this one aims to be completely mtree(5) compliant and allow mutation from lua, which is a bit broader in scope than metalog_reader.
The main feature implied as necessary by metalog_reader is better linting: pkgbase wants to know about duplicate entries, which we'll just silently dedupe and the consumer of mtree(3lua) wouldn't be able to detect that. Everything else seems mostly doable, though we'll also want to provide some kind of iterator over the tree so that it can do most of the remaining filtering/metrics. Perhaps also a mechanism to just get a dirent's path relative to the root (rather than the mtree-style path) would be useful.
Thinking a bit more about the linting, I suspect the easiest/best option for everyone is I just add an optional callback when a duplicate entry is encountered that we invoke with the existing dirent and any keywords associated with the new entry. metalog_reader would supply that and decide if the duplicate is significant.