pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/pkgtools/pkg_install/files pkg_install-20080309:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cb47d74f1c2f
branches:  trunk
changeset: 539615:cb47d74f1c2f
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Sun Mar 09 18:03:46 2008 +0000

description:
pkg_install-20080309:
- When loading meta data for a package and a file is needed for the
  current operation and is a required file, complain.
- Include the name of the package the meta data could not be loaded
  from.

This addresses PR 38166.

diffstat:

 pkgtools/pkg_install/files/info/perform.c |  12 ++++++------
 pkgtools/pkg_install/files/lib/version.h  |   4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (51 lines):

diff -r bf46420f6d24 -r cb47d74f1c2f pkgtools/pkg_install/files/info/perform.c
--- a/pkgtools/pkg_install/files/info/perform.c Sun Mar 09 17:52:57 2008 +0000
+++ b/pkgtools/pkg_install/files/info/perform.c Sun Mar 09 18:03:46 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: perform.c,v 1.44 2008/02/22 21:58:16 joerg Exp $       */
+/*     $NetBSD: perform.c,v 1.45 2008/03/09 18:03:46 joerg Exp $       */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -17,7 +17,7 @@
 #if 0
 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.23 1997/10/13 15:03:53 jkh Exp";
 #else
-__RCSID("$NetBSD: perform.c,v 1.44 2008/02/22 21:58:16 joerg Exp $");
+__RCSID("$NetBSD: perform.c,v 1.45 2008/03/09 18:03:46 joerg Exp $");
 #endif
 #endif
 
@@ -278,11 +278,11 @@
                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);
-               }       
+                       err(2, "cannot read meta data file %s of package %s",
+                           descr->entry_filename, pkg);
+               }
                target = (char **)((char *)meta + descr->entry_offset);
 
                if (fstat(fd, &st) == -1)
diff -r bf46420f6d24 -r cb47d74f1c2f pkgtools/pkg_install/files/lib/version.h
--- a/pkgtools/pkg_install/files/lib/version.h  Sun Mar 09 17:52:57 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/version.h  Sun Mar 09 18:03:46 2008 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.94 2008/02/22 21:58:16 joerg Exp $       */
+/*     $NetBSD: version.h,v 1.95 2008/03/09 18:03:46 joerg Exp $       */
 
 /*
  * Copyright (c) 2001 Thomas Klausner.  All rights reserved.
@@ -33,6 +33,6 @@
 #ifndef _INST_LIB_VERSION_H_
 #define _INST_LIB_VERSION_H_
 
-#define PKGTOOLS_VERSION "20080223"
+#define PKGTOOLS_VERSION "20080309"
 
 #endif /* _INST_LIB_VERSION_H_ */



Home | Main Index | Thread Index | Old Index