When I try to use a file: repo with importer.py, it throws an exception.
This seems to fix it:
% hg diff importer.py
diff -r e49306fc2b7c src/util/distro-import/importer.py
--- a/src/util/distro-import/importer.py Mon Oct 25 15:45:59 2010 -0700
+++ b/src/util/distro-import/importer.py Thu Oct 28 17:15:53 2010 -0700
@@ -1076,11 +1076,16 @@
refresh_allowed = True
# create a temporary image
- api_inst = pkg.client.api.image_create(PKG_CLIENT_NAME,
- CLIENT_API_VERSION, image_dir, pkg.client.api.IMG_TYPE_USER,
- is_zone, facets=pkg.facet.Facets(), force=False,
- progtrack=tracker, refresh_allowed=refresh_allowed,
- repo_uri=server_url)
+ try:
+ api_inst = pkg.client.api.image_create(PKG_CLIENT_NAME,
+ CLIENT_API_VERSION, image_dir,
pkg.client.api.IMG_TYPE_USER,
+ is_zone, facets=pkg.facet.Facets(), force=False,
+ progtrack=tracker, refresh_allowed=refresh_allowed,
+ repo_uri=server_url)
+ except:
+ print "image_create failed trying to get SMF package list"
+ os.chdir(dir)
+ return [ ]
api_inst = pkg.client.api.ImageInterface(image_dir,
pkg.client.api.CURRENT_API_VERSION, tracker, None,
PKG_CLIENT_NAME)
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss