Operating System - HP-UX
1832392 Members
3677 Online
110041 Solutions
New Discussion

change default directory installation inside a .depot

 
ballans
Advisor

change default directory installation inside a .depot

Hello,
I'm on HP-UX 10.20.
I want to install perl-5.6.1 on my system.
In order to install it, I download a depot software from ftp.thewrittenword.com.
I found a depot software of perl 5.6.1 for HP-UX 10.20.
But , when I make the swinstall command, it installs the software by default in /opt/TWWfsw (?) and I absolutely want that it installs in /opt/perl5...
Is there any way to do that ?
Thank's in advance for your response.
7 REPLIES 7
Michael Tully
Honored Contributor

Re: change default directory installation inside a .depot

You need to change the target directory. There are two ways, you can use the interactive part of 'swinstall' and use the menus, --> actions --> change target directory or from the command line. See the man page on 'swinstall' for details.
Anyone for a Mutiny ?
Karthik S S
Honored Contributor

Re: change default directory installation inside a .depot

Hi,

I dont think it is possible unless otherwise you edit the PSF file and make the changes and rebuild the package depot.

The option target_directory specified with sw commands only applies for swcopy command.

Ref:
http://docs.hp.com/hpux/onlinedocs/B2355-90129/B2355-90129.html

target_directory=/var/spool/sw
Applies only to swcopy. Defines the default location of the target depot.

Simplest would be to leave the default installation path as it is and create a softlink with name /opt/perl5 pointing to the actual installed directory.

Regards,
Karthik
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
ballans
Advisor

Re: change default directory installation inside a .depot

Hello,
I'm afraid that is no the solution...I try to change target path but when I do that it installs a opt/TWWfsw path inside the /opt/perl5 directory.
So my perl is installed on :
/opt/perl5/opt/TWWfsw.
For example the perl binary is located in :
/opt/perl5/opt/TWWfsw/bin/perl
and I want that it is located in :
/opt/perl5/bin/perl

In fact, the path /opt/TWWfsw is written "in hard" on the source code of the depot file.
Is there any way to modify it ?
Thanks
Karthik S S
Honored Contributor

Re: change default directory installation inside a .depot

Hi,

Yeah you are right. target_directory means the root location for the installation of the SW by default it is "/". Yeah it is hard coded to the .depot file. I will give you a clue though I am not sure if it will really work. Just try to un-tar the depot file and look for *.psf file in it. I am not able to remember the exact file name also rightnow I do not have access to HP-UX box. One of the PSF file must be having the install directory location.

Regards,
Karthik
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Karthik S S
Honored Contributor

Re: change default directory installation inside a .depot

Also Pl. go through the man pages of swpackage. I believe it has some options to repackage a existing depot.

Regards,
Karthik
For a list of all the ways technology has failed to improve the quality of life, please press three. - Alice Kahn
Balaji N
Honored Contributor

Re: change default directory installation inside a .depot

hi
here is a crude way of doing it. have done it a few times and found it working.


1. swcopy the depot to a target directory

2. go to the target directory and rename the opt/TWWfsw to opt/perl.

3. there are a couple of files (INDEX and Catalog i guess) which contains the TWWfsw directory. do a find and replace them to perl.

4. do an swinstall from this directory. perl will get installed in /opt/perl.

-balaji

ps: this is a hack and i am not aware of any consequences. use at your own risk.
Its Always Important To Know, What People Think Of You. Then, Of Course, You Surprise Them By Giving More.
Robert-Jan Goossens
Honored Contributor

Re: change default directory installation inside a .depot

Hi,

Take a look at the perl downloads on Merijn's / Procura's webpage,

http://www.cmve.net/~merijn/#Downloads

Beleave they are in tar format and you can install them where you like.

Hope it helps,

Robert-Jan.