Brock Pytlik wrote:
[email protected] wrote:
On Thu, Feb 11, 2010 at 05:23:51PM -0600, Shawn Walker wrote:
On 01/12/10 06:27 PM, John Beck wrote:
jmcp and I were working on the gate machine, pulling our hair out trying to figure out why pkg(1) was behaving differently for us. Eventually truss gave me a hint that led me to $PWD, which in my case on that machine is /net/MYWSNAME/export/home/jbeck . Well, guess what? /net/MYWSNAME/var is shared, and /net/MYWSNAME/var/pkg exists, so pkg just decided that it should use the data stored in the publisher directory thereunder, instead of /var/pkg/publisher on the machine to which I was actually ssh'd into.

Now, no offense to this team that has done fantastic and innovative work, but this strikes me as a huge throbbing bug, as it violates the principle of least surprise. Why would I expect my image to be anything other than whatever is in /var/pkg on the machine on which I am operating? Now, if I was to supply some argument to tell pkg to look elsewhere, that would be fine, but to do so by default strikes reminds me of a story. When I
was coding zonecfg(1m), I initially wrote a certain interface in a way
that was easy for me to code, but not as usable as it could have been.
Dan asked why, and I explained, then he observed that I would have to
write the code once, but our users would have to execute it thousands
of times. Feeling silly, I went and rewrote it, and learned a valuable
lesson, one that I think could be applied here: my perception is that
the needs of the many (end-users) should outweigh the needs of the few
(pkg developers), and the behavior should be changed to conform to the
principle of least surprise.
Are there any objections to changing this behaviour as John indicated?

If not, I'll be filing a bug to change this behaviour for post-release.

As long as the client still respects PKG_IMAGE in the environment, then
I have no objection.

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
I think it's an open question of how user/partial images should interact. Imagine a setup like jurassic only each user has their own user image/partial image set up in their home directory. Perhaps it's reasonable to tell each user to be sure to set their $PKG_IMAGE correctly.

Perhaps the right sequence of checks is:
1) Am I sitting in a user/partial image above
Perhaps this should be is user's homedir a user/partial image?
Brock
/
2) Is / a full image
3) Is there a full image higher than / that I'm sitting in

Brock
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to