Comment # 27 on bug 1051465 from
(In reply to Thomas Blume from comment #26)
> Upstream seems to prefer less string mangling in the rules and to favour
> using shell scripts instead (see comment#22).
> I would follow them in this case.

I'm not sure upstream claims that but I really prefer have the oneline shell
command embedded in the rule file. It doesn't really make sense to carry a
shell script that has a single command.

> 
> > ID_SERIAL or whatever that needs to be used, is supposed to be retrieved
> > from sysfs by using the "$attr{xxx}" syntax.
> 
> Yes, that's what the rule is doing.
>  
> > Please note that we should make sure to not pollute the environment that is
> > already setup by the upstream rules. Therefore setting ID_SERIAL or ID_MODEL
> > in 61-xxx is not a good idea.
> 
> Agreed, but can we be sure that the upstream rules always run before the
> compat rules?

Currently upstream rule file is named 60-xxx and ours is 61-xxx, so that should
be ok.

> I see it as a kind of security measure to also set ID_SERIAL in the compat
> rules. Since it takes the data from sysfs (just like the upstream rules do),
> we shouldn't overwrite something with wrong values.
> But that way we can be sure that the compat rules work, even if the upstream
> rules fail or are executed later.
> Does that make sense?

Well if upstream doesn't set them we shouldn't either and if they set it then
we can reuse them without doing any modifications.


You are receiving this mail because: