threads / patch / 4979

patchcvsserver: suppress warnings

Subject: [PATCH] cvsserver: suppress warnings

## tl;dr

9 messages between Jul 25, 2006 and Jul 25, 2006. Diffs are folded; open one to read it.

replies: 8people: 5as markdown or json

Johannes Schindelin· Jul 25, 2006, 10:48 UTC · lore

This patch defines $state->{prependdir} as the empty string, so that quite a few warnings are avoided.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
	I still get this warning:
		closing dbh with active statement handles
 git-cvsserver.perl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-cvsserver.perl +1 −1
diff --git a/git-cvsserver.perl b/git-cvsserver.perl
index 9c9f21b..981b6ba 100755
--- a/git-cvsserver.perl
+++ b/git-cvsserver.perl
@@ -81,7 +81,7 @@ ########################################
 
 # $state holds all the bits of information the clients sends us that could
 # potentially be useful when it comes to actually _doing_ something.
-my $state = {};
+my $state = { prependdir => '' };
 $log->info("--------------- STARTING -----------------");
 
 my $TEMP_DIR = tempdir( CLEANUP => 1 );
-- 
1.4.2.rc1.gc123
Martin Langhoff (CatalystIT)· Jul 25, 2006, 11:06 UTC · re: Johannes Schindelin · lore

Re: [PATCH] cvsserver: suppress warnings

Johannes Schindelin wrote:
> This patch defines $state->{prependdir} as the empty string, so that
> quite a few warnings are avoided.
Ack.
> 	I still get this warning:
> 
> 		closing dbh with active statement handles

Ack to that too. Perhaps an END block would help? A quick check of man DBI tells me that $dbh->CachedKids will be a hashref where the values are refs to the cached statement handles.

IMHO it's a DBI bug -- statement handles only referenced by $dbh->CachedKids should cleanup silently. prepare_cached() is a convenience method so that you _don't_ have to keep track of the handles manually. Forcing a manual cleanup throws a good part of the convenience out.

cheers,
martin
-- 
-----------------------------------------------------------------------
Martin @ Catalyst .Net .NZ  Ltd, PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/           PHYS: Level 2, 150-154 Willis St
OFFICE: +64(4)916-7224                              MOB: +64(21)364-017
       Make things as simple as possible, but no simpler - Einstein
-----------------------------------------------------------------------
Johannes Schindelin· Jul 25, 2006, 11:11 UTC · re: Martin Langhoff (CatalystIT) · lore

Re: [PATCH] cvsserver: suppress warnings

Hi,
On Tue, 25 Jul 2006, Martin Langhoff (CatalystIT) wrote:
Show 7 quoted lines
> Johannes Schindelin wrote:
> 
> > 	I still get this warning:
> > 
> > 		closing dbh with active statement handles
> 
> Ack to that too. Perhaps an END block would help?

Since my BASIC days on a VC-20 (no, not the airplane), I hardly used an END statement ;-) Well, maybe in that Pascal course, but not in Perl, anyway. So, I do not understand...

Show 7 quoted lines
> A quick check of man DBI tells me that $dbh->CachedKids will be a 
> hashref where the values are refs to the cached statement handles.
> 
> IMHO it's a DBI bug -- statement handles only referenced by $dbh->CachedKids
> should cleanup silently. prepare_cached() is a convenience method so that you
> _don't_ have to keep track of the handles manually. Forcing a manual cleanup
> throws a good part of the convenience out.
I agree fully.

Ciao, Dscho

Martin Langhoff· Jul 25, 2006, 11:50 UTC · re: Johannes Schindelin · lore

Re: [PATCH] cvsserver: suppress warnings

On 7/25/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 5 quoted lines
> > Ack to that too. Perhaps an END block would help?
>
> Since my BASIC days on a VC-20 (no, not the airplane), I hardly used an
> END statement ;-) Well, maybe in that Pascal course, but not in Perl,
> anyway. So, I do not understand...

Oh, it's a code block you can declare that gets called when the program is exiting. More info at http://search.cpan.org/dist/perl/pod/perlmod.pod#BEGIN%2C_CHECK%2C_INIT_and_END____

No relation to BASIC's END ;-)
martin
Johannes Schindelin· Jul 25, 2006, 11:56 UTC · re: Martin Langhoff · lore

Re: [PATCH] cvsserver: suppress warnings

Hi,
On Tue, 25 Jul 2006, Martin Langhoff wrote:
Show 11 quoted lines
> On 7/25/06, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> 
> > > Ack to that too. Perhaps an END block would help?
> > 
> > Since my BASIC days on a VC-20 (no, not the airplane), I hardly used an
> > END statement ;-) Well, maybe in that Pascal course, but not in Perl,
> > anyway. So, I do not understand...
> 
> Oh, it's a code block you can declare that gets called when the
> program is exiting. More info at
> http://search.cpan.org/dist/perl/pod/perlmod.pod#BEGIN%2C_CHECK%2C_INIT_and_END____
Ah! Something like "atexit()".
> No relation to BASIC's END ;-)
;-)
BTW I will send out a proper patch for that warning shortly.

Ciao, Dscho

Mike Galbraith· Jul 25, 2006, 12:13 UTC · re: Johannes Schindelin · lore

git-1.4.1.1-1 git-clone-pack: unable to read from git-index-pack

Greetings,

Having finally acquired DSL (only 400kbps, but at least I'm in the twentieth century [not typo]), I decided to finally give git a try. I installed git-1.4.1.1-1, and armed myself with Jeff's how-to. I didn't get far before git saved me the trouble of truly testing my resolve :)

	-Mike

git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6 error: git-clone-pack: unable to read from git-index-pack error: git-index-pack died with error code 128 clone-pack from 'git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git' failed

Mike Galbraith· Jul 25, 2006, 12:18 UTC · re: Mike Galbraith · lore

Re: git-1.4.1.1-1 git-clone-pack: unable to read from git-index-pack

On Tue, 2006-07-25 at 14:13 +0200, Mike Galbraith wrote:
Show 10 quoted lines
> Greetings,
> 
> Having finally acquired DSL (only 400kbps, but at least I'm in the
> twentieth century [not typo]), I decided to finally give git a try.  I
> installed git-1.4.1.1-1, and armed myself with Jeff's how-to.  I didn't
> get far before git saved me the trouble of truly testing my resolve :)
> 
> 	-Mike
> 
> git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6
Oops, missed a line.
fatal: packfile '/usr/local/src/tmp/linux-2.6/.git/objects/pack/tmp-nE9k3G' SHA1 mismatch
> error: git-clone-pack: unable to read from git-index-pack
> error: git-index-pack died with error code 128
> clone-pack from 'git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git' failed
Johannes Schindelin· Jul 25, 2006, 14:57 UTC · re: Mike Galbraith · lore

Re: git-1.4.1.1-1 git-clone-pack: unable to read from git-index-pack

Hi,
On Tue, 25 Jul 2006, Mike Galbraith wrote:
Show 19 quoted lines
> On Tue, 2006-07-25 at 14:13 +0200, Mike Galbraith wrote:
> > Greetings,
> > 
> > Having finally acquired DSL (only 400kbps, but at least I'm in the
> > twentieth century [not typo]), I decided to finally give git a try.  I
> > installed git-1.4.1.1-1, and armed myself with Jeff's how-to.  I didn't
> > get far before git saved me the trouble of truly testing my resolve :)
> > 
> > 	-Mike
> > 
> > git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6
> 
> Oops, missed a line.
> 
> fatal: packfile '/usr/local/src/tmp/linux-2.6/.git/objects/pack/tmp-nE9k3G' SHA1 mismatch
> 
> > error: git-clone-pack: unable to read from git-index-pack
> > error: git-index-pack died with error code 128
> > clone-pack from 'git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git' failed

Was this after about 10 minutes? I had the impression that this was fixed with the 1.4.1.1 version _on the server side_. See

http://www.kernel.org/git/gitweb.cgi?p=git/git.git;a=commit;h=a0764cb838c2f1885fb58ca794c21523fb05c825
for details. So, please be patient until kernel.org's server is updated.

Hth, Dscho

Ryan Anderson· Jul 25, 2006, 20:23 UTC · re: Johannes Schindelin · lore

Re: git-1.4.1.1-1 git-clone-pack: unable to read from git-index-pack

On Tue, Jul 25, 2006 at 04:57:39PM +0200, Johannes Schindelin wrote:
Show 28 quoted lines
> On Tue, 25 Jul 2006, Mike Galbraith wrote:
> 
> > On Tue, 2006-07-25 at 14:13 +0200, Mike Galbraith wrote:
> > > Greetings,
> > > 
> > > Having finally acquired DSL (only 400kbps, but at least I'm in the
> > > twentieth century [not typo]), I decided to finally give git a try.  I
> > > installed git-1.4.1.1-1, and armed myself with Jeff's how-to.  I didn't
> > > get far before git saved me the trouble of truly testing my resolve :)
> > > 
> > > 	-Mike
> > > 
> > > git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6
> > 
> > Oops, missed a line.
> > 
> > fatal: packfile '/usr/local/src/tmp/linux-2.6/.git/objects/pack/tmp-nE9k3G' SHA1 mismatch
> > 
> > > error: git-clone-pack: unable to read from git-index-pack
> > > error: git-index-pack died with error code 128
> > > clone-pack from 'git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git' failed
> 
> Was this after about 10 minutes? I had the impression that this was fixed 
> with the 1.4.1.1 version _on the server side_. See
> 
> http://www.kernel.org/git/gitweb.cgi?p=git/git.git;a=commit;h=a0764cb838c2f1885fb58ca794c21523fb05c825
> 
> for details. So, please be patient until kernel.org's server is updated.
Or do your initial clone as:

git clone rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git linux-2.6 cd linux-2.6 && sed -i -e 's/rsync/git/g' .git/remotes/origin

(The preferred thing is for the method you used to work, but the above will avoid the bug for the moment.)

-- 
Ryan Anderson
  sometimes Pug Majere

← back to recent threads