Module Name: src Committed By: sborrill Date: Mon Feb 20 21:41:30 UTC 2012
Modified Files: src/doc [netbsd-6]: 3RDPARTY CHANGES src/external/bsd/pkg_install/dist/add [netbsd-6]: perform.c src/external/bsd/pkg_install/dist/delete [netbsd-6]: pkg_delete.c src/external/bsd/pkg_install/dist/lib [netbsd-6]: license.c opattern.c pkg_summary.5 version.h Log Message: Pull up the following revisions(s) (requested by tron in ticket #13): doc/3RDPARTY: patch doc/CHANGES: patch external/bsd/pkg_install/dist/add/perform.c: patch external/bsd/pkg_install/dist/delete/pkg_delete.c: patch external/bsd/pkg_install/dist/lib/license.c: patch external/bsd/pkg_install/dist/lib/opattern.c: patch external/bsd/pkg_install/dist/lib/pkg_summary.5: patch external/bsd/pkg_install/dist/lib/version.h: patch Update "pkg_install" to version 20120128: - pkg_install 20120128: - Explicitly stat(2) if mkdir failed. errno detection doesn't work e.g. on Solaris. - Provide a stable order for package names that only differe in the base name, not the version number. - pkg_install 20110805: - Fix for pkg_delete on NFS from Anthony Mallet. To generate a diff of this commit: cvs rdiff -u -r1.909.2.1 -r1.909.2.2 src/doc/3RDPARTY cvs rdiff -u -r1.1670.2.1 -r1.1670.2.2 src/doc/CHANGES cvs rdiff -u -r1.1.1.18 -r1.1.1.18.6.1 \ src/external/bsd/pkg_install/dist/add/perform.c cvs rdiff -u -r1.1.1.7 -r1.1.1.7.8.1 \ src/external/bsd/pkg_install/dist/delete/pkg_delete.c cvs rdiff -u -r1.2 -r1.2.6.1 src/external/bsd/pkg_install/dist/lib/license.c cvs rdiff -u -r1.1.1.2 -r1.1.1.2.14.1 \ src/external/bsd/pkg_install/dist/lib/opattern.c cvs rdiff -u -r1.3 -r1.3.12.1 \ src/external/bsd/pkg_install/dist/lib/pkg_summary.5 cvs rdiff -u -r1.7 -r1.7.6.1 src/external/bsd/pkg_install/dist/lib/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.909.2.1 src/doc/3RDPARTY:1.909.2.2 --- src/doc/3RDPARTY:1.909.2.1 Sun Feb 19 18:28:53 2012 +++ src/doc/3RDPARTY Mon Feb 20 21:41:28 2012 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.909.2.1 2012/02/19 18:28:53 riz Exp $ +# $NetBSD: 3RDPARTY,v 1.909.2.2 2012/02/20 21:41:28 sborrill Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -878,8 +878,8 @@ definition (files.pf). userland code is reachover Makefiles are in src/usr.sbin/pf. Package: pkg_install -Version: 20110215 -Current Vers: 20110805 +Version: 20120128 +Current Vers: 20120128 Maintainer: The pkgsrc developers Home Page: http://www.pkgsrc.org/ Mailing List: tech-...@netbsd.org Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.1670.2.1 src/doc/CHANGES:1.1670.2.2 --- src/doc/CHANGES:1.1670.2.1 Sun Feb 19 18:28:53 2012 +++ src/doc/CHANGES Mon Feb 20 21:41:28 2012 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1670.2.1 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.1670.2.2 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -1262,3 +1262,4 @@ Changes from NetBSD 5.0 to NetBSD 6.0: quotarestore(8): New quota tool quotarestore for loading backups created with quotadump. [dholland 20120212] postfix(1): Import version 2.8.8 [tron 20120217] + pkg_install(1): Import version 20120128 [tron 20120219] Index: src/external/bsd/pkg_install/dist/add/perform.c diff -u src/external/bsd/pkg_install/dist/add/perform.c:1.1.1.18 src/external/bsd/pkg_install/dist/add/perform.c:1.1.1.18.6.1 --- src/external/bsd/pkg_install/dist/add/perform.c:1.1.1.18 Fri Feb 18 22:32:28 2011 +++ src/external/bsd/pkg_install/dist/add/perform.c Mon Feb 20 21:41:29 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: perform.c,v 1.1.1.18 2011/02/18 22:32:28 aymeric Exp $ */ +/* $NetBSD: perform.c,v 1.1.1.18.6.1 2012/02/20 21:41:29 sborrill Exp $ */ #if HAVE_CONFIG_H #include "config.h" #endif @@ -6,7 +6,7 @@ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: perform.c,v 1.1.1.18 2011/02/18 22:32:28 aymeric Exp $"); +__RCSID("$NetBSD: perform.c,v 1.1.1.18.6.1 2012/02/20 21:41:29 sborrill Exp $"); /*- * Copyright (c) 2003 Grant Beattie <gr...@netbsd.org> @@ -42,6 +42,7 @@ __RCSID("$NetBSD: perform.c,v 1.1.1.18 2 */ #include <sys/utsname.h> +#include <sys/stat.h> #if HAVE_ERR_H #include <err.h> #endif @@ -169,16 +170,21 @@ static int mkdir_p(const char *path) { char *p, *cur_end; - int done; + int done, saved_errno; + struct stat sb; /* * Handle the easy case of direct success or * pre-existing directory first. */ - if (mkdir(path, 0777) == 0 || errno == EEXIST) + if (mkdir(path, 0777) == 0) return 0; - if (errno != ENOENT) + if (stat(path, &sb) == 0) { + if (S_ISDIR(sb.st_mode)) + return 0; + errno = ENOTDIR; return -1; + } cur_end = p = xstrdup(path); @@ -198,21 +204,26 @@ mkdir_p(const char *path) done = (*cur_end == '\0'); *cur_end = '\0'; - /* - * ENOENT can only happen if something else races us, - * in which case we should better give up. - */ - if (mkdir(p, 0777) == -1 && errno != EEXIST) { + if (mkdir(p, 0777) == -1) { + saved_errno = errno; + if (stat(path, &sb) == 0) { + if (S_ISDIR(sb.st_mode)) + goto pass; + errno = ENOTDIR; + } else { + errno = saved_errno; + } free(p); return -1; } +pass: if (done) break; *cur_end = '/'; } free(p); - return 0; + return 0; } /* @@ -382,6 +393,7 @@ check_already_installed(struct pkg_task free(filename); if (fd == -1) return 1; + close(fd); if (ReplaceSame) { struct stat sb; @@ -411,7 +423,6 @@ check_already_installed(struct pkg_task warnx("package `%s' already recorded as installed", pkg->pkgname); } - close(fd); return 0; } Index: src/external/bsd/pkg_install/dist/delete/pkg_delete.c diff -u src/external/bsd/pkg_install/dist/delete/pkg_delete.c:1.1.1.7 src/external/bsd/pkg_install/dist/delete/pkg_delete.c:1.1.1.7.8.1 --- src/external/bsd/pkg_install/dist/delete/pkg_delete.c:1.1.1.7 Wed Feb 3 14:23:46 2010 +++ src/external/bsd/pkg_install/dist/delete/pkg_delete.c Mon Feb 20 21:41:30 2012 @@ -34,7 +34,7 @@ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: pkg_delete.c,v 1.1.1.7 2010/02/03 14:23:46 joerg Exp $"); +__RCSID("$NetBSD: pkg_delete.c,v 1.1.1.7.8.1 2012/02/20 21:41:30 sborrill Exp $"); #if HAVE_ERR_H #include <err.h> @@ -307,7 +307,7 @@ struct find_leaves_data { * Packages that are marked as not for deletion are not considered as * leaves. For all other packages it is checked if at least one package * that depended on them is to be removed AND no depending package remains. - * If that is the case, the package is appened to the sorted list. + * If that is the case, the package is appended to the sorted list. * As this package can't have depending packages left, the topological order * remains consistent. */ @@ -338,7 +338,7 @@ find_new_leaves_iter(const char *pkg, vo if (process_required_by(pkg, NULL, data->pkgs, 3) == 1) { lpp = alloc_lpkg(pkg); TAILQ_INSERT_TAIL(data->pkgs, lpp, lp_link); - data->progress = 0; + data->progress = 1; } return 0; Index: src/external/bsd/pkg_install/dist/lib/license.c diff -u src/external/bsd/pkg_install/dist/lib/license.c:1.2 src/external/bsd/pkg_install/dist/lib/license.c:1.2.6.1 --- src/external/bsd/pkg_install/dist/lib/license.c:1.2 Fri Apr 22 08:19:25 2011 +++ src/external/bsd/pkg_install/dist/lib/license.c Mon Feb 20 21:41:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: license.c,v 1.2 2011/04/22 08:19:25 adam Exp $ */ +/* $NetBSD: license.c,v 1.2.6.1 2012/02/20 21:41:30 sborrill Exp $ */ /*- * Copyright (c) 2009 Joerg Sonnenberger <jo...@netbsd.org>. @@ -46,8 +46,9 @@ #define HASH_SIZE 521 const char *default_acceptable_licenses = - "public-domain " + "public-domain unlicense " "gnu-fdl-v1.1 gnu-fdl-v1.2 gnu-fdl-v1.3 " + "gnu-gpl-v1 " "gnu-gpl-v2 gnu-lgpl-v2 gnu-lgpl-v2.1 " "gnu-gpl-v3 gnu-lgpl-v3 " "original-bsd modified-bsd 2-clause-bsd " @@ -57,15 +58,20 @@ const char *default_acceptable_licenses "cddl-1.0 " "cpl-1.0 " "open-font-license " - "mpl-1.0 mpl-1.1 " - "png-license " + "mpl-1.0 mpl-1.1 mpl-2.0 " + "php png-license " "postgresql-license " + "zlib " "zpl " "python-software-foundation " "ipafont " "isc " "info-zip " - "boost-license"; + "boost-license " + "mplusfont " + "cc-by-sa-v3.0 " + "lppl-1.3c " + "epl-v1.0"; #ifdef DEBUG static size_t hash_collisions; Index: src/external/bsd/pkg_install/dist/lib/opattern.c diff -u src/external/bsd/pkg_install/dist/lib/opattern.c:1.1.1.2 src/external/bsd/pkg_install/dist/lib/opattern.c:1.1.1.2.14.1 --- src/external/bsd/pkg_install/dist/lib/opattern.c:1.1.1.2 Mon Feb 2 20:44:06 2009 +++ src/external/bsd/pkg_install/dist/lib/opattern.c Mon Feb 20 21:41:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: opattern.c,v 1.1.1.2 2009/02/02 20:44:06 joerg Exp $ */ +/* $NetBSD: opattern.c,v 1.1.1.2.14.1 2012/02/20 21:41:30 sborrill Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -7,7 +7,7 @@ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: opattern.c,v 1.1.1.2 2009/02/02 20:44:06 joerg Exp $"); +__RCSID("$NetBSD: opattern.c,v 1.1.1.2.14.1 2012/02/20 21:41:30 sborrill Exp $"); /* * FreeBSD install - a package for the installation and maintainance @@ -204,6 +204,10 @@ pkg_order(const char *pattern, const cha if (dewey_cmp(first_version + 1, DEWEY_GT, second_version + 1)) return 1; + else if (dewey_cmp(first_version + 1, DEWEY_LT, second_version + 1)) + return 2; + else if (strcmp(first_pkg, second_pkg) < 0) + return 1; else return 2; } Index: src/external/bsd/pkg_install/dist/lib/pkg_summary.5 diff -u src/external/bsd/pkg_install/dist/lib/pkg_summary.5:1.3 src/external/bsd/pkg_install/dist/lib/pkg_summary.5:1.3.12.1 --- src/external/bsd/pkg_install/dist/lib/pkg_summary.5:1.3 Sun May 17 21:31:59 2009 +++ src/external/bsd/pkg_install/dist/lib/pkg_summary.5 Mon Feb 20 21:41:30 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_summary.5,v 1.3 2009/05/17 21:31:59 joerg Exp $ +.\" $NetBSD: pkg_summary.5,v 1.3.12.1 2012/02/20 21:41:30 sborrill Exp $ .\" .\" Copyright (c) 2006 The NetBSD Foundation .\" @@ -66,6 +66,10 @@ If missing, this package has no dependen .It Ev DESCRIPTION (required) A more detailed description of the package. .\" DIGEST +.It Ev FILE_CKSUM +(optional) A checksum type supported by +.Xr digest 1 +and checksum separated by space character. .It Ev FILE_NAME (optional) The name of the binary package file. If not given, @@ -126,6 +130,7 @@ For example, the following will list thi .Pp .Dl "pkg_info -X -a" .Sh SEE ALSO +.Xr digest 1 , .Xr pkg_info 1 .Sh HISTORY The Index: src/external/bsd/pkg_install/dist/lib/version.h diff -u src/external/bsd/pkg_install/dist/lib/version.h:1.7 src/external/bsd/pkg_install/dist/lib/version.h:1.7.6.1 --- src/external/bsd/pkg_install/dist/lib/version.h:1.7 Fri Feb 18 22:36:00 2011 +++ src/external/bsd/pkg_install/dist/lib/version.h Mon Feb 20 21:41:30 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.7 2011/02/18 22:36:00 aymeric Exp $ */ +/* $NetBSD: version.h,v 1.7.6.1 2012/02/20 21:41:30 sborrill Exp $ */ /* * Copyright (c) 2001 Thomas Klausner. All rights reserved. @@ -27,6 +27,6 @@ #ifndef _INST_LIB_VERSION_H_ #define _INST_LIB_VERSION_H_ -#define PKGTOOLS_VERSION 20110215 +#define PKGTOOLS_VERSION 20120128 #endif /* _INST_LIB_VERSION_H_ */