users@glassfish.java.net

Re: pkg-toolkit error

From: Romain Grecourt <romain.grecourt_at_oracle.com>
Date: Tue, 09 Jul 2013 19:22:51 +0200

Hi,

Seems like you are trying to use an external pkg-toolkit.
Can you first try using the one bundled with GlassFish
(glassfish3/bin/pkg) ? (it will bootstrap itself the first time).

IIRC, the toolkit embeds its own version of python.

You could try the following (assuming bash shell):

PYTHON_HOME=$REPO_TOOLKIT/pkg/python2.4-minimal; export PYTHON_HOME
LD_LIBRARY_PATH=$PYTHON_HOME/lib
PATH=$REPO_TOOLKIT/pkg/bin:$PYTHON_HOME/bin:$PATH
export PATH LD_LIBRARY_PATH PYTHON_HOME

Thanks,
Romain

On 7/8/13 6:48 PM, castaneda.m_at_outlook.com wrote:
> Hi,
>
> I am trying to update Glassfish 3.1 to 3.1.2.2 using
> "pkg-toolkit-2.3-b56-linux-i386.zip", I am doing these commands:
>
> unzip pkg-toolkit-2.3-b56-linux-i386.zip
> cd pkg-toolkit-linux-i386
> bin/pkg -R /path/to/glassfish/ image-update
>
> but I get this error:
> ---------------------------------------
> [ec2-user_at_staging2 pkg-toolkit-linux-i386]$ bin/pkg -R /opt/glassfish3/
> image-up
> date
> Traceback (most recent call last):
> File "/home/ec2-user/pkg-toolkit-linux-i386/pkg/bin/client.py", line
> 2621, in
> handle_errors
> __ret = func(*args, **kwargs)
> File "/home/ec2-user/pkg-toolkit-linux-i386/pkg/bin/client.py", line
> 2544, in
> main_func
> img.load_config()
> File
> "/home/ec2-user/pkg-toolkit-linux-i386/pkg/vendor-packages/pkg/client/i
> ma
> ge.py", line 265, in
> load_config
> ic.read(self.imgdir)
> File
> "/home/ec2-user/pkg-toolkit-linux-i386/pkg/vendor-packages/pkg/client/i
> ma
> geconfig.py", line 212,
> in read
> self.write(path)
> File
> "/home/ec2-user/pkg-toolkit-linux-i386/pkg/vendor-packages/pkg/client/i
> ma
> geconfig.py", line 236,
> in write
> props[p].encode("utf-8"))
> AttributeError: 'NoneType' object has no attribute 'encode'
>
>
> pkg: This is an internal error. Please let the developers know about
> this
> problem by filing a bug at http://defect.opensolaris.org and including
> the
> above traceback and this message. The version of pkg(5) is
> '1.122.2-56.2852'.
> -------------------------
>
> Thanks.....