On 03/22/11 06:11 PM, Darren Reed wrote:
Shawn Walker wrote:
----- [email protected] wrote:
Shawn Walker wrote:
...
So far, we've not had any action attributes that interact with each
other
in this particular fashion, so it seemed simpler to make the cross
product of the behaviour visible through the values of the preserve
attribute instead of another mechanism.
It's all pretty visible on the action, and although we don't have any
attributes that modify the behavior of other attributes, I don't see
why
that shouldn't be allowed.
However, I'm open to suggestions as to what that might look like as
I
don't have a good feeling about any particular direction at the
moment.
Customizable package:
file path=etc/pam.conf preserve=true overlay=possible
Overlay package:
file path=etc/pam.conf preserve=true overlay=true
Having overlay=possible on a non-preserved file is meaningless
(linted,
perhaps, but no install-time effects). An action marked overlay=true
must
also be on a preserved file. It is an install-time error for more
than one
action of a given name/keyattr tuple tagged overlay=possible to be
installed. Ditto for overlay=true. It is an install-time error for
an
action tagged overlay=true to overlay a file not tagged
overlay=possible or
a file not tagged with some form of preserve. An action cannot be
tagged
both overlay=possible and overlay=true.
After some thought, this seems like a reasonable refinement. However,
perhaps:
Customizable package:
file path=etc/pam.conf preserve=true overlay=(allow|deny|true)
Then the question is, should allow or deny be the default? I guess the
question is whether we believe it's more valuable to not allow overlay
of preserved files to prevent possible accidents, or less cumbersome
if we assume all can be unless told otherwise.
Whichever is chosen to be the default should not be allowed as it is
obviously a redundent specification in the entry.
Agreed.
Is stacking to be permitted?
No.
For example, if SUNWcs delivers /etc/motd as "overlay=allow" and I
install package A with /etc/motd as "overlay=true", if I then attempt to
install package B that also delivers /etc/motd with "overlay=true", does
B succeed?
No.
If not, why shouldn't it be allowed considering preserve?
Because I value my remaining sanity and because it's impossible to
determine which package 'wins' in that scenario. Especially once you
start bringing upgrades into the picture.
As such, the plan is to only allow two packages to claim the same file.
The original package that declared the file as
'overlay=possible/allow/whatever' and a second package that has
'overlay=true'.
FWIW, "preserve=true" implying "overlay=allow" would theoretically allow
customers to deliver their own /etc/dladm/datalink.conf file (for
example), which they obviously should not do.
Agreed.
-Shawn
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss