OpenSolaris
 
 Open Source Software for Solaris
An OpenSolaris Community Site
 Current Software Packages
Open Bug Tracking
   

# /opt/csw/bin/pkg-get -?
/opt/csw/bin/pkg-get[1841]: getopts: ? bad option(s)
pkg-get,   by Philip Brown , phil@bolthole.com
 (Internal SCCS code revision 3.6)
Originally from http://www.bolthole.com/solaris/pkg-get.html

pkg-get is used to install free software packages
pkg-get
Need one of 'install', 'upgrade', 'available','compare'
  '-i|install'   installs a package
  '-u|upgrade'   upgrades already installed packages if possible
  '-a|available' lists the available packages in the catalog
  '-c|compare'   shows installed package versions vs available
  '-l|list'      shows installed packages by software name only

Optional modifiers:
  '-d|download'  just download the package, not install
  '-D|describe'  describe available packages, or search for one
  '-U|updatecatalog'   updates download site inventory
  '-S|sync'      Makes update mode sync to version on mirror site
  '-f'           dont ask any questions: force default pkgadd behaviour
                 Normally used with an override admin file
                 See /var/pkg-get/admin-fullauto

  '-s ftp://site/dir'  temporarily override site to get from
# 

# man -s 1m -M /opt/csw/man pkg-get 
Reformatting page.  Please Wait... done

Maintenance Commands                                  PKG-GET(1m)

NAME
     pkg-get 2.0 - automatic install and upgrade of packages over
     the network

SYNOPSIS
      pkg-get [modifiers] {-i|install}  {pkgname [...]|all}
      pkg-get [modifiers] {-d|download} {pkgname [...]|all}
      pkg-get [modifiers] {-u|upgrade}   [pkgname...]
      pkg-get [modifiers] {-c|compare} | {-a|available}
      pkg-get [modifiers]  -D [regexp to search for]

MODIFIERS
      -U|updatecatalog
      -d|download
      -s url://temp.site/path
      -S|sync
      -f

DESCRIPTION
     pkg-get is similar to Debian Linux "apt-get". Its most basic
     use  is that you tell it the name of a software package, and
     it automatically goes  and  grabs  it  from  the  net,  then
     installs it on your system. It also has an upgrade mode that
     installs newer versions of software you have  installed,  if
     available.

     In version 2.0, optional checksum support has been added. If
     the  remote  site  has  md5  hashes  for files, and you have
     either md5 or gmd5sum in your PATH, downloaded files will be
     checked  against  the  catalog's hash.  Additionally, if you
     try to re-download a file you already have, and  it  matches
     the  checksum,  it  will  skip the download of that specific
     file as unneccessary.

MODES
     pkg-get available

          will show you a list of freeware packages available  to
          install

     pkg-get describe {pkgname, or partial name}

          will show you descriptions of  one,  or  all,  packages
          available

     pkg-get install {pkgname [pkgname...] | all}

Phil's Software  Last change: January 4th, 2003                 1

Maintenance Commands                                  PKG-GET(1m)

          will install listed packages. If  'all'  is  specified,
          will install all packages available, at the latest ver-
          sion.

     pkg-get upgrade [pkgname [pkgname...]]

          will automatically upgrade the listed packages  to  the
          latest  version.   If  no  arguments,  will upgrade all
          packages that are already installed.

          The upgrade option will remove any  older  versions  of
          packages for you. It will also automatically choose the
          highest revision of a package to download, if there are
          multiple available.

OPTIONS
     -U|updatecatalog
          Grabs the latest catalog from  the  site  before  doing
          anything else. May be used as a command by itself.  All
          "compare versions" operations are done on  the  locally
          cached copy of the catalog.  pkg-get will automatically
          update the catalog if it is older than a month.

     -d|download
          Downloads the pkg file, and does NOT install. Useful if
          you're trying to create a local archive of pkg files

     -v   This is  only  meaningful  for  the  'install'  option,
          without arguments.  It adds "verbose" mode, to tell you
          what would be upgraded.
           BUT... it stops the program actually  downloading  any
          newer files!

     -i|install [softwarename]
          Looks through all packages you have installs, and  com-
          pares  them to the latest available on the site. If the
          site has newer versions, it will download  and  install
          all  newer  versions  of software you already have.  It
          will NOT install  packages  you  do  not  already  have
          installed.

          If you specify a  particular  software  name,  it  will
          first  look  up the specific software name in the local
          contents cache.  If you already have the  same  version
          installed,  says  so  and  quits.   Otherwise, if it is
          available, pkg-get will download and install it.

     -u|upgrade
          Attempts to upgrade any installed  packages  that  have
          newer versions available on the site.

Phil's Software  Last change: January 4th, 2003                 2

Maintenance Commands                                  PKG-GET(1m)

     -S|sync
          When in upgrade mode, tells pkg-get to sync to the ver-
          sion of the package on the software site, whether it is
          newer, or older, than what is installed.  Warning: This
          may  not  always  work  cleanly, if dependancies in the
          locally installed package are radically different  from
          ones for the older version on the software site.

     -a|available
          This just prints out the software name and revision  of
          all packages available for download.

     -D|describe
          Prints out longer descriptions of software,  if  avail-
          able.   Can take a regular expression as an argument to
          match lines.

     -c|compare
          Display a comparision  of  versions  between  installed
          packages,  and what is available on the site. If you do
          not  have  a  package  installed,  it  will  show  "not
          installed" for the local version stamp.

     -f   Force default action on pkg add  or  remove;  Dont  ask
          questions.   This  may  mean  that  it  will  refuse to
          install some packages, depending  on  what  the  pkgadd
          defaults  are,  whether  there are conflicts, etc.  The
          'normal'      defaults      are      specified       in
          /var/sadm/install/admin/default.  See the "MORE AUTOMA-
          TION" section at the bottom of this manpage.

     -r|remove
          This option  was  added  by  request.  However,  it  is
          inherently  not  as  bulletproof  as the other options,
          because nothing in the site catalog says that  the  pkg
          version  and  the  software version have to match. How-
          ever, it should work as expected 95% of the time.   And
          worst  case,  it  will ONLY remove packages that are on
          the remote site catalog; It should not  remove  Solaris
          packages.

PROXIES
     See /opt/csw/etc/pkg-get.conf for comments  on  how  to  use
     wget behind a proxy.  Basically, just export the environment
     variables http_proxy and ftp_proxy.  The conf file lets  you
     do that without messing with users' environments directly.

MORE AUTOMATION
     If you dont like answering pkgadd prompts, you can create an
     'admin' file, as /var/pkg-get/admin

Phil's Software  Last change: January 4th, 2003                 3

Maintenance Commands                                  PKG-GET(1m)

     A  sample  100%  hands-off  admin  file  is   provided,   as
     /var/pkg-get/admin-fullauto.   It  will  no  longer give you
     warnings about setuid installscripts, conflicts,  and  other
     issues.   However,  it  may still ask you in some instances,
     "Do you want to install/remove this package", unless you use
     the  -f  option  to  pkg-get.  Contrariwise,  if  you use -f
     without overriding the defaults, pkg-get will not install  a
     non-trivial amount of packages.

     For full details of the format of the admin  file,  man  -s4
     admin.

FILES
      /etc/opt/csw/pkg-get.conf
      /opt/csw/etc/pkg-get.conf
      /var/pkg-get/catalog-sitename
      /var/pkg-get/admin
      /var/pkg-get/admin-fullauto

BUGS
     I wouldn't be surprised if there are one or two bugs  to  be
     worked out. If so, please email me about them!

SEE ALSO
     If you are interested in setting up your own local  freeware
     server,

      http://www.bolthole.com/solaris/makecontents

     is the tool needed to automatically generate the catalog for
     each directory.

AUTHOR
     Philip Brown
      phil@bolthole.com
      http://www.bolthole.com/solaris/

Phil's Software  Last change: January 4th, 2003                 4


  ©2002-2007 blastwave.org
Built by and for the OpenSolaris™ Community
questions to info@blastwave.org

Sun™ Logo Published with Permission from Sun Microsystems, Inc.
Valid HTML 4.01!
Valid CSS