On Fri, 2011-07-08 at 21:41 -0700, Brock Pytlik wrote:
> > https://cr.opensolaris.org/action/browse/pkg/timf/pkglint-overlay-validate/pkglint-overlay-validate-webrev/
> Hey Tim, in general this LGTM.
Cool, thanks for taking a look.
> One question I did have was about the handling of variants. I'm not
> totally sure what the intended rules are here, but my guess would be
> (looking around line 633 or pkglint_action or so) that actions with the
> same overlay can't intersect under any variants. It's not clear to me
> that that's what's actually being tested here.
Hmm.
> I'm probably just not following something, but I'm wondering why the
> conflicting_variants function wasn't used here?
No, I think you're right in that it doesn't work, but
conflicting_variants itself won't help.
We handle overlays as a special case of duplicate files, and do use
conflicting_variants as part of the generic dup_attr_check(..) code to
first narrow down to a set of actions that have variants which would
conflict if the file actions were treated as normal non-overlaying
actions. We then delve into _prune_overlays(..) to see whether any
combinations of those pairs are using overlays and can be ignored.
However, within that latter check, we need to allow for the fact that we
should have conflicting variants, but must ensure that, for all variants
under which we can add an overlay, we also install an overlay=allow
action. This doesn't appear to be working properly at the moment.
I'll send another review once I've had a chance to sort this out.
The test for this I think would be to ensure that pkglint reports no
errors for:
---
set name=variant.arch value=i386 value=sparc
set name=variant.bar value=other value=new
file overlay=true path=foo mode=0644 group=staff owner=timf \
variant.arch=i386
file overlay=allow preserve=true path=foo mode=0644 group=staff \
owner=timf variant.arch=i386 variant.bar=other
---
Back to the drawing board.
cheers,
tim
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss