Hi, I tried to use Distribution-Constructor to make a distribution, and
encountered this problem.

It seems when pkg (built from os2008rc1) tries to make a link that is
already linked to something, it will first remove the link first. So I got
the following error code:
*
pkg: An unexpected error happened during installation: [Errno 1] Not
owner *......<a
directory name*>**

Traceback (most recent call last):
  File "/usr/bin/pkg", line 2139, in ?

    __ret = main_func()
  File "/usr/bin/pkg", line 2088, in main_func

    return install(mydir, pargs)
  File "/usr/bin/pkg", line 755, in install
    api_inst.execute_plan()
  File "/usr/lib/python2.4/vendor-packages/pkg/client/api.py", line 469, in
execute_plan

    self.img.imageplan.execute()
  File "/usr/lib/python2.4/vendor-packages/pkg/client/imageplan.py", line
682, in execute

    p.execute_install(src, dest)

  File "/usr/lib/python2.4/vendor-packages/pkg/client/pkgplan.py", line 281,
in execute_install

    dest.install(self, src)

  File "/usr/lib/python2.4/vendor-packages/pkg/actions/link.py", line 66, in
install

    os.unlink(path)*

......

  In python, os.unlink is just a wrapper of syscall 'unlink'. As stated in
manual page for unlink(2), unlink will fail when unlinking a directory on a
filesystem which doesn't support unlink(2), eg. ZFS, and will prompt "Not
owner", So this should be the reason. Similar situation may happen on
os.remove. So I think it not perfect to use os.unlink here.
  As a temporary solution, I replace os.unlink with 'os.system ("rm -r %s" %
path)' and it goes well, but I think it ugly. So anyone has better solution
or should this be considered a bug and get fixed in the future? Thanks!
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to