Solaris 11 pkg repository commands Cheat sheet (Part – 1)

In coming post series I am going to show you the usage of package repository commands in Solaris 11.

How to check the package repository location?

root@solaris11:~# pkg publisher
PUBLISHER TYPE STATUS P LOCATION
solaris origin online F file:///repo-pool/zfs1/

Getting the description regarding repository.

SYNTAX : pkgrepo get [-F format] [-p publisher …] -s repo_uri_or_path
[section/property …]

root@solaris11:~# pkgrepo get -s file:///repo-pool/zfs1/
SECTION PROPERTY VALUE
publisher prefix solaris
repository description This\ repository\ serves\ a\ copy\ of\ the\ Oracle\ Solaris\ 11.1\ Build\ 24b\ Package\ Repository.
repository name Oracle\ Solaris\ 11.1\ Build\ 24b\ Package\ Repository
repository version 4

To get more detailed and useful information.

root@solaris11:~# pkgrepo get -p solaris -s file:///repo-pool/zfs1/
PUBLISHER SECTION PROPERTY VALUE
solaris publisher alias
solaris publisher prefix solaris
solaris repository collection-type core
solaris repository description “”
solaris repository legal-uris ()
solaris repository mirrors ()
solaris repository name “”
solaris repository origins ()
solaris repository refresh-seconds “”
solaris repository registration-uri “”
solaris repository related-uris ()

How to change the above listed parameter?

SYNTAX : pkgrepo set [-p publisher …] -s repo_uri_or_path
section/property[+|-]=[value] … or
section/property[+|-]=([value]) …

root@solaris11:~# pkgrepo set -s file:///repo-pool/zfs1/ repository/description=”Locally Created Repository of Solaris 11.1″

Now changes will be reflected in output.

root@solaris11:~# pkgrepo get -s file:///repo-pool/zfs1/
SECTION PROPERTY VALUE
publisher prefix solaris
repository description Locally\ Created\ Repository\ of\ Solaris\ 11.1
repository name Oracle\ Solaris\ 11.1\ Build\ 24b\ Package\ Repository
repository version 4

How to Check how many packages are present in local repository?

root@solaris11:~# pkgrepo info -s file:///repo-pool/zfs1/
PUBLISHER PACKAGES STATUS UPDATED
solaris 4401 online 2012-09-27T22:22:59.530981Z

How to list all the packages present in repository?

SYNTAX: pkgrepo list [-F format] [-H] [-p publisher …] -s repo_uri_or_path
[pkg_fmri_pattern …]

root@solaris11:~# pkgrepo list -s file:///repo-pool/zfs1/ | more
PUBLISHER NAME O VERSION
solaris BRCMbnx r 0.5.11,5.11-0.133:20101027T183107Z
solaris BRCMbnxe r 0.5.11,5.11-0.133:20101027T183108Z
solaris CPQary3 r 0.5.11,5.11-0.133:20101027T183108Z
solaris FSWfontconfig-devel-docs o 0.5.11,5.11-0.130:20101027T183140Z

If you want to see the particular package.

root@solaris11:~# pkgrepo list -s file:///repo-pool/zfs1/ BRCMbnx
PUBLISHER NAME O VERSION
solaris BRCMbnx r 0.5.11,5.11-0.133:20101027T183107Z

I will come to the description of column ‘O’ and VERSION in another article.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s