Module Name: src
Committed By: wiz
Date: Sun Aug 25 06:49:40 UTC 2024
Modified Files:
src/external/bsd/pkg_install/dist/add: perform.c
src/external/bsd/pkg_install/dist/lib: license.c version.h
Log Message:
Fix merge conflicts.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/pkg_install/dist/add/perform.c
cvs rdiff -u -r1.12 -r1.13 src/external/bsd/pkg_install/dist/lib/license.c
cvs rdiff -u -r1.21 -r1.22 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/external/bsd/pkg_install/dist/add/perform.c
diff -u src/external/bsd/pkg_install/dist/add/perform.c:1.11 src/external/bsd/pkg_install/dist/add/perform.c:1.12
--- src/external/bsd/pkg_install/dist/add/perform.c:1.11 Tue Jun 11 09:26:57 2024
+++ src/external/bsd/pkg_install/dist/add/perform.c Sun Aug 25 06:49:40 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: perform.c,v 1.11 2024/06/11 09:26:57 wiz Exp $ */
+/* $NetBSD: perform.c,v 1.12 2024/08/25 06:49:40 wiz 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.11 2024/06/11 09:26:57 wiz Exp $");
+__RCSID("$NetBSD: perform.c,v 1.12 2024/08/25 06:49:40 wiz Exp $");
/*-
* Copyright (c) 2003 Grant Beattie <[email protected]>
@@ -1115,6 +1115,41 @@ check_implicit_conflict(struct pkg_task
return status;
}
+/* check if all REQUIRES files (usually libraries) are installed */
+static int
+check_requires(struct pkg_task *pkg)
+{
+ const char *data, *eol, *next_line;
+ int ret = 0;
+
+ data = pkg->meta_data.meta_build_info;
+
+ for (; data != NULL && *data != '\0'; data = next_line) {
+ if ((eol = strchr(data, '\n')) == NULL) {
+ eol = data + strlen(data);
+ next_line = eol;
+ } else
+ next_line = eol + 1;
+
+ if (strncmp(data, "REQUIRES=", 9) == 0) {
+ char *library_name = dup_value(data, eol);
+ struct stat sb;
+ if (stat(library_name, &sb) != 0 || !S_ISREG(sb.st_mode)) {
+ warnx("Missing required library: %s", library_name);
+#ifdef __NetBSD__
+ if (strncmp(library_name, "/usr/X11R7", 10) == 0) {
+ warnx("Please make sure to install the X sets");
+ }
+#endif
+ ret = 1;
+ }
+ free(library_name);
+ }
+ }
+
+ return ret;
+}
+
/*
* Install a required dependency and verify its installation.
*/
@@ -1124,7 +1159,7 @@ install_depend_pkg(const char *dep)
/* XXX check cyclic dependencies? */
if (Fake || NoRecord) {
if (!Force) {
- warnx("Missing dependency %s\n", dep);
+ warnx("Missing dependency %s", dep);
return 1;
}
warnx("Missing dependency %s, continuing", dep);
@@ -1513,6 +1548,9 @@ pkg_do(const char *pkgpath, int mark_aut
if (check_implicit_conflict(pkg))
goto clean_memory;
+ if (check_requires(pkg))
+ goto clean_memory;
+
if (pkg->other_version != NULL) {
/*
* Replacing an existing package.
Index: src/external/bsd/pkg_install/dist/lib/license.c
diff -u src/external/bsd/pkg_install/dist/lib/license.c:1.12 src/external/bsd/pkg_install/dist/lib/license.c:1.13
--- src/external/bsd/pkg_install/dist/lib/license.c:1.12 Tue Jun 11 09:26:57 2024
+++ src/external/bsd/pkg_install/dist/lib/license.c Sun Aug 25 06:49:40 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: license.c,v 1.12 2024/06/11 09:26:57 wiz Exp $ */
+/* $NetBSD: license.c,v 1.13 2024/08/25 06:49:40 wiz Exp $ */
/*-
* Copyright (c) 2009 Joerg Sonnenberger <[email protected]>.
@@ -102,6 +102,7 @@ const char *default_acceptable_licenses
"unicode "
"unicode-v3 "
"unlicense "
+ "upl-1.0 "
"vera-ttf-license "
"w3c "
"x11 "
Index: src/external/bsd/pkg_install/dist/lib/version.h
diff -u src/external/bsd/pkg_install/dist/lib/version.h:1.21 src/external/bsd/pkg_install/dist/lib/version.h:1.22
--- src/external/bsd/pkg_install/dist/lib/version.h:1.21 Tue Jun 11 09:26:57 2024
+++ src/external/bsd/pkg_install/dist/lib/version.h Sun Aug 25 06:49:40 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.21 2024/06/11 09:26:57 wiz Exp $ */
+/* $NetBSD: version.h,v 1.22 2024/08/25 06:49:40 wiz 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 20240307
+#define PKGTOOLS_VERSION 20240821
#endif /* _INST_LIB_VERSION_H_ */