On 04/ 7/11 12:29 PM, Brock Pytlik wrote:
On 04/ 7/11 11:50 AM, Shawn Walker wrote:
On 04/ 6/11 12:03 AM, Brock Pytlik wrote:
On 04/ 4/11 02:25 PM, Shawn Walker wrote:
On 03/30/11 09:36 PM, Brock Pytlik wrote:
Here's the system repository work that Tim and I have been working on
for quite a while now.
http://cr.opensolaris.org/~bpytlik/ips-sysrepo-v1/

Thanks for the fast review Shawn. Comments are inline.

general comments: has onu been tested with these changes? There's
likely going to need to be some sort of coordination with whoever
maintains onu and at the very least a flag day when these changes go
into a build.
I haven't tested with onu. I'm happy to do it but can you explain what
concerns you have so I make sure I test the right things?

onu has some special logic for upgrading zones that may break.

There may have also been a subtle change in behaviour here that onu
was depending on, so testing with it doesn't hurt.

Sure, I'm happy to do a smoke test.
[snip]

src/client.py:
line 205: needs updating likely given my comments on 4118-4121 below

lines 226-242: needs updating for --search changes
I've added --search-first, I think that's all the needs changing for
set-publisher

It seems like -P should be removed from the man page if we've added
--search-first. I'd ask Danek.

Ok, I'll check with him.
...
[snip]
[snip]
src/modules/client/image.py:
line 659: what necessitated this change? If the ordering is
important, a comment needs to be added.

It's there because otherwise catalog retrieval for the system publishers
fails.
I'll add a comment but I'll note that if we need to comment every
ordering constraint for every line of code, we're going to have a rather
large number of comments.

I don't see how that's possible. No catalog retrieval should be
happening at this point yet. In particular, the format of the image
hasn't even yet been established so it's not really safe to be doing so.

I think this issue needs a bit more exploration, or I need to better
understand the challenge you encountered here.

Ok, here's the exception:
======================================================================
ERROR: cli.t_pkg_sysrepo.py TestSysrepo.test_01_basics
----------------------------------------------------------------------
Traceback (most recent call last):
File "./pkg5unittest.py", line 500, in run
testMethod()
File "./api/../cli/t_pkg_sysrepo.py", line 383, in test_01_basics
self.__prep_configuration("all-access")
File "./api/../cli/t_pkg_sysrepo.py", line 266, in __prep_configuration
self.image_create()
File "./pkg5unittest.py", line 1458, in image_create
ssl_cert=ssl_cert, ssl_key=ssl_key, props=props)
File
"/export/home/bpytlik/IPS/bug-17535/proto/root_i386/usr/lib/python2.6/vendor-packages/pkg/client/api.py",
line 3866, in image_create
user_provided_dir=user_provided_dir, props=props)
File
"/export/home/bpytlik/IPS/bug-17535/proto/root_i386/usr/lib/python2.6/vendor-packages/pkg/client/image.py",
line 241, in __init__
progtrack=progtrack, purge=True)
File
"/export/home/bpytlik/IPS/bug-17535/proto/root_i386/usr/lib/python2.6/vendor-packages/pkg/client/image.py",
line 662, in __set_dirs
self.__load_config()
File
"/export/home/bpytlik/IPS/bug-17535/proto/root_i386/usr/lib/python2.6/vendor-packages/pkg/client/image.py",
line 547, in __load_config
self.get_catalog(self.IMG_CATALOG_INSTALLED).\
File
"/export/home/bpytlik/IPS/bug-17535/proto/root_i386/usr/lib/python2.6/vendor-packages/pkg/client/image.py",
line 2480, in get_catalog
cat = self.__get_catalog(name)
File
"/export/home/bpytlik/IPS/bug-17535/proto/root_i386/usr/lib/python2.6/vendor-packages/pkg/client/image.py",
line 2514, in __get_catalog
croot = os.path.join(self._statedir, name)
AttributeError: 'Image' object has no attribute '_statedir'

So I guess it's not "catalog retrieval", but instead "catalog loading",
which means statedir must be set.

Ok, that's a change. In fact, I think there may be a different problem here now.

The image really isn't technically ready for loading catalog data at this point yet, so we have a problem.

It isn't safe to load the catalog data until after the call to update_format() on lines 845-846.

Can you find some way to defer the logic you're performing that needs the catalog data after the call to update_format()?

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

Reply via email to