hi,
i added the following sub to Common.pm (the one in Program Files. the problem, 
I remind you, is that the daemon won't start):

sub debug_tsahi {
    my ($varName, $varValue) = @_;
    open OUTFILE, "> C:/Temp/debug_info.txt";
    print OUTFILE "name: $varName\n";
    print OUTFILE Dumper ( $varValue );
    close OUTFILE;
}

and scattered calls to it throughout package_exists:

sub package_exists {
    my ( $package_name, $minimum_package_version ) = ( @_ );
    my $cmd;
    debug_tsahi("package_name", $package_name);
    if ( $package_name =~ /\.pl$/ ) {
    # .pl files need "" quotes on require
    $cmd .= "require \"" . $package_name . "\";";
    } else {
    # .pm files don't need quotes on require
    $cmd .= "require " . $package_name . ";";
    }

    # Modules may change $SIG{__DIE__} and $SIG{__WARN__}. Localise
    # them here so that later errors display 'normally'
    local $::SIG{__DIE__};
    local $::SIG{__WARN__};
    debug_tsahi("cmd", $cmd);
    if ( !eval { $cmd } ) {
    return 0, "";
    } else {

    if ( defined ( $minimum_package_version ) ) {
        my $version;

        # A specific package version is requested. Check if this
        # version exists.
        no strict 'refs';
        $version = ${"${package_name}::VERSION"} || 
${"${package_name}::Version"} || 0;
        $version = ${"${package_name}::VERSION"} || 
${"${package_name}::Version"} || 0;
        $version = -1 if $@;
        debug_tsahi("version", $version);
        if (package_version_compare($version, $minimum_package_version) > -1) {
        # The requested package version was found.
        return 1;
        } else {
        return 0, "$version";
        }

    }

    return 1;
    }
}

Surprisingly, the only result i got in debug_info.txt is the following;

name: version
$VAR1 = 0;

as if the other calls where ignored somehow. Am I doing something wrong?


Tsahi

 --
The day Micro$oft sells something that doesn't SUCK
is the day they start selling vacuum cleaners.
http://www.geocities.com/tsahi_75



----- Original Message ----
> From: Kristis Makris <[EMAIL PROTECTED]>
> To: Tsahi Asher <[EMAIL PROTECTED]>
> Cc: scmbug-users <[email protected]>
> Sent: Sunday, August 24, 2008 9:44:30 PM
> Subject: Re: Re[2]: [scmbug-users] cannot install glue
> 
> Try something like:
> 
> open OUTFILE, "> /tmp/debug_info";
> print OUTFILE "some debugging text here";
> print OUTFILE Dumper ( $some_variable_here );
> close OUTFILE;
> 
> and then inspect /tmp/debug_info to see what goes on. See how far
> execution gets. Print out some of the variables from
> Common.pm:package_exists() to see if you can make sense of them at all.
> 
> On Sun, 2008-08-24 at 11:10 -0700, Tsahi Asher wrote:
> > Thanks for the check. I'm afraid my Perl skills are too poor, what exactly 
> should I add to the function to get the debug info?
> > 
> > Tsahi
> > 
> >  --
> > The day Micro$oft sells something that doesn't SUCK
> > is the day they start selling vacuum cleaners.
> > http://www.geocities.com/tsahi_75
> > 
> > 
> > 
> > ----- Original Message ----
> > > From: Kristis Makris 
> > > To: Tsahi Asher 
> > > Cc: scmbug-users 
> > > Sent: Sunday, August 24, 2008 5:58:11 PM
> > > Subject: Re: Re[2]: [scmbug-users] cannot install glue
> > > 
> > > Hi Tsahi, I'm sorry for the late response.
> > > 
> > > I've looked at it. It seems that the daemon exits with error value 79
> > > which corresponds to a $DAEMON_ERROR_UNSUPPORTED_BUGTRACKER_VERSION,
> > > which occurs because the call of the Daemon to  bugtracker->init()
> > > fails. There aren't enough information in the daemon.log file to show
> > > invocations to the DBI layer, or to at least attempt to debug why the
> > > DBI version is not detected correctly.
> > > 
> > > What I would do is try to add debugging information in
> > > Common.pm:package_exists() which is supposed to detect the version
> > > information. I'm guessing that is the routine that is somehow failing to
> > > correctly detect the module.
> > > 
> > > Or it has something to do with correctly loading the Bugzilla libraries.
> > > 
> > > On Sat, 2008-08-23 at 12:34 -0700, Tsahi Asher wrote:
> > > > i was hoping that log file would help debug my problem. has anyone 
> > > > looked 
> at 
> > > it?
> > > > 
> > > > tsahi
> > > > 
> > > >  --
> > > > The day Micro$oft sells something that doesn't SUCK
> > > > is the day they start selling vacuum cleaners.
> > > > http://www.geocities.com/tsahi_75
> > > > 
> > > > 
> > > > 
> > > > ----- Original Message ----
> > > > > From: Tsahi Asher 
> > > > > To: Thorsten Schöning ; scmbug-users 
> > > 
> > > > > Sent: Tuesday, August 19, 2008 9:28:10 PM
> > > > > Subject: Re: Re[2]: [scmbug-users] cannot install glue
> > > > > 
> > > > > following the advice on the "Scmbug error 33 issue." thread, i ran 
> > > > > this 
> > > command, 
> > > > > after installing Devel::Trace;
> > > > > 
> > > > > perl -d:Trace "C:/Program Files/Scmbug/sbin/scmbug_daemon.pl"
> > > > > "C:/Program Files/Scmbug/etc/scmbug/daemon.conf" >>daemon.log
> > > > > 2>&1
> > > > > 
> > > > > by editing scmbug-server.bat. i didn't use the -I
> > > > > parameter, from what i understand it's not needed in my case. the log
> > > > > file created is attached. HTH.
> > > > > 
> > > > > tsahi
> > > > > 
> > > > > --
> > > > > The day Micro$oft sells something that doesn't SUCK
> > > > > is the day they start selling vacuum cleaners.
> > > > > http://www.geocities.com/tsahi_75
> > > > > 
> > > > > 
> > > > > 
> > > > > ----- Original Message ----
> > > > > > From: Thorsten Schöning 
> > > > > > To: scmbug-users 
> > > > > > Sent: Thursday, August 14, 2008 9:50:26 AM
> > > > > > Subject: Re[2]: [scmbug-users] cannot install glue
> > > > > > 
> > > > > > Guten Tag Tsahi Asher,
> > > > > > am Mittwoch, 13. August 2008 um 22:28 schrieben Sie:
> > > > > > 
> > > > > > > perhaps installing perl 5.10 will solve it?
> > > > > > 
> > > > > > I don't think so, Bugzilla and Perl 5.10 seems to be a bit tricky 
> > > > > > this
> > > > > > times, too. You need other repositories, not all packages are
> > > > > > available and so on.
> > > > > > 
> > > > > > Whenever I'm stuck like this I get Filemon from Sysinternals running
> > > > > > and work thorugh the logs. SCMBug looks for a package which just
> > > > > > consists of some files and directories, you should see something in 
> the
> > > > > > logs and maybe you get a clue of wrong directories or something.
> > > > > > 
> > > > > > Filemon:
> > > > > > http://technet.microsoft.com/en-us/sysinternals/bb896642.aspx
> > > > > > 
> > > > > > Process Explorer with Filemon and Regmon integrated:
> > > > > > http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
> > > > > > 
> > > > > > Mit freundlichen Grüßen,
> > > > > > 
> > > > > > Thorsten Schöning
> > > > > > 
> > > > > > -- 
> > > > > > Thorsten Schöning


      
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to