# [PATCH] cvsserver: suppress warnings

9 messages from 2006-07-25 to 2006-07-25. Participants: Johannes Schindelin, Martin Langhoff (CatalystIT), Martin Langhoff, Mike Galbraith, Ryan Anderson.
Thread: https://gitlist.dev/t/4979

## Johannes Schindelin, 2006-07-25 10:48

Subject: [PATCH] cvsserver: suppress warnings
Message-ID: <Pine.LNX.4.63.0607251247040.29667@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0607251247040.29667%40wbgn013.biozentrum.uni-wuerzburg.de

```

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(-)

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), 2006-07-25 11:06

Subject: Re: [PATCH] cvsserver: suppress warnings
Message-ID: <44C5FB3E.9020301@catalyst.net.nz>
URL: https://gitlist.dev/e/44C5FB3E.9020301%40catalyst.net.nz
In-Reply-To: <Pine.LNX.4.63.0607251247040.29667@wbgn013.biozentrum.uni-wuerzburg.de>

```
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, 2006-07-25 11:11

Subject: Re: [PATCH] cvsserver: suppress warnings
Message-ID: <Pine.LNX.4.63.0607251308380.29667@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0607251308380.29667%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <44C5FB3E.9020301@catalyst.net.nz>

```
Hi,

On Tue, 25 Jul 2006, Martin Langhoff (CatalystIT) wrote:

> 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...

> 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, 2006-07-25 11:50

Subject: Re: [PATCH] cvsserver: suppress warnings
Message-ID: <46a038f90607250450l643f97e4sbece300fa5b2d509@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90607250450l643f97e4sbece300fa5b2d509%40mail.gmail.com
In-Reply-To: <Pine.LNX.4.63.0607251308380.29667@wbgn013.biozentrum.uni-wuerzburg.de>

```
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____

No relation to BASIC's END ;-)


martin

```

## Johannes Schindelin, 2006-07-25 11:56

Subject: Re: [PATCH] cvsserver: suppress warnings
Message-ID: <Pine.LNX.4.63.0607251355360.29667@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0607251355360.29667%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <46a038f90607250450l643f97e4sbece300fa5b2d509@mail.gmail.com>

```
Hi,

On Tue, 25 Jul 2006, Martin Langhoff wrote:

> 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, 2006-07-25 12:13

Subject: git-1.4.1.1-1 git-clone-pack: unable to read from git-index-pack
Message-ID: <1153829608.2258.32.camel@Homer.simpson.net>
URL: https://gitlist.dev/e/1153829608.2258.32.camel%40Homer.simpson.net
In-Reply-To: <Pine.LNX.4.63.0607251247040.29667@wbgn013.biozentrum.uni-wuerzburg.de>

```
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, 2006-07-25 12:18

Subject: Re: git-1.4.1.1-1 git-clone-pack: unable to read from git-index-pack
Message-ID: <1153829908.2258.34.camel@Homer.simpson.net>
URL: https://gitlist.dev/e/1153829908.2258.34.camel%40Homer.simpson.net
In-Reply-To: <1153829608.2258.32.camel@Homer.simpson.net>

```
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

```

## Johannes Schindelin, 2006-07-25 14:57

Subject: Re: git-1.4.1.1-1 git-clone-pack: unable to read from git-index-pack
Message-ID: <Pine.LNX.4.63.0607251655360.29667@wbgn013.biozentrum.uni-wuerzburg.de>
URL: https://gitlist.dev/e/Pine.LNX.4.63.0607251655360.29667%40wbgn013.biozentrum.uni-wuerzburg.de
In-Reply-To: <1153829908.2258.34.camel@Homer.simpson.net>

```
Hi,

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.

Hth,
Dscho

```

## Ryan Anderson, 2006-07-25 20:23

Subject: Re: git-1.4.1.1-1 git-clone-pack: unable to read from git-index-pack
Message-ID: <20060725202358.GI23286@h4x0r5.com>
URL: https://gitlist.dev/e/20060725202358.GI23286%40h4x0r5.com
In-Reply-To: <Pine.LNX.4.63.0607251655360.29667@wbgn013.biozentrum.uni-wuerzburg.de>

```
On Tue, Jul 25, 2006 at 04:57:39PM +0200, Johannes Schindelin wrote:
> 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

```
