diff options
-rw-r--r-- | pkgtools/pkg_install/files/lib/iterate.c | 8 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/version.h | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/pkgtools/pkg_install/files/lib/iterate.c b/pkgtools/pkg_install/files/lib/iterate.c index 92b6736dfe8..36ddc996789 100644 --- a/pkgtools/pkg_install/files/lib/iterate.c +++ b/pkgtools/pkg_install/files/lib/iterate.c @@ -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 @@ iterate_pkg_db(int (*matchiter)(const char *, void *), void *cookie) 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 --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h index 86b170c1c25..a2eb86a657b 100644 --- a/pkgtools/pkg_install/files/lib/version.h +++ b/pkgtools/pkg_install/files/lib/version.h @@ -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_ */ |