quality@glassfish.java.net

RE: [pkg] pkg command question/bug

From: Karen Ho <hokar_at_hotmail.com>
Date: Wed, 15 Apr 2009 10:28:20 -0700

Hi Tom,

 

Thank you for your prompt reply and explanation. I will read the online
help in the future for detail help content.

 

Thanks & Regards,

Karen

 

From: Tom.Mueller_at_Sun.COM [mailto:Tom.Mueller_at_Sun.COM]
Sent: Wednesday, April 15, 2009 10:21 AM
To: quality_at_glassfish.dev.java.net
Subject: Re: [pkg] pkg command question/bug

 

Karen,

What you have quoted is a usage message, which is intended to show the
syntax as a quick reference without explaining what the option does.
Information about what it does is in the manual page. The same manual pages
are shipped for Unix, Linux and Windows, even though some of the information
on the manual page is specific to Unix. The manual pages are available from
the on-line help for updatetool under "Key Concepts" and then "Command Line
Interface". Or, you can type out the file from the location indicated
below.

Tom

Karen Ho wrote:

Hi Tom,

 

Is there any difference between the manual page in UNIX or LINUX versus
windows? In windows, the explanation for -R is like this:

 

Options:

        -R dir

        -D/--debug name=value

 

Which I couldn't understand the usage of "-R" by reading the help content
"-R dir". Or is there any way to further read the help detail of the
options section in Windows? Sorry for bugging you with this kind of simple
question.

 

Karen

 

From: Tom.Mueller_at_Sun.COM [mailto:Tom.Mueller_at_Sun.COM]
Sent: Wednesday, April 15, 2009 9:58 AM
To: Karen Ho
Cc: quality_at_glassfish.dev.java.net
Subject: Re: [pkg] pkg command question/bug

 

The -R option is listed under the Options section in the usage message. It
is also described in the pkg(1) manual page that can be found in the
pkg/man/cat1/pkg.1 file within the install image.

Cheers,
Tom


Karen Ho wrote:

Hi Tom,

 

I see. Thanks for the explanation. In that case, it would be great if the
help of the pkg command can explain the use of the -R option. I'll file a
low priority issue for this. J

 

Current pkg help (no explanation of -R option):

=======================================================

C:\dev\glassfishv3\bin> pkg help

Usage:

        pkg [options] command [cmd_options] [operands]

 

Basic subcommands:

        pkg install [-nvq] [--no-refresh] [--no-index] package...

        pkg uninstall [-nrvq] [--no-index] package...

        pkg list [-aHsuvf] [package...]

        pkg image-update [-fnvq] [--no-refresh] [--no-index]

        pkg refresh [--full] [authority ...]

        pkg version

        pkg help

 

Advanced subcommands:

        pkg info [-lr] [--license] [pkg_fmri_pattern ...]

        pkg search [-lrI] [-s server] token

        pkg verify [-Hqv] [pkg_fmri_pattern ...]

        pkg fix [pkg_fmri_pattern ...]

        pkg contents [-Hmr] [-o attribute ...] [-s sort_key]

            [-t action_type ... ] [pkg_fmri_pattern ...]

        pkg image-create [-fFPUz] [--force] [--full|--partial|--user]
[--zone]

            [-k ssl_key] [-c ssl_cert] [--no-refresh] -a <prefix>=<url> dir

 

        pkg set-property propname propvalue

        pkg unset-property propname ...

        pkg property [-H] [propname ...]

 

        pkg set-authority [-Ped] [-k ssl_key] [-c ssl_cert] [--reset-uuid]

            [-O origin_url] [-m mirror_to_add | --add-mirror=mirror_to_add]

            [-M mirror_to_remove | --remove-mirror=mirror_to_remove]

            [--enable] [--disable] [--no-refresh] authority

        pkg unset-authority authority ...

        pkg authority [-HPa] [authority ...]

        pkg history [-Hl]

        pkg purge-history

        pkg rebuild-index

 

Options:

        -R dir

        -D/--debug name=value

 

Environment:

        PKG_IMAGE

 9:45:35.11

 

Thanks & Regards,

Karen

 

From: Tom.Mueller_at_Sun.COM [mailto:Tom.Mueller_at_Sun.COM]
Sent: Wednesday, April 15, 2009 6:48 AM
To: quality_at_glassfish.dev.java.net; hokar_at_hotmail.com
Subject: Re: [pkg] pkg command question/bug

 

Karen,

This is the way that the pkg(1) command is designed. There is a -R option
to the command for providing the location of the image. If -R is not
specified, then it uses the current working directory as the default. The
pkg command never uses the location of the executable to find the image.

Cheers,
Tom


Karen Ho wrote:

Hi,

 

Please kindly help to verify if this is a bug or a feature(?) for the pkg
command:

 

If you directly run the pkg command (e.g. pkg list -a) in the bin directory
(refer to example 1 below), it will be run successfully. However, if you
try to run the same pkg command outside the glassfish directory (refer to
example 2 below), it will prompt an error message saying that "pkg: No image
found." It looks like that the pkg command will look up the application
image from current execution folder instead of the path where the pkg
command located. Is it a bug? Please clarify.

 

Example 1

=================================

C:\dev\glassfishv3\bin>pkg list -a

NAME (AUTHORITY) VERSION STATE
UFIX

felix 1.2.2-0 installed
----
glassfish-amx                                 3.0-44          installed
----
glassfish-api                                 3.0-44          installed
----
glassfish-appclient                           3.0-44          installed
----
.
 
 
Example 2
=================================
D:\somewhere>C:\dev\glassfishv3\bin\pkg list -a
pkg: No image found.
 
 
Thanks & Regards,
Karen