NetBSD Problem Report #37447
From gson@gson.org Thu Nov 29 10:57:53 2007
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 4F25C63B8D8
for <gnats-bugs@gnats.NetBSD.org>; Thu, 29 Nov 2007 10:57:53 +0000 (UTC)
Message-Id: <20071129105749.B38B875F3B@guava.gson.org>
Date: Thu, 29 Nov 2007 12:57:49 +0200 (EET)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: pkg_create failure in bulk build leaves truncated .tgz file
X-Send-Pr-Version: 3.95
>Number: 37447
>Category: pkg
>Synopsis: pkg_create failure in bulk build leaves truncated .tgz file
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 29 11:00:00 +0000 2007
>Last-Modified: Fri Nov 30 10:55:01 +0000 2007
>Originator: Andreas Gustafsson
>Release: NetBSD 4.99.30
>Organization:
>Environment:
System: NetBSD current.araneus.fi 4.99.30 NetBSD 4.99.30 (XEN3_DOMU) #0: root@current.araneus.fi:/usr/build/20070827-1931/obj/sys/arch/i386/compile/XEN3_DOMU i386
Architecture: i386
Machine: i386
>Description:
When pkg_create fails during a bulk pkgsrc build, it will leave a
truncated package .tgz file under /usr/pkgsrc/packages/All.
This is bad because it messes up dependencies. For example, it causes
the bulk build framework to attempt to build dependent packages only
to have those builds fail due to the truncated .tgz, instead of
properly marking the dependent packages as depending on a failed
package.
>How-To-Repeat:
Do a bulk build of a current pkgsrc under a current NetBSD and watch
the devel/pango build fail as follows:
2007/11/28 12:13:00 482/596=80.9% devel/pango @ i386> ===> Building binary package for pango-1.18.3
2007/11/28 12:13:00 482/596=80.9% devel/pango @ i386> pkg_create: can't stat `/usr/pkg/include/pango-1.0/pango/pangocairo.h'
2007/11/28 12:13:00 482/596=80.9% devel/pango @ i386> pkg_create: can't stat `/usr/pkg/lib/libpangocairo-1.0.la'
2007/11/28 12:13:00 482/596=80.9% devel/pango @ i386> pkg_create: can't stat `/usr/pkg/lib/pkgconfig/pangocairo.pc'
2007/11/28 12:13:00 482/596=80.9% devel/pango @ i386> pkg_create: lstat failed for file include/pango-1.0/pango/pangocairo.h: No such file or directory
2007/11/28 12:13:00 482/596=80.9% devel/pango @ i386> Creating package /usr/pkgsrc/packages/All/pango-1.18.3
2007/11/28 12:13:00 482/596=80.9% devel/pango @ i386> Using SrcDir value of /usr/pkg
2007/11/28 12:13:00 482/596=80.9% devel/pango @ i386> *** Error code 2
Find that a package .tgz file was nevertheless created, and that it
is truncated:
# zcat --test /usr/pkgsrc/packages/All/pango-1.18.3.tgz
zcat: /usr/pkgsrc/packages/All/pango-1.18.3.tgz: unexpected end of file
zcat: /usr/pkgsrc/packages/All/pango-1.18.3.tgz: uncompress failed
>Fix:
Make pkg_create unlink the package .tgz file on failure.
>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/37447: pkg_create failure in bulk build leaves truncated
.tgz file
Date: Thu, 29 Nov 2007 12:25:23 +0100
On Thu, Nov 29, 2007 at 11:00:01AM +0000, Andreas Gustafsson wrote:
> When pkg_create fails during a bulk pkgsrc build, it will leave a
> truncated package .tgz file under /usr/pkgsrc/packages/All.
Normal bulk builds are supposed to run with PKG_DEVELOPER, which bails
out earlier.
> Make pkg_create unlink the package .tgz file on failure.
I don't think it should do that.
Joerg
From: Roland Illig <rillig@NetBSD.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/37447: pkg_create failure in bulk build leaves truncated
.tgz file
Date: Thu, 29 Nov 2007 18:47:18 +0100
Joerg Sonnenberger wrote:
> On Thu, Nov 29, 2007 at 11:00:01AM +0000, Andreas Gustafsson wrote:
> > Make pkg_create unlink the package .tgz file on failure.
>
> I don't think it should do that.
I think it should. Having a broken file is worse than having no file at all.
Why don't you think it should do that?
Roland
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/37447: pkg_create failure in bulk build leaves truncated
.tgz file
Date: Fri, 30 Nov 2007 11:50:26 +0100
On Thu, Nov 29, 2007 at 05:50:02PM +0000, Roland Illig wrote:
> The following reply was made to PR pkg/37447; it has been noted by GNATS.
>
> From: Roland Illig <rillig@NetBSD.org>
> To: gnats-bugs@NetBSD.org
> Cc:
> Subject: Re: pkg/37447: pkg_create failure in bulk build leaves truncated
> .tgz file
> Date: Thu, 29 Nov 2007 18:47:18 +0100
>
> Joerg Sonnenberger wrote:
> > On Thu, Nov 29, 2007 at 11:00:01AM +0000, Andreas Gustafsson wrote:
> > > Make pkg_create unlink the package .tgz file on failure.
> >
> > I don't think it should do that.
>
> I think it should. Having a broken file is worse than having no file at all.
>
> Why don't you think it should do that?
Because the package is as broken as the installed version currently is.
I have no problem with the package target removing the file on error,
but it shouldn't be the job of pkg_create.
Joerg
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.