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/lib pkg_install-20080311:
details: https://anonhg.NetBSD.org/pkgsrc/rev/d46e4f388f1c
branches: trunk
changeset: 539711:d46e4f388f1c
user: joerg <joerg%pkgsrc.org@localhost>
date: Tue Mar 11 18:01:35 2008 +0000
description:
pkg_install-20080311:
If the package db directory doesn't exist, handle it like an empty
pkgdb and just return.
diffstat:
pkgtools/pkg_install/files/lib/iterate.c | 8 +++++++-
pkgtools/pkg_install/files/lib/version.h | 4 ++--
2 files changed, 9 insertions(+), 3 deletions(-)
diffs (43 lines):
diff -r 17151e2bf89d -r d46e4f388f1c pkgtools/pkg_install/files/lib/iterate.c
--- a/pkgtools/pkg_install/files/lib/iterate.c Tue Mar 11 17:56:16 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/iterate.c Tue Mar 11 18:01:35 2008 +0000
@@ -36,6 +36,9 @@
#if HAVE_ERR_H
#include <err.h>
#endif
+#if HAVE_ERRNO_H
+#include <errno.h>
+#endif
#include "lib.h"
@@ -153,8 +156,11 @@
DIR *dirp;
int retval;
- if ((dirp = opendir(_pkgdb_getPKGDB_DIR())) == NULL)
+ if ((dirp = opendir(_pkgdb_getPKGDB_DIR())) == NULL) {
+ if (errno == ENOENT)
+ return 0; /* No pkgdb directory == empty pkgdb */
return -1;
+ }
retval = iterate_pkg_generic_src(matchiter, cookie, pkg_db_iter, dirp);
diff -r 17151e2bf89d -r d46e4f388f1c pkgtools/pkg_install/files/lib/version.h
--- a/pkgtools/pkg_install/files/lib/version.h Tue Mar 11 17:56:16 2008 +0000
+++ b/pkgtools/pkg_install/files/lib/version.h Tue Mar 11 18:01:35 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.95 2008/03/09 18:03:46 joerg Exp $ */
+/* $NetBSD: version.h,v 1.96 2008/03/11 18:01:35 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 "20080309"
+#define PKGTOOLS_VERSION "20080311"
#endif /* _INST_LIB_VERSION_H_ */
Home |
Main Index |
Thread Index |
Old Index