On 10/18/12 16:36, Teh, Rick wrote:
I came across the same behaviour with /export/home and I found it a
bit disturbing. I work in an environment where some packages will
create an /export/home/<application_user>.  Meanwhile, regular users
are created with useradd or Ops Center as part of day to day
operations. Of course pkg(5)'s ref-counters don't know what has
happened at the command line, so it tries to remove /export/home when
the application team uninstall a package.

There is similar behaviour for /, thankfully pkg(5) fails to remove
the root directory, but it leaves a nasty stack trace, an incomplete
BE and it looks embarrassing.  This comes about when a package has a
user action that doesn't specify a home directory.

It is not immediately apparent from the man page that an undeclared
home-dir is a potentially bad thing. The man pages says:

home-dir  The user's home directory. Default value is /.

An undeclared home-dir is not a problem.

In addition, as far as I can see, pkg(5) doesn't do anything directly with the homedir -- it only sets the appropriate field in /etc/passwd.

If you're seeing a problem on uninstall, it has to be related to a directory that's being delivered in the package, not with the user action itself.

...
For the short term, I made a little package like you suggested for
Steve's problem.  I can imagine the looks I am going to get when I
explain to the Ops Team "see that package there, you must never ever
remove it, bad things will happen".  Probably the same looks that
SFW/Unix Packages users will give ;-)

For the medium term, the solution seems straight-forward to me.

Amongst other things pkg://solaris/system/core-os delivers 'root',
'home', 'export' and 'usr' core-os is not likely to be casually
uninstalled, so it seems the right place to also deliver '/',
'export/home' and 'usr/local'

Some might argue that core-os shouldn't deliver an empty optional
directory like /usr/local. I would then point out that core-os
currently delivers the empty optional directory /usr/games

I believe it was intentionally not delivered because it's a mountpoint; it's already been discussed.

Similar observations have been made about /usr/local though as well.

I can't promise any specific change here, just know that these things have been recorded and discussed.

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

Reply via email to