Shawn,
On 03/26/10 05:31 PM, Shawn Walker wrote:

... pkg.client.global_settings.client_name must be set first before using pkg.client.api.
What is client_name used for?  What are its limitations?

How is the CLIENT_API_VERSION to be used? How do I track pkg.client.api for version updates to keep this value current in my application? What happens to my application when package/pkg is updated to a new version number for pkg.client.api?

If I do, as mentioned before:
api_inst = api.image_create(PKG_CLIENT_NAME, CLIENT_API_VERSION, img_dir,
     api.IMG_TYPE_ENTIRE, False, repo_uri="http://ipkg.sfbay/dev";,
     progtrack=progress.FancyUNIXProgressTracker(), force=True)
With an expanded package list that AI would normally use:
pkglist=["entire", "SUNWcsd", "SUNWcs", "babel_install"]

api_inst.plan_install(pkglist,refresh_catalogs=True,noexecute=False,verbose=True,
 update_index=True)
Then to see the plan implemented:
api_inst.prepare()
api_inst.execute_plan()
I see one message in stdout/stderr: "no such file <img_dir>/etc/group
and I see at traceback:
Action install failed for 'netadm' (pkg://opensolaris.org/system/network):
  ValueError: max() arg is an empty sequence
Traceback (most recent call last):
  File "/export/home/ws199450/api.py", line 110, in <module>
    api_inst.execute_plan()
File "/usr/lib/python2.6/vendor-packages/pkg/client/api.py", line 674, in execute_plan
    self.__img.imageplan.execute()
File "/usr/lib/python2.6/vendor-packages/pkg/client/imageplan.py", line 1084, in execute
    p.execute_install(src, dest)
File "/usr/lib/python2.6/vendor-packages/pkg/client/pkgplan.py", line 301, in execute_install
    dest.install(self, src)
File "/usr/lib/python2.6/vendor-packages/pkg/actions/group.py", line 76, in install
    gr.setvalue(template)
File "/usr/lib/python2.6/vendor-packages/pkg/cfgfiles.py", line 166, in setvalue
    lineno = max((self.index[k][2] for k in self.index)) + 1
ValueError: max() arg is an empty sequence
Have I executed the plan correctly?
William
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to