[interchange-cvs] interchange - heins modified
lib/Vend/Table/Common.pm
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Sun Jul 11 22:41:39 EDT 2004
User: heins
Date: 2004-07-12 02:41:38 GMT
Modified: lib/Vend/Table Common.pm
Log:
* Don't deposit IC_LOCKING files in catalog root.
Revision Changes Path
2.35 +6 -3 interchange/lib/Vend/Table/Common.pm
rev 2.35, prev_rev 2.34
Index: Common.pm
===================================================================
RCS file: /var/cvs/interchange/lib/Vend/Table/Common.pm,v
retrieving revision 2.34
retrieving revision 2.35
diff -u -r2.34 -r2.35
--- Common.pm 17 Nov 2003 23:41:13 -0000 2.34
+++ Common.pm 12 Jul 2004 02:41:38 -0000 2.35
@@ -1,6 +1,6 @@
# Vend::Table::Common - Common access methods for Interchange databases
#
-# $Id: Common.pm,v 2.34 2003/11/17 23:41:13 edl Exp $
+# $Id: Common.pm,v 2.35 2004/07/12 02:41:38 mheins Exp $
#
# Copyright (C) 2002-2003 Interchange Development Group
# Copyright (C) 1996-2002 Red Hat, Inc.
@@ -23,7 +23,7 @@
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
# MA 02111-1307 USA.
-$VERSION = substr(q$Revision: 2.34 $, 10);
+$VERSION = substr(q$Revision: 2.35 $, 10);
use strict;
package Vend::Table::Common;
@@ -142,11 +142,14 @@
my $lockhandle;
if(not $lockhandle = $s->[$CONFIG]{_lock_handle}) {
my $lf = $s->[$CONFIG]{file} . '.lock';
+ unless($lf =~ m{/}) {
+ $lf = ($s->[$CONFIG]{dir} || $Vend::Cfg->{ProductDir}) . "/$lf";
+ }
$lockhandle = gensym;
$s->[$CONFIG]{_lock_file} = $lf;
$s->[$CONFIG]{_lock_handle} = $lockhandle;
open $lockhandle, ">> $lf"
- or die errmsg("Cannot lock table %s: %s", $s->[$CONFIG]{name}, $!);
+ or die errmsg("Cannot lock table %s (%s): %s", $s->[$CONFIG]{name}, $lf, $!);
}
#::logDebug("lock handle=$lockhandle");
Vend::Util::lockfile($lockhandle);
More information about the interchange-cvs
mailing list