Operating System - HP-UX
1833994 Members
5029 Online
110063 Solutions
New Discussion

swpackage ERROR: Cannot lock ...

 

swpackage ERROR: Cannot lock ...

Hi,
I try to rebuild a swpackage and get following messages:
root@cad517 /var/install/packages/psf # swpackage -s Printer @ ../depot

======= 07/07/03 11:57:55 METDST BEGIN swpackage SESSION

* Session started for user "root@cad517".

* Source: cad517:Printer
* Target: cad517:../depot
* Software selections:
*


* Beginning Selection Phase.
* Reading the Product Specification File (PSF) "Printer".
* Reading the product "Printer" at line 1.
* Reading the fileset "Printer" at line 16.

ERROR: Cannot lock "../depot" because another command holds a
conflicting lock. The process id of that command is 2030.
ERROR: Cannot read the target "../depot".

======= 07/07/03 11:57:56 METDST END swpackage SESSION

After a reboot swpackage conflicts with the same process id. But process 2030 doesn't exist.

Any suggestions?

Clemens
always look on the bright side of life
4 REPLIES 4
T G Manikandan
Honored Contributor

Re: swpackage ERROR: Cannot lock ...

Did you do any change in /etc/hosts

Just do a
#/usr/sbin/swagentd -r
Massimo Bianchi
Honored Contributor

Re: swpackage ERROR: Cannot lock ...

Hi,
check this files

/var/adm/sw/products/swlock
/var/spool/sw/catalog/swlock



and delete them.

Should do the trick.

HTH,
Massimo
T G Manikandan
Honored Contributor

Re: swpackage ERROR: Cannot lock ...

Man pages of swpackage

/*

SD commands use a common locking mechanism for reading and modifying
both root directories and software depots. This mechanism allows
multiple readers but only one writer on a root or depot.

The SD commands which modify software in an (alternate) root directory
are restricted from simultaneous modification using fcntl(2) locking
on the file

var/adm/sw/products/swlock

relative to the root directory (e.g. /var/adm/sw/products/swlock).

The SD commands which modify software in a depot are restricted from
simultaneous modification using fcntl(2) locking on the file

catalog/swlock

relative to the depot directory (e.g. /var/spool/sw/catalog/swlock).

*/

So the above post should do the trick

Thanks

Re: swpackage ERROR: Cannot lock ...

Thanks to all.
I've already found a file depot/catalog/swlock.
But I didn't mention. This file was from 1999 and empty. I use swpackage almost every week...
So I was searching for a file containing the pid 2030.

Thanks again.
Clemens
always look on the bright side of life