Danek Duvall wrote:
Shawn Walker wrote:
 - line 1273: I don't see that behavior.
I did while running the test suite on b117 :(  I'll check again, but
I know I didn't imagine this.

I'm sure you didn't; perhaps your description of the condition is
incorrect?

    $ python -c "import os; os.lstat('/etc/kotd')"
    Traceback (most recent call last):
      File "<string>", line 1, in ?
    OSError: [Errno 2] No such file or directory: '/etc/kotd'

and that's not ENOTDIR.

Okay, I finally (correctly) root-caused this. The issue is that when the image format upgrade is in progress, the publisher's meta_root is something like:

/var/pkg/catalog/<pub>/catalog

...where 'catalog' is a file, and not a directory. This in turn causes __set_perms to barf in Catalog.__init__ since it expects it to be a directory where catalog files are located (hence the os.stat fails with ENOTDIR).

So, what I've done for now is to change the catalog property in publisher.py to not set the meta_root of the new catalog object (in other words, provide a new one) if <meta_root>/catalog is not a directory with the assumption that the directory structure is in a state of transition (since the caller is responsible for setting this up) and we can't load any existing catalog data anyway. I'm open to alternative suggestions if that seems lame.

I've also removed the ENOTDIR case from the exception handler in Catalog.__set_perms().

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

Reply via email to