Operating System - HP-UX
1833171 Members
3712 Online
110051 Solutions
New Discussion

Add entries to swlist for reference ???

 
MikeL_4
Super Advisor

Add entries to swlist for reference ???

Between our development and production servers prior admins have tried to keep them in sync but needless to say it failed.
But what we have is a script that runs a swlist on the servers and does a diff command to see what is installed on one versus the other.
We may of installed several patch levels on development for certain issues and when it came time for moving to production, installed the latest only, thus leaving the possibility of patches on development but not on production.
Is there some way to make some sort of "Reference Patch" that we can install on production that simply is a comment saying supperceedecd by xxxx.
i.e.: If the most current libc cumulative patch on the server is PHCO_19491, can I create a dummy patch for, PHCO_18103 that would simply be a comment saying, libc cumulative superceded by PHCO_19491 ???
7 REPLIES 7
Helen French
Honored Contributor

Re: Add entries to swlist for reference ???

If I understood correctly, this command will say if one patch has been superceded by another one which is installed on the system (defenitely not a dummy one!):

# swlist -v -l fileset | grep PHCO_XXXX

Here, if PHCO_XXXX has been superceded by another installed patch PHCO_YYYY, then the above command will rpeort it.

Not sure if this is what you are looking for ...
Life is a promise, fulfill it!
James R. Ferguson
Acclaimed Contributor

Re: Add entries to swlist for reference ???

Hi Michael:

Probably the easist way to address this is to use the 'show_patches' utility. This uses the 'patch_state' and 'superseded_by' patch attributes.

# show_patches -a

...shows only active patches, hiding superseded ones.

# show_patches -s

...shows superseded patches.

Do a man 'show_patches' for more information.

Regards!

...JRF...


MikeL_4
Super Advisor

Re: Add entries to swlist for reference ???

Using your example, let's say PHCO_YYYYY is installed on the server but not PHCO_XXXXX.

What we would want to do is create a patch, PHCO_XXXXX, that would be nothing more that placing a "Comment Patch" out there stating it was superceded by PHCO_YYYYY. Once creating what we need to for PHCO_XXXXX we would then do a swinstall on PHCO_XXXXX. Then if we were to later do a swlist for PHCO_XXXXX instead of it not being there it would find it but it's description would only state that it was superceeded by PHCO_YYYYY.
James R. Ferguson
Acclaimed Contributor

Re: Add entries to swlist for reference ???

Hi Michael:

The 11x versions of the SD utilities have the information you want already built it.

Try this:

# swlist -l patch -a patch_state -a superseded_by

Regards!

...JRF...

Helen French
Honored Contributor

Re: Add entries to swlist for reference ???

Sorry to say ... but I didn't understand it fully. I would install the tested patches to the production system and if it's superceded, swlist -v will tell you that info.

Good luck!
Life is a promise, fulfill it!
MikeL_4
Super Advisor

Re: Add entries to swlist for reference ???

This is not really that easy to explain here but I'll try again to do my best.
On the development and production servers we have a script that does an:
swlist -l product | grep -e PHCO_ -e PHSS_ -e PHKL_ | sort -u > production_swlist.out

Than the same is done on development and a diff command is done against the two files producing a list of patches that are installed on development but not on production..
i.e.:
PHCO_17601 1.0 libc cumulative patch
PHCO_18103 1.0 libc cumulative patch
PHCO_19391 1.0 libc cumulative patch
PHCO_19491 1.0 libc cumulative patch
PHCO_22314 1.0 libc cumulative patch

For whatever reason, say that on both servers the most current patch for the above is PHCO_99999, and since it is installed on both servers does not show up on the difference report.
What we, "The Boss" whats is a clean difference's report except for what patches may be currently being tested in development.
So on the Production server we would like some way to apply the above patches, PHCO_17601 ... etc... but only as "Comment type patches, NO CODE RELATED CHANGE"

HJope this better explains..
Helen French
Honored Contributor

Re: Add entries to swlist for reference ???

Try "swlist -v -l fileset" instead of "swlist -l fileset" and the compare the outputs. Your comparison will then be an exact match regardless of the patch state (superceded, installed, latest etc).
Life is a promise, fulfill it!