[p4perl] Problem using P4->FetchClient() (CALL#2151058)

Scott Lavender Scott.Lavender at visiprise.com
Fri Sep 19 06:50:59 PDT 2008


Tony,

Thanks for responding...

I get the following output from the attached test script when run as the
new user:

===============================================
Using Perforce Client Workspace "build_ProdTest" ...

TEST: Error - Perforce password (P4PASSWD) invalid or unset.

TEST: $client is a  reference, .
TEST: that has 0 keys.
===============================================

Also, see attached reply to support...

-----Original Message-----
From: Tony Smith [mailto:tony at smee.org] 
Sent: Friday, September 19, 2008 9:42 AM
To: p4perl at perforce.com
Cc: Scott Lavender; support at perforce.com
Subject: Re: [p4perl] Problem using P4->FetchClient() (CALL#2151058)

Hi Scott,

Could you try adding some debugging to the script and see what we get?

	$p4->Debug( 2 );

ought to do the job. If you can send me the output, I'll take a look.

Thanks,

Tony

On Thursday 18 September 2008 19:44:47 Scott Lavender wrote:
> Attached test script run as both users.
>
> User1
> ==============================
> Using Perforce Client Workspace "build_ProdTest" ...
>
> TEST: $client is a HASH reference, HASH(0x2a0a81c).
> TEST: that has 11 keys.
> TEST: Root => D:\P4Views\build_ProdTest
> TEST: Options => noallwrite noclobber nocompress unlocked nomodtime
> normdir
> TEST: View => ARRAY(0x2a0a8a0)
> TEST: Owner => build
> TEST: LineEnd => local
> TEST: Update => 2008/09/18 09:15:38
> TEST: Client => build_ProdTest
> TEST: Host => KENOS
> TEST: Description => Created by build.
>
> TEST: SubmitOptions => submitunchanged
> TEST: Access => 2008/09/18 14:39:35
>
>
> User2
> ==============================
> Using Perforce Client Workspace "build_ProdTest" ...
>
> TEST: $client is a  reference, .
> TEST: that has 0 keys.
>
>
>
> -----Original Message-----
> From: Harold MacKiernan [mailto:support at perforce.com]
> Sent: Thursday, September 18, 2008 2:09 PM
> To: Scott Lavender; p4perl at perforce.com
> Subject: Re: Problem using P4->FetchClient() (CALL#2151058)
>
> Hello Scott:
>
> I suspect some part of the Perforce environment is not set correctly
> for 'DOMAIN2\User2'.  You can confirm what values are in force, and
> how they are set (via evironment, registry, P4CONFIG file) by using
'p4
> set' from the command line:
>
>   1) Log in as DOMAIN2\User2
>   2) From a Command Prompt, issue:
>
>      p4 set
>
>   3) The output will be something like the following:
>      P4CONFIG=p4config.txt
>      P4PORT=10.0.100.191:20073 (set)
>      P4USER=hmackiernan (set -s)
>      P4CLIENT=hmackiernan_client (config)
>
> Values marked 'set' were set in the registry for the current user via
> 'p4 set'.  Values marked 'set -s' were set for _all_ users via 'p4 set
> -s'.  Values marked 'config' are set in a configuration file and
> values not otherwise marked are set via environment variables.
>
> You can use a configuration file in lieu of relying on environment
> variables to set P4PORT/P4USER/P4CLIENT for your build script. P4Perl
> will look for this file (Based on the value of 'P4CONFIG') to find its
> Perforce environment settings:
>
>   1) Create a file called 'p4config.txt' with the values you want for
>      your build script in the same format as above, e.g.:
>
>      P4USER=User2
>      P4CLIENT=build_client
>      P4PORT=scm.visiprise.com:1666
>
>   2) Save the file in the same location as the build script.
>
>   3) Set the registry value of 'P4CONFIG' for all users 'p4config.txt'
>      by issuing:
>
>        p4 set -s P4CONFIG=p4config.txt
>
>
> I hope that's helpful to you, but if you are still having difficulty
> or if you have further questions, please let me know and I'll be happy
> to assist you further.  In that case, would you please include:
>
>   - the output of 'p4 info'
>   - your version of P4Perl:
>
>       perl -e "use P4;print P4::Identify();
>
>   - your build script (if you wouldn't mind) so that I can see where
>     else it might be tripping up
>
> Thanks very much, and Best Regards,
>
> =Harold
>
>
>
> On Thu Sep 18 10:01:07 PDT 2008 Adam Morriss <support at perforce.com>
>
> said:
> > Hi Scott.
> >
> > > We have a production build system that is working as expected. As
a
>
> part
>
> > > of the build process, we have a Perl front-end script that sets up
>
> the
>
> > > client workspace by adding the branch to be built and synching the
> > > workspace before the build processing is launched. Test code
>
> recently
>
> > > added shows that the value returned from the call to
p4->FetchClient
>
> is
>
> > > correct.
> >
> > <snip>
>
> --
> Harold MacKiernan
> Perforce Software
> Technical Support
> support at perforce.com
>
>
>
> !DSPAM:48d2a1a5251811336712104!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: p4test.pl
Type: application/octet-stream
Size: 928 bytes
Desc: p4test.pl
URL: <http://maillist.perforce.com/pipermail/p4perl/attachments/20080919/c34aab02/attachment-0001.obj>
-------------- next part --------------
An embedded message was scrubbed...
From: "Scott Lavender" <Scott.Lavender at visiprise.com>
Subject: RE: Problem using P4->FetchClient() (CALL#2151058)
Date: Fri, 19 Sep 2008 09:06:13 -0400
Size: 4643
URL: <http://maillist.perforce.com/pipermail/p4perl/attachments/20080919/c34aab02/attachment-0001.mht>


More information about the p4perl mailing list