pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/38166: crash in pkg_info



The following reply was made to PR pkg/38166; it has been noted by GNATS.

From: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: pkg/38166: crash in pkg_info
Date: Wed, 5 Mar 2008 15:04:41 +0100

 --Kj7319i9nmIyA2yE
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Tue, Mar 04, 2008 at 07:40:00PM +0000, dholland%eecs.harvard.edu@localhost 
wrote:
 >      Owing to some assorted lossage I ended up the other day with a
 >      package directory in /var/db/pkg that contained nothing but a
 >      core file.
 
 Can you try the attached patch instead? It should apply to pkgsrc as
 well.
 
 Joerg
 
 --Kj7319i9nmIyA2yE
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="perform.c.diff"
 
 Index: perform.c
 ===================================================================
 RCS file: /data/repo/netbsd/src/dist/pkg_install/info/perform.c,v
 retrieving revision 1.1.1.7
 diff -u -p -r1.1.1.7 perform.c
 --- perform.c  22 Feb 2008 22:16:37 -0000      1.1.1.7
 +++ perform.c  5 Mar 2008 13:57:54 -0000
 @@ -278,7 +278,7 @@ read_meta_data_from_pkgdb(const char *pk
                fd = open(fname, O_RDONLY, 0);
                free(fname);
                if (fd == -1) {
 -                      if (errno == ENOENT)
 +                      if (errno == ENOENT && descr->required_file == 0)
                                continue;
                        err(2, "cannot read meta data file %s",
                            descr->entry_filename);
 
 --Kj7319i9nmIyA2yE--
 


Home | Main Index | Thread Index | Old Index