GuestbookSign our guestbook ContactGet in touch with the authors ArchiveAll unixwerk articles since 2003
March 28, 2014

Software Depots for HP-UX

If you save all your depots for HP-UX in the same place, here are some tips for SD-UX.

Example:

Tip: you can use the -p (preview) option in all commands. No action will be taken, the commands only checks if the action is possible.

Contents

  1. List depots, products
  2. Copy remote depot to myDepotServer
  3. Delete product, filesets from depot
  4. Install product

 

List depots, products

List all depots:

# /usr/sbin/swlist -l depot -s myDepotServer

Copy new products only in the same structure as exist on the myDepotServer, please.

List products in selected depot: (example)

# /usr/sbin/swlist -l product -s myDepotServer: /SoftwareDepot/11.31/Apps/HP/WBEMMgmtBundle/C.03.01

Look for software NparProvider in all depots on myDepotServer.

# swlist -ldepot -s myDepotServer| grep -i 11.31|grep -v -i swa \
                    |awk '{printf("echo %s;swlist -l product -s myDepotServer:%s \
                    |grep -i nparprovider\n",$1,$1)|"/bin/sh"}'

 

Copy remote depot to myDepotServer

# /usr/sbin/swcopy -x enforce_dependencies=false -s RemoteDepotServer:/var/spool/sw \* @ myDepotServer: /SoftwareDepot/11.11/Patches

Copy all software, there stay on RemoteDepotServer in depot /var/spool/sw to destination myDepotServer in depot /SoftwareDepot/11.11/Patches. If you would like to copy a single product or fileset, replace the \* with your product or fileset. If the destination directory does not exist, swcopy will create it and register the new depot. You must add the option -x enforce_dependencies , else if swcopy can't resolve the dependencies, the copy process fails. After copy process is ready, check if the destination depot is clean.

# /usr/sbin/swverify -x enforce_dependencies=false -d \* @ myDepotServer: /SoftwareDepot/11.11/Patches

Also check, if you can make a list of the products or filesets in the destination depot.

# /usr/sbin/swlist -l product -s myDepotServer: /SoftwareDepot/11.11/Patches
# /usr/sbin/swlist -l fileset -s myDepotServer: /SoftwareDepot/11.11/Patches

 

Delete product, filesets from depot

If you would like delete a fileset, product or depot you can do following:

Delete fileset from depot

# swremove -d \* @ myDepotServer: /SoftwareDepot/11.11/Apps/HP/OnlineDiag/20.03

\* means delete all software from depot and delete the depot.

 

Install product

If you install a product on remote host, use following steps:

# swinstall -x autoreboot=true -s myDepotServer: /SoftwareDepot/11.11/Apps/HP/OnlineDiag/20.03 \*

Install all software in depot /SoftwareDepot/11.11/Apps/HP/OnlineDiag/20.03

If the installed software needs a reboot, add the option -x autoreboot=true.

For patch depot installation add following option (example):

# swinstall -x autoreboot=true -x patch_match_target=true -s myDepotServer: /SoftwareDepot/11.11/patch_depot_ex

Or if you need install a single patch(example):

# swinstall -x autoreboot=true -s myDepotServer: /SoftwareDepot/11.11/patch_depot_ex PHSS_34011

If the preview run returns without errors or warnings, run the same command without -p option.

# swinstall -s myDepotServer: /SoftwareDepot/11.11/Apps/HP/OnlineDiag/20.03 \*