1820636 Members
1795 Online
109626 Solutions
New Discussion юеВ

where is software depot?

 
SOLVED
Go to solution
Fred Martin_1
Valued Contributor

where is software depot?

I am running HP-UX 10.20, with this directory:

/var/adm/sw

...which includes:

/var/adm/sw/save
/var/adm/sw/patch
/var/adm/sw/producst

This was the default setup. When I run a command such as 'cleanup' it can't seem to find the depot. I've tried:

# cleanup -d /var/adm/sw
# cleanup -d /var/adm/sw/save
# cleanup -d /var/adm/sw/patch
# cleanup -d /var/adm/sw/products

...but I always get something like:

Error: /var/adm/sw not a valid depot!

So what am I doing wrong, what is the depot exactly?
fmartin@applicatorssales.com
11 REPLIES 11
Krishna Prasad
Trusted Contributor
Solution

Re: where is software depot?

The command swlist -l depot should list all the depots you have on the system. Then you can run cleanup -d "depot"
Positive Results requires Positive Thinking
Patrick Wallek
Honored Contributor

Re: where is software depot?

What exactly are you trying to cleanup? Are you trying to get rid of patch information?

If so, then you need to do a cleanup, without any options. If I remember correctly the -d option lets you specify a depot, which the /var/adm/sw directory structure is NOT.

A depot is a file that contains all necessary information to install a product, like ignite-ux, mirror/ux, etc.

The /var/adm/sw directory structure is also known as the Installed Product Database (IPD).

You can use the cleanup command to get rid of patch information for patches that have been superseded, or patch information that has been saved, and you aren't concerned about being able to back out a patch.

For those options, you want to use either 'cleanup' or 'cleanup -f' (I think).

The -d options lets you specify a depot you may have created yourself, like a patch depot, and it will remove any patches in there that have been superseded by another patch in the depot.

Does this make sense?
S.K. Chan
Honored Contributor

Re: where is software depot?

I've used "cleanup -f" and it works for me.
James R. Ferguson
Acclaimed Contributor

Re: where is software depot?

Hi Fred:

Patrick is correct. On 10.20, simply type:

# cleanup

Regards!

...JRF...
Helen French
Honored Contributor

Re: where is software depot?

Fred Martin_1
Valued Contributor

Re: where is software depot?

Tried swlist...

# swlist -l depot
WARNING: No depot was found for "corp:".

I haven't created any depots on my own, I'm just trying to recover some disk space by removing older and superceded patch data.

I just tried 'cleanup' without options and that does appear to run, it starts but I haven't run it yet.

I'm probably all set. I'm going to copy the whole of /var/sw to a tape, then run cleanup without arguments.

fmartin@applicatorssales.com
James R. Ferguson
Acclaimed Contributor

Re: where is software depot?

Hi (again) Fred:

You can do:

# swlist

...without further options to see you principal bundles on your server. Other useful forms for more detail are:

# swlist -l fileset

When you run 'cleanup' you will be asked if you want to trim the 'sw' logfiles (from previous 'swcopy', 'swinstall', etc. sessions). Answer affirmatively, as this is useful to reclaim disk space. You will also be prompted to make or have made a copy of /var/adm/sw before proceeding. You have already correctly assumed that this is "nice insurance".

It is useful to run 'cleanup' immediately *before* patch installations, particularly of large bundles like the GR [General Release] or QPK [Quality Pack] bundles. By running the 'cleanup' beforehand you gain necessary space while leaving patches available for rollback for the longest period necessary.

Regards!

...JRF...
Bill Hassell
Honored Contributor

Re: where is software depot?

A software depot is created by using the swreg command. If you have never done this then there will be no software depots on your system.


Bill Hassell, sysadmin
Darrell Allen
Honored Contributor

Re: where is software depot?

Hi Fred,

One thing to remember is that the installed products on a system does not constitute a depot. Rather, a depot is a source for software installation. swlist, swremove, cleanup, etc are by default running against the Installed Products Database however they can be instructed to run against a depot by specifying a command line arg.

There is a concept of registering depots (man swreg). While this is not neccessary in order to use a depot, it can be quite useful. For example, you can have a server containing numerous depots. After registering those depots you can list them with swlist -l depot (which only lists registered depots). Since Software Distributor is a client / server environment, other hosts can request a list of registered depots from the depot server. When using interactive swinstall, it can be much easier to have a list of registered depots for you to choose from than for you to have to type in the full path name of a depot.

Darrell
"What, Me Worry?" - Alfred E. Neuman (Mad Magazine)
James R. Ferguson
Acclaimed Contributor

Re: where is software depot?

Hi Fred:

I want to offer one more esoteric point about software depots and 'swreg'.

That is, if you create a depot with 'swcopy', then there is no need to register the depot with 'swreg', as it is done *automatically* by 'swcopy'.

For instance, to collect a series of patches into a depot the can be installed with a single reboot, simply download your patches into the /tmp directory; "un-shar" them and do:

# cd /tmp
# for X in PH*.htm
> do
> sh ${X}
> done

# PDIR=/tmp/patch_depot #...my choice for the depot name...
# mkdir ${PDIR}
# for X in PH*.depot
> do
> swcopy -s ${PWD}/${X} \* @ ${PDIR}
> done

# swlist -s ${PDIR}

Note that the 'swlist' allows you to preview the depot's contents. The registration of the depot is already done.

Regards!

...JRF...
Fred Martin_1
Valued Contributor

Re: where is software depot?

Thank you all, for the information. I have a small network here and my situation is simple - a single unix server. I install the quarterly patches when they come in, add the occasional downloaded patch as the need arises. In the five yeaers that I have worked with HP-UX (9.04 and 10.20) I've never had to roll back a patch.

So last night I just backed up /var/adm/sw to a tape, and ran 'cleanup' with no options. It recovered a lot of space (/var went from 92% to 49%, I know that's relative). I probably could have used 'cleanup -F' and removed it all, given my situation and the fact that I could restore it all from tape if need be.
fmartin@applicatorssales.com