Operating System - HP-UX
1830898 Members
1946 Online
110017 Solutions
New Discussion

Re: swlist issue:can not list old version when new version is installed

 
gwind
Occasional Contributor

swlist issue:can not list old version when new version is installed

I migrated software using swinstall, but the old version can not be listed using swlist after the migration was finished,and I checked the /var/adm/sw/products and found that there was only one directory which should be two. what is the reason?
9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: swlist issue:can not list old version when new version is installed

What product is this? In most cases when you install a new version the old is removed.

Any special options you used for swinstall?
Bob E Campbell
Honored Contributor

Re: swlist issue:can not list old version when new version is installed

This is the normal behavior of an SD package. A new version of an SD-packaged product is a complete replacement. If you remove the new version you should have nothing left. Some products, such as Java, will support multiple *versions* by giving each version a different product tag. For a single Java varsion (Jre14) you should only have one revision (yes, corner cases exist...).

Patches are different. Each new patch will have a different product tag. They replace by a supersession mechanism and do not use revisions. Patches save rollback information to allow a return to the prior patch.

If you tell us the specific product as well as how you want to use the two revisions we might be able to help come up with a solution.
gwind
Occasional Contributor

Re: swlist issue:can not list old version when new version is installed

We are installing our products in HP-UX based machine using swinstall, and list the products using swlist when those are installed.

Our products are all bundled using swpackage and .psf file, and stored in a depot where used to be installed.

I noticed that when our other products were installed with two different versions, there are two direcories in /var/adm/sw/products, i.e. AAA, AAA.2.

When I installed the product I mentioned with old version, there exists one direcory called i.e. BBB in /var/adm/sw/products, but when I installed a new version, there is still one direcory called BBB.2 in /var/adm/sw/products which should be two direcories, that is to say, BBB is replaced by BBB.2.

And I also noticed that the content information(product,filesets) about the product I installed in INDEX file in /var/adm/sw/products has been changed to the new product's.

Does it mean that I should changed the tag information to different ones in .psf so that I can install multiple versions in HP-UX?

And during what mechanism does swinstall install a product in the system and write the information into the INDEX file in /var/adm/sw/products?

BTW,I can list two different versions using swlist when I changed the information of INDEX file in /var/adm/sw/products.
Mridul Shrivastava
Honored Contributor

Re: swlist issue:can not list old version when new version is installed

Changing information in INDEX file will certainly lead to complex problems..
swlist may be showing multiple versions of the software installed , however the information laid down on libraries and kernel is of latest version only..

This may lead to confusion and in future someone else may get confused with it and like if there are some issue with software or system at a later stage it will be very difficult to get root cause of them.

INDEX file is modified automatically whenever we install, remove, configure a software.
Time has a wonderful way of weeding out the trivial
gwind
Occasional Contributor

Re: swlist issue:can not list old version when new version is installed

Sure, I will not change the INDEX file manually, just let it be updated automaticlly.

My question is how can I list multiple versions using swlist when I installed products with different versions using swinstall.
Mridul Shrivastava
Honored Contributor

Re: swlist issue:can not list old version when new version is installed

It's not possible to have multiple versions of a product/software installed..

Once you install the latest version of the software it overwrites the binaries and libraries of the prev version so at any given time you will have only one version of the product.

Just in case if you manage to have two versions of a product installed ( I have seen few cases)... then you won't be able to use the product and need to remove both of them to resolve the issue...
Time has a wonderful way of weeding out the trivial
Dennis Handly
Acclaimed Contributor

Re: swlist issue:can not list old version when new version is installed

>I noticed that when our other products were installed with two different versions, there are two direcories in /var/adm/sw/products, i.e. AAA, AAA.2.

This can occur when you have a depot where you have both PA and IPF bits. Only one of these will actually be in the IPD.
Bob E Campbell
Honored Contributor

Re: swlist issue:can not list old version when new version is installed

There are reasons I can think of that could cause this, all involving a common theme. If the product BBB has filesets A, B, and C in version #1 and filesets B, C, and D in version #2 then an update from version 1 to 2 will not completely overwrite the original product. If you run the command:

# swlist -l fileset -a software_spec BBB

You can easily see the parts that are left behind from the first version. By using the full software specification, you can ask swremove to remove those parts that no longer apply.

Now, if fileset D was supposed to replace fileset A and has the same files calling swremove is not the right answer. In this case you can use the swmodify(1M) command to have the IPD forget erroneous content. This problem could have been avoided if the A->D relationship was registered with the ancestor attribute.
gwind
Occasional Contributor

Re: swlist issue:can not list old version when new version is installed

Hi Guys, this problem has been resolved in a quite easy way by changing the product direcotory path to a different one comparing with the previous one in .psf file.
Thanks for all of you.