pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/pbulk pbulk-0.34:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8e6ec323c7c6
branches:  trunk
changeset: 547437:8e6ec323c7c6
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Sep 16 18:21:30 2008 +0000

description:
pbulk-0.34:
- version configuration file, object if the version doesn't match
- add an option for pbulk-resolve to ignore unresolvable dependencies
similiar to the incremental mode
- use this option to run pbulk-resolve again if ignore_missing_depencies
is set to yes. Report this explicitly to un-confuse readers and point
them to the logfile.

diffstat:

 pkgtools/pbulk/Makefile                               |  10 ++++---
 pkgtools/pbulk/files/pbulk/pbulk.conf                 |  12 +++++++++-
 pkgtools/pbulk/files/pbulk/presolve/presolve.c        |  17 +++++++++----
 pkgtools/pbulk/files/pbulk/scripts/build              |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/build-client-start |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild  |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart  |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/client-clean       |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/pkg-build          |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date     |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/pre-build          |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/report             |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/scan               |  23 +++++++++++++++++-
 pkgtools/pbulk/files/pbulk/scripts/scan-client-start  |   8 +++++-
 pkgtools/pbulk/files/pbulk/scripts/upload             |   8 +++++-
 15 files changed, 127 insertions(+), 23 deletions(-)

diffs (truncated from 412 to 300 lines):

diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/Makefile
--- a/pkgtools/pbulk/Makefile   Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/Makefile   Tue Sep 16 18:21:30 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.45 2008/09/14 18:59:02 joerg Exp $
+# $NetBSD: Makefile,v 1.46 2008/09/16 18:21:30 joerg Exp $
 
 DISTNAME=      pbulk-0.34
 CATEGORIES=    pkgtools
@@ -44,12 +44,14 @@
        scripts/create-report-html.awk scripts/create-report-txt.awk \
        scripts/create-report.awk
 SUBST_VARS.tools=      AWK BZIP2 CHOWN DIGEST GZIP_CMD IDENT MAIL_CMD NEATO \
-                       PBULK_CONFIG PKG_ADD_CMD PKG_DELETE_CMD \
-                       PKG_INFO_CMD PREFIX SED SH TAR TARGET_MAKE
+                       PBULK_CONFIG PBULK_CONFIG_VERSION PKG_ADD_CMD \
+                       PKG_DELETE_CMD PKG_INFO_CMD PREFIX SED SH TAR \
+                       TARGET_MAKE
 
 CONF_FILES+=   share/examples/pbulk/pbulk.conf ${PKG_SYSCONFDIR}/pbulk.conf
 
-PBULK_CONFIG=  ${PKG_SYSCONFDIR}/pbulk.conf
+PBULK_CONFIG=          ${PKG_SYSCONFDIR}/pbulk.conf
+PBULK_CONFIG_VERSION=  0.34
 
 INSTALLATION_DIRS=     bin libexec/pbulk \
                        ${PKGMANDIR}/cat1 ${PKGMANDIR}/man1 \
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/pbulk.conf
--- a/pkgtools/pbulk/files/pbulk/pbulk.conf     Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/pbulk.conf     Tue Sep 16 18:21:30 2008 +0000
@@ -1,4 +1,9 @@
-# $NetBSD: pbulk.conf,v 1.14 2008/02/03 21:20:46 tnn Exp $
+# $NetBSD: pbulk.conf,v 1.15 2008/09/16 18:21:30 joerg Exp $
+
+# Version of the configuration file. This is bumped whenver the default
+# config changes to notify the administrator about updates.
+#
+config_version=@PBULK_CONFIG_VERSION@
 
 # The URL where the build report will be made available. This is only
 # used in the .txt version of the report.
@@ -36,6 +41,11 @@
 # 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
+
 report_graph_script_limit=512
 
 # Account used for user-destdir builds. This account should have
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/presolve/presolve.c
--- a/pkgtools/pbulk/files/pbulk/presolve/presolve.c    Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/presolve/presolve.c    Tue Sep 16 18:21:30 2008 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: presolve.c,v 1.3 2007/07/20 19:39:34 joerg Exp $ */
+/* $NetBSD: presolve.c,v 1.4 2008/09/16 18:21:30 joerg Exp $ */
 
 /*-
  * Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
@@ -46,13 +46,13 @@
 
 #include "pbulk.h"
 
-static int verbosity;
+static int partial, verbosity;
 static FILE *incremental = NULL;
 
 static void
 usage(void)
 {
-       (void)fprintf(stderr, "usage: pbulk-resolve [ -i <missing> ] [ -v ] <pscan output> [ ... ]\n");
+       (void)fprintf(stderr, "usage: pbulk-resolve [ -pv ] [ -i <missing> ] <pscan output> [ ... ]\n");
        exit(1);
 }
 
@@ -63,6 +63,7 @@
        char *depends;
        char *pkglocation;
        int active;
+       int broken; /* Entry has missing dependencies */
        const char *begin;
        const char *end;
        SLIST_ENTRY(pkg_entry) hash_link;
@@ -86,7 +87,7 @@
 
        setprogname("pbulk-resolve");
 
-       while ((ch = getopt(argc, argv, "i:v")) != -1) {
+       while ((ch = getopt(argc, argv, "i:pv")) != -1) {
                switch (ch) {
                case 'i':
                        if (incremental != NULL)
@@ -94,6 +95,9 @@
                        if ((incremental = fopen(optarg, "w")) == NULL)
                                err(1, "Cannot open output file");
                        break;
+               case 'p':
+                       ++partial;
+                       break;
                case 'v':
                        ++verbosity;
                        break;
@@ -108,6 +112,9 @@
        if (argc == 0 || (incremental == NULL && argc > 1))
                usage();
 
+       if (partial && incremental != NULL)
+               usage();
+
        read_entries(argv[0], 1);
        while (--argc > 0)
                read_entries(*++argv, 0);
@@ -301,7 +308,7 @@
        if (ret == 1) {
                free(pkg->depends);
                pkg->depends = NULL;
-               if (incremental != NULL)
+               if (incremental != NULL || partial)
                        return 0;
                else
                        return 1;
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/scripts/build
--- a/pkgtools/pbulk/files/pbulk/scripts/build  Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/build  Tue Sep 16 18:21:30 2008 +0000
@@ -1,5 +1,5 @@
 #!@SH@
-# $NetBSD: build,v 1.4 2008/01/26 23:44:08 joerg Exp $
+# $NetBSD: build,v 1.5 2008/09/16 18:21:30 joerg Exp $
 #
 # Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
 # All rights reserved.
@@ -34,6 +34,12 @@
 
 set -e
 
+if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
+       echo "Your configuration has version ${config_version}."
+       echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
+       exit 1
+fi
+
 echo "Building..."
 case "${master_mode}" in
 [nN][oO])
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/scripts/build-client-start
--- a/pkgtools/pbulk/files/pbulk/scripts/build-client-start     Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/build-client-start     Tue Sep 16 18:21:30 2008 +0000
@@ -1,10 +1,16 @@
 #!@SH@
-# $NetBSD: build-client-start,v 1.1.1.1 2007/06/19 19:49:59 joerg Exp $
+# $NetBSD: build-client-start,v 1.2 2008/09/16 18:21:30 joerg Exp $
 
 . @PBULK_CONFIG@
 
 set -e
 
+if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
+       echo "Your configuration has version ${config_version}."
+       echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
+       exit 1
+fi
+
 for client in ${build_clients}; do
        ssh $client "${pbuild} -c ${master_port_build} -b ${pbuild_script}" &
 done
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild
--- a/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild      Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-rebuild      Tue Sep 16 18:21:30 2008 +0000
@@ -1,10 +1,16 @@
 #!@SH@
-# $NetBSD: bulkbuild-rebuild,v 1.2 2008/06/20 11:51:50 joerg Exp $
+# $NetBSD: bulkbuild-rebuild,v 1.3 2008/09/16 18:21:30 joerg Exp $
 
 . @PBULK_CONFIG@
 
 set -e
 
+if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
+       echo "Your configuration has version ${config_version}."
+       echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
+       exit 1
+fi
+
 check_pkg() {
        if @AWK@ '{ if ($0 == "PKGNAME='$1'") exit 1 }' < ${loc}/presolve; then
                echo "Package $1 not found, aborting."
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart
--- a/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart      Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/bulkbuild-restart      Tue Sep 16 18:21:30 2008 +0000
@@ -1,10 +1,16 @@
 #!@SH@
-# $NetBSD: bulkbuild-restart,v 1.1 2008/04/04 17:58:59 joerg Exp $
+# $NetBSD: bulkbuild-restart,v 1.2 2008/09/16 18:21:30 joerg Exp $
 
 . @PBULK_CONFIG@
 
 set -e
 
+if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
+       echo "Your configuration has version ${config_version}."
+       echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
+       exit 1
+fi
+
 check_list() {
        while read pkg
        do
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/scripts/client-clean
--- a/pkgtools/pbulk/files/pbulk/scripts/client-clean   Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/client-clean   Tue Sep 16 18:21:30 2008 +0000
@@ -1,10 +1,16 @@
 #!@SH@
-# $NetBSD: client-clean,v 1.8 2008/01/26 23:44:08 joerg Exp $
+# $NetBSD: client-clean,v 1.9 2008/09/16 18:21:30 joerg Exp $
 
 . @PBULK_CONFIG@
 
 set -e
 
+if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
+       echo "Your configuration has version ${config_version}."
+       echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
+       exit 1
+fi
+
 if [ "$cross_compile" != "no" ]; then
        cur_destdir=${target_destdir}
 else
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/scripts/pkg-build
--- a/pkgtools/pbulk/files/pbulk/scripts/pkg-build      Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/pkg-build      Tue Sep 16 18:21:30 2008 +0000
@@ -1,5 +1,5 @@
 #!@SH@
-# $NetBSD: pkg-build,v 1.16 2008/07/14 13:02:00 joerg Exp $
+# $NetBSD: pkg-build,v 1.17 2008/09/16 18:21:30 joerg Exp $
 #
 # Copyright (c) 2007, 2008 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
 # All rights reserved.
@@ -32,6 +32,12 @@
 
 . @PBULK_CONFIG@
 
+if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
+       echo "Your configuration has version ${config_version}."
+       echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
+       exit 1
+fi
+
 cleanup() {
        if [ "$keep_wrkdir" = yes ]; then
                ${make} pbulk-save-wrkdir INTO=${bulklog}/${pkgname}/wrkdir.tar.gz
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date
--- a/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/pkg-up-to-date Tue Sep 16 18:21:30 2008 +0000
@@ -1,5 +1,5 @@
 #!@SH@
-# $NetBSD: pkg-up-to-date,v 1.2 2008/01/26 23:44:09 joerg Exp $
+# $NetBSD: pkg-up-to-date,v 1.3 2008/09/16 18:21:30 joerg Exp $
 #
 # Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
 # All rights reserved.
@@ -34,6 +34,12 @@
 
 set -e
 
+if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
+       echo "Your configuration has version ${config_version}."
+       echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
+       exit 1
+fi
+
 pkg="${packages}/All/$1.tgz"
 [ -f ${pkg} ]
 
diff -r 7411bd557896 -r 8e6ec323c7c6 pkgtools/pbulk/files/pbulk/scripts/pre-build
--- a/pkgtools/pbulk/files/pbulk/scripts/pre-build      Tue Sep 16 18:09:14 2008 +0000
+++ b/pkgtools/pbulk/files/pbulk/scripts/pre-build      Tue Sep 16 18:21:30 2008 +0000
@@ -1,5 +1,5 @@
 #!@SH@
-# $NetBSD: pre-build,v 1.8 2008/01/30 15:01:04 joerg Exp $
+# $NetBSD: pre-build,v 1.9 2008/09/16 18:21:30 joerg Exp $
 #
 # Copyright (c) 2007 Joerg Sonnenberger <joerg%NetBSD.org@localhost>.
 # All rights reserved.
@@ -34,6 +34,12 @@
 
 set -e
 
+if [ "${config_version}" != "@PBULK_CONFIG_VERSION@" ]; then
+       echo "Your configuration has version ${config_version}."
+       echo "This version of pbulk expects version @PBULK_CONFIG_VERSION@."
+       exit 1
+fi
+
 if [ "$cross_compile" != "no" ]; then
        if [ -z "${target_destdir}" ]; then
                echo "target_destdir must be set for cross-compiling."



Home | Main Index | Thread Index | Old Index