pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools
Module Name: pkgsrc
Committed By: wiz
Date: Mon Jan 13 11:03:03 UTC 2025
Modified Files:
pkgsrc/pkgtools/pbulk: Makefile
pkgsrc/pkgtools/pbulk-base: Makefile
pkgsrc/pkgtools/pbulk/files/pbulk: pbulk.conf
pkgsrc/pkgtools/pbulk/files/pbulk/presolve: pbulk-resolve.1 presolve.c
pkgsrc/pkgtools/pbulk/files/pbulk/scripts: scan
Log Message:
pbulk, pbulk-base: bump version to 0.74/0.58
When a dependency can not be resolved, mark packages using it as
broken using PKG_FAIL_REASON, but don't fail the scan/resolve phase.
This obsoletes the ignore_missing_dependencies configuration variable,
add a warning about that.
Improve the man pages while here.
To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 pkgsrc/pkgtools/pbulk/Makefile
cvs rdiff -u -r1.28 -r1.29 pkgsrc/pkgtools/pbulk-base/Makefile
cvs rdiff -u -r1.27 -r1.28 pkgsrc/pkgtools/pbulk/files/pbulk/pbulk.conf
cvs rdiff -u -r1.1.1.1 -r1.2 \
pkgsrc/pkgtools/pbulk/files/pbulk/presolve/pbulk-resolve.1
cvs rdiff -u -r1.4 -r1.5 \
pkgsrc/pkgtools/pbulk/files/pbulk/presolve/presolve.c
cvs rdiff -u -r1.10 -r1.11 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/pbulk/Makefile
diff -u pkgsrc/pkgtools/pbulk/Makefile:1.92 pkgsrc/pkgtools/pbulk/Makefile:1.93
--- pkgsrc/pkgtools/pbulk/Makefile:1.92 Sat Oct 12 10:43:52 2024
+++ pkgsrc/pkgtools/pbulk/Makefile Mon Jan 13 11:03:03 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.92 2024/10/12 10:43:52 jperkin Exp $
+# $NetBSD: Makefile,v 1.93 2025/01/13 11:03:03 wiz Exp $
-PKGNAME= pbulk-0.73
+PKGNAME= pbulk-0.74
COMMENT= Modular bulk build framework
.include "../../pkgtools/pbulk/Makefile.common"
Index: pkgsrc/pkgtools/pbulk-base/Makefile
diff -u pkgsrc/pkgtools/pbulk-base/Makefile:1.28 pkgsrc/pkgtools/pbulk-base/Makefile:1.29
--- pkgsrc/pkgtools/pbulk-base/Makefile:1.28 Sun Feb 12 21:17:24 2023
+++ pkgsrc/pkgtools/pbulk-base/Makefile Mon Jan 13 11:03:03 2025
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.28 2023/02/12 21:17:24 joerg Exp $
+# $NetBSD: Makefile,v 1.29 2025/01/13 11:03:03 wiz Exp $
-DISTNAME= pbulk-base-0.57
+DISTNAME= pbulk-base-0.58
COMMENT= Core components of the modular bulk build framework
.include "../../pkgtools/pbulk/Makefile.common"
Index: pkgsrc/pkgtools/pbulk/files/pbulk/pbulk.conf
diff -u pkgsrc/pkgtools/pbulk/files/pbulk/pbulk.conf:1.27 pkgsrc/pkgtools/pbulk/files/pbulk/pbulk.conf:1.28
--- pkgsrc/pkgtools/pbulk/files/pbulk/pbulk.conf:1.27 Sat Oct 12 10:43:52 2024
+++ pkgsrc/pkgtools/pbulk/files/pbulk/pbulk.conf Mon Jan 13 11:03:03 2025
@@ -1,4 +1,4 @@
-# $NetBSD: pbulk.conf,v 1.27 2024/10/12 10:43:52 jperkin Exp $
+# $NetBSD: pbulk.conf,v 1.28 2025/01/13 11:03:03 wiz Exp $
# Version of the configuration file. This is bumped whenever the default
# config changes to notify the administrator about updates.
@@ -44,11 +44,6 @@ bootstrapkit=/usr/pkgsrc/bootstrap/boots
# The file is a newline separated list of package locations (e.g. lang/perl5).
#limited_list=/limited_list
-# Optionally ignore unresolvable dependencies for a full build (e.g.
-# a build without limited_list set). Default behavior is to bail out.
-#
-ignore_missing_dependencies=no
-
# If yes, consider a package up-to-date, if the dependency list matches
# the existing binary package and the recorded RCS IDs match the pkgsrc
# tree. Otherwise, additionally require that the package is not older
Index: pkgsrc/pkgtools/pbulk/files/pbulk/presolve/pbulk-resolve.1
diff -u pkgsrc/pkgtools/pbulk/files/pbulk/presolve/pbulk-resolve.1:1.1.1.1 pkgsrc/pkgtools/pbulk/files/pbulk/presolve/pbulk-resolve.1:1.2
--- pkgsrc/pkgtools/pbulk/files/pbulk/presolve/pbulk-resolve.1:1.1.1.1 Tue Jun 19 19:49:57 2007
+++ pkgsrc/pkgtools/pbulk/files/pbulk/presolve/pbulk-resolve.1 Mon Jan 13 11:03:03 2025
@@ -1,4 +1,4 @@
-.\" $NetBSD: pbulk-resolve.1,v 1.1.1.1 2007/06/19 19:49:57 joerg Exp $
+.\" $NetBSD: pbulk-resolve.1,v 1.2 2025/01/13 11:03:03 wiz Exp $
.\"
.\" Copyright (c) 2007 Thomas Klausner and Joerg Sonnenberger.
.\" All rights reserved.
@@ -24,7 +24,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd June 12, 2007
+.Dd January 6, 2025
.Dt PBULK-RESOLVE 1
.Os
.Sh NAME
@@ -43,9 +43,17 @@ resolves dependencies based on the outpu
.Xr pbulk-scan 1
saved in
.Ar input .
+Resolving a dependency means converting a pattern of the form
+.Dq sqlite3-[0-9]*:../../databases/sqlite3
+to the actual
+.Dv PKGNAME
+of the sqlite3 package found in
+.Ar input ,
+e.g.,
+.Dq sqlite3-3.47.2nb1 .
.Pp
Supported options are:
-.Bl -tag -offset indent
+.Bl -tag -offset indent -width 12n
.It Fl i Ar missing
Enter incremental mode.
For incremental mode, the package in
@@ -55,8 +63,6 @@ files are written to standard output inc
dependencies.
The location of each unresolved dependency is written to
.Ar missing .
-In normal mode, unresolvable dependencies are printed and the
-program exits with an error.
.It Fl v
If
.Fl v
@@ -70,8 +76,8 @@ different packages can be used to fulfil
.El
.Sh EXIT STATUS
.Nm
-exits with return value 1 if an error occurred, or 0 if all
-dependencies have been resolved successfully.
+exits with return value 0.
+.Pp
In incremental mode,
.Ar missing
contains all correct, but unresolvable dependencies.
Index: pkgsrc/pkgtools/pbulk/files/pbulk/presolve/presolve.c
diff -u pkgsrc/pkgtools/pbulk/files/pbulk/presolve/presolve.c:1.4 pkgsrc/pkgtools/pbulk/files/pbulk/presolve/presolve.c:1.5
--- pkgsrc/pkgtools/pbulk/files/pbulk/presolve/presolve.c:1.4 Tue Sep 16 18:21:30 2008
+++ pkgsrc/pkgtools/pbulk/files/pbulk/presolve/presolve.c Mon Jan 13 11:03:03 2025
@@ -1,4 +1,4 @@
-/* $NetBSD: presolve.c,v 1.4 2008/09/16 18:21:30 joerg Exp $ */
+/* $NetBSD: presolve.c,v 1.5 2025/01/13 11:03:03 wiz Exp $ */
/*-
* Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -46,13 +46,13 @@
#include "pbulk.h"
-static int partial, verbosity;
+static int verbosity;
static FILE *incremental = NULL;
static void
usage(void)
{
- (void)fprintf(stderr, "usage: pbulk-resolve [ -pv ] [ -i <missing> ] <pscan output> [ ... ]\n");
+ (void)fprintf(stderr, "usage: pbulk-resolve [-v] [-i missing] <pscan output> [ ... ]\n");
exit(1);
}
@@ -63,7 +63,7 @@ struct pkg_entry {
char *depends;
char *pkglocation;
int active;
- int broken; /* Entry has missing dependencies */
+ char *broken; /* Entry has missing dependencies */
const char *begin;
const char *end;
SLIST_ENTRY(pkg_entry) hash_link;
@@ -95,9 +95,6 @@ main(int argc, char **argv)
if ((incremental = fopen(optarg, "w")) == NULL)
err(1, "Cannot open output file");
break;
- case 'p':
- ++partial;
- break;
case 'v':
++verbosity;
break;
@@ -109,10 +106,7 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;
- if (argc == 0 || (incremental == NULL && argc > 1))
- usage();
-
- if (partial && incremental != NULL)
+ if (argc == 0)
usage();
read_entries(argv[0], 1);
@@ -286,6 +280,10 @@ resolve_entry(struct pkg_entry *pkg)
if (best_match == NULL) {
ret = 1;
+ if (incremental == NULL && pkg->broken == NULL) {
+ /* only keep first broken dependency */
+ pkg->broken = xstrndup(pattern_begin, pattern_end - pattern_begin);
+ }
continue;
}
@@ -308,10 +306,6 @@ resolve_entry(struct pkg_entry *pkg)
if (ret == 1) {
free(pkg->depends);
pkg->depends = NULL;
- if (incremental != NULL || partial)
- return 0;
- else
- return 1;
}
return 0;
}
@@ -376,6 +370,7 @@ read_entries(const char *input_file, int
pkgs[len_pkgs].begin = input_iter;
pkgs[len_pkgs].end = pbulk_item_end(input_iter);
pkgs[len_pkgs].depends = NULL;
+ pkgs[len_pkgs].broken = NULL;
if (pkgs[len_pkgs].end == NULL)
errx(1, "Invalid input");
input_iter = pkgs[len_pkgs].end;
@@ -397,15 +392,35 @@ read_entries(const char *input_file, int
errx(1, "Invalid input");
}
+#define PKG_FAIL_REASON "PKG_FAIL_REASON="
static void
write_entries(void)
{
size_t i;
+ const char *line, *line_end;
for (i = 0; i < len_pkgs; ++i) {
if (pkgs[i].active == 0)
continue;
- (void)fwrite(pkgs[i].begin, 1, pkgs[i].end - pkgs[i].begin, stdout);
+ /* if package is ok, just print existing entry */
+ if (pkgs[i].broken == NULL) {
+ (void)fwrite(pkgs[i].begin, 1, pkgs[i].end - pkgs[i].begin, stdout);
+ } else {
+ /* otherwise, replace PKG_FAIL_REASON line with reason for brokenness */
+ line = strstr(pkgs[i].begin, PKG_FAIL_REASON);
+ if (line == NULL) {
+ (void)fwrite(pkgs[i].begin, 1, pkgs[i].end -
+ pkgs[i].begin, stdout); continue;
+ }
+ (void)fwrite(pkgs[i].begin, 1, line - pkgs[i].begin,
+ stdout);
+ line_end = strchr(line, '\n');
+ (void)printf(PKG_FAIL_REASON
+ "\"could not resolve dependency \"%s\"\"\n",
+ pkgs[i].broken);
+ (void)fwrite(line_end + 1,
+ 1, pkgs[i].end - (line_end + 1), stdout);
+ }
if (pkgs[i].depends != NULL)
(void)printf("DEPENDS=%s\n", pkgs[i].depends);
}
Index: pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan
diff -u pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan:1.10 pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan:1.11
--- pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan:1.10 Wed Jan 8 15:12:01 2020
+++ pkgsrc/pkgtools/pbulk/files/pbulk/scripts/scan Mon Jan 13 11:03:03 2025
@@ -1,5 +1,5 @@
#!@SH@
-# $NetBSD: scan,v 1.10 2020/01/08 15:12:01 joerg Exp $
+# $NetBSD: scan,v 1.11 2025/01/13 11:03:03 wiz Exp $
#
# Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
# All rights reserved.
@@ -47,6 +47,10 @@ else
extra_pscan_args=""
fi
+if [ -n "${ignore_missing_dependencies}" ]; then
+ echo "The 'ignore_missing_dependencies' configuration variable is obsolete and has no effect." >&2
+fi
+
if [ -z "${limited_list}" ]; then
echo "Scanning..."
case "${master_mode}" in
@@ -62,20 +66,7 @@ if [ -z "${limited_list}" ]; then
;;
esac
echo "Resolving..."
- if ! ${presolve} -v ${loc}/pscan > ${loc}/presolve 2> ${loc}/presolve-err.log; then
- echo "Global dependency resolution failed, check ${loc}/presolve-err.log for details" >&2
- case "${ignore_missing_dependencies}" in
- [nN][oO])
- exit 1
- ;;
- [yY][eE][sS])
- ${presolve} -p -v ${loc}/pscan > ${loc}/presolve 2> /dev/null
- ;;
- *)
- echo "Unsupported value for ignore_missing_dependencies."
- ;;
- esac
- fi
+ ${presolve} -v ${loc}/pscan > ${loc}/presolve 2> ${loc}/presolve-err.log
else
initial=1
mkdir -p ${loc}
@@ -108,9 +99,10 @@ else
done
if [ -s ${loc}/missing ]; then
- echo "Unresolvable dependencies found, exiting:"
+ echo "Unresolvable dependencies found, marking packages depending on them as broken:"
cat ${loc}/missing
- exit 1
+ ${presolve} -v ${loc}/presolve ${loc}/pscan > ${loc}/presolve.new
+ mv ${loc}/presolve.new ${loc}/presolve
fi
fi
date '+SCAN_END_EPOCHE=%s' >> ${loc}/status
Home |
Main Index |
Thread Index |
Old Index