pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc Update to pkg_install-20030824. Changes from the prev...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/07de78a823a2
branches:  trunk
changeset: 460732:07de78a823a2
user:      jlam <jlam%pkgsrc.org@localhost>
date:      Wed Sep 03 14:05:59 2003 +0000

description:
Update to pkg_install-20030824.  Changes from the previous version include:

    * Check for errors in reading from the file descriptor for the ftp
      process, and correct the error messages.

    * Nuke some code for older NetBSDs that's better handled in
      pkgtools/libnbcompat.

    * Don't prevent user from using views other than the default view.

diffstat:

 doc/CHANGES                                   |   3 ++-
 pkgtools/pkg_install/files/lib/ftpio.c        |  15 ++++++++++-----
 pkgtools/pkg_install/files/lib/lib.h          |   8 +-------
 pkgtools/pkg_install/files/lib/pen.c          |  20 ++------------------
 pkgtools/pkg_install/files/lib/version.h      |   4 ++--
 pkgtools/pkg_install/files/view/pkg_view.1    |   6 ++----
 pkgtools/pkg_install/files/view/pkg_view.cat1 |   3 ---
 pkgtools/pkg_install/files/view/pkg_view.sh   |  10 +---------
 8 files changed, 20 insertions(+), 49 deletions(-)

diffs (213 lines):

diff -r 272ec9ea49b7 -r 07de78a823a2 doc/CHANGES
--- a/doc/CHANGES       Wed Sep 03 13:56:28 2003 +0000
+++ b/doc/CHANGES       Wed Sep 03 14:05:59 2003 +0000
@@ -1,4 +1,4 @@
-$NetBSD: CHANGES,v 1.3222 2003/09/03 13:41:09 adam Exp $
+$NetBSD: CHANGES,v 1.3223 2003/09/03 14:06:02 jlam Exp $
 
 Changes to the packages collection and infrastructure in 2003:
 
@@ -3507,3 +3507,4 @@
        Updated fvwm2-themes to 0.6.2nb1 [adam 2003-09-03]
        Updated make_album to 1.6nb4 [adam 2003-09-03]
        Updated zope25-Photo to 1.2.3nb2 [adam 2003-09-03]
+       Updated pkg_install to 20030824 [jlam 2003-09-03]
diff -r 272ec9ea49b7 -r 07de78a823a2 pkgtools/pkg_install/files/lib/ftpio.c
--- a/pkgtools/pkg_install/files/lib/ftpio.c    Wed Sep 03 13:56:28 2003 +0000
+++ b/pkgtools/pkg_install/files/lib/ftpio.c    Wed Sep 03 14:05:59 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftpio.c,v 1.4 2003/09/02 08:28:33 jlam Exp $   */
+/*     $NetBSD: ftpio.c,v 1.5 2003/09/03 14:05:59 jlam Exp $   */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -8,7 +8,7 @@
 #include <sys/cdefs.h>
 #endif
 #ifndef lint
-__RCSID("$NetBSD: ftpio.c,v 1.4 2003/09/02 08:28:33 jlam Exp $");
+__RCSID("$NetBSD: ftpio.c,v 1.5 2003/09/03 14:05:59 jlam Exp $");
 #endif
 
 /*
@@ -177,12 +177,12 @@
        case -1:
            if (errno == EINTR)
                break;
-           warn("expect: select() failed (probably ftp died because of bad args)");
+           warn("expect: poll() failed (probably ftp died because of bad args)");
            done = 1;
            retval = -1;
            break;
        case 0:
-           warnx("expect: select() timeout");
+           warnx("expect: poll() timeout");
            /* need to send ftp coprocess SIGINT to make it stop
             * downloading into dir that we'll blow away in a second */
            kill(ftp_pid, SIGINT);
@@ -209,7 +209,12 @@
                break;
            }
 
-           rc=read(fd,&buf[sizeof(buf)-1],1);
+           rc = read(fd, &buf[sizeof(buf) - 1], 1);
+           if (rc <= 0) {
+               done = 1;
+               retval = -1;
+               break;
+           }
 
            if (verbose_expect)
                putchar(buf[sizeof(buf)-1]);
diff -r 272ec9ea49b7 -r 07de78a823a2 pkgtools/pkg_install/files/lib/lib.h
--- a/pkgtools/pkg_install/files/lib/lib.h      Wed Sep 03 13:56:28 2003 +0000
+++ b/pkgtools/pkg_install/files/lib/lib.h      Wed Sep 03 14:05:59 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lib.h,v 1.2 2003/09/02 08:28:33 jlam Exp $ */
+/* $NetBSD: lib.h,v 1.3 2003/09/03 14:06:00 jlam Exp $ */
 
 /* from FreeBSD Id: lib.h,v 1.25 1997/10/08 07:48:03 charnier Exp */
 
@@ -141,12 +141,6 @@
 #define        PKG_PATTERN_MAX FILENAME_MAX    /* max length of pattern, including nul */
 #define        PKG_SUFFIX_MAX  10      /* max length of suffix, including nul */
 
-/* This should only happen on 1.3 and 1.3.1, not 1.3.2 and up */
-#ifndef TAILQ_FIRST
-#define TAILQ_FIRST(head)               ((head)->tqh_first)
-#define TAILQ_NEXT(elm, field)          ((elm)->field.tqe_next)
-#endif
-
 enum {
        ReadWrite,
        ReadOnly
diff -r 272ec9ea49b7 -r 07de78a823a2 pkgtools/pkg_install/files/lib/pen.c
--- a/pkgtools/pkg_install/files/lib/pen.c      Wed Sep 03 13:56:28 2003 +0000
+++ b/pkgtools/pkg_install/files/lib/pen.c      Wed Sep 03 14:05:59 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pen.c,v 1.9 2003/09/03 12:32:50 jlam Exp $     */
+/*     $NetBSD: pen.c,v 1.10 2003/09/03 14:06:00 jlam Exp $    */
 
 #if HAVE_CONFIG_H
 #include "config.h"
@@ -11,7 +11,7 @@
 #if 0
 static const char *rcsid = "from FreeBSD Id: pen.c,v 1.25 1997/10/08 07:48:12 charnier Exp";
 #else
-__RCSID("$NetBSD: pen.c,v 1.9 2003/09/03 12:32:50 jlam Exp $");
+__RCSID("$NetBSD: pen.c,v 1.10 2003/09/03 14:06:00 jlam Exp $");
 #endif
 #endif
 
@@ -48,9 +48,6 @@
 #if HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif
-#if HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif
 
 /* For keeping track of where we are */
 static char Current[FILENAME_MAX];
@@ -139,23 +136,10 @@
        if (!find_play_pen(pen, pensize, sz))
                return NULL;
 
-#if (defined(NetBSD1_3) || (NetBSD <= 199713)) && (NetBSD1_3 <9)
-       /* values from 1.3.2/1.3I */
-       /* mkdtemp(3) is not present on 1.3.3 and below */
-       if (!mktemp(pen)) {
-               cleanup(0);
-               errx(2, "can't mktemp '%s'", pen);
-       }
-       if (mkdir(pen, 0755) == FAIL) {
-               cleanup(0);
-               errx(2, "can't mkdir '%s'", pen);
-       }
-#else
        if (!mkdtemp(pen)) {
                cleanup(0);
                errx(2, "can't mkdtemp '%s'", pen);
        }
-#endif
        if (Verbose) {
                if (sz)
                        fprintf(stderr,
diff -r 272ec9ea49b7 -r 07de78a823a2 pkgtools/pkg_install/files/lib/version.h
--- a/pkgtools/pkg_install/files/lib/version.h  Wed Sep 03 13:56:28 2003 +0000
+++ b/pkgtools/pkg_install/files/lib/version.h  Wed Sep 03 14:05:59 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: version.h,v 1.10 2003/09/01 16:27:16 jlam Exp $        */
+/*     $NetBSD: version.h,v 1.11 2003/09/03 14:06:00 jlam 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 "20030823"
+#define PKGTOOLS_VERSION "20030824"
 
 #endif /* _INST_LIB_VERSION_H_ */
diff -r 272ec9ea49b7 -r 07de78a823a2 pkgtools/pkg_install/files/view/pkg_view.1
--- a/pkgtools/pkg_install/files/view/pkg_view.1        Wed Sep 03 13:56:28 2003 +0000
+++ b/pkgtools/pkg_install/files/view/pkg_view.1        Wed Sep 03 14:05:59 2003 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: pkg_view.1,v 1.3 2003/09/02 08:28:36 jlam Exp $
+.\"    $NetBSD: pkg_view.1,v 1.4 2003/09/03 14:06:01 jlam Exp $
 .\"
 .\" Copyright (c) 2003 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -184,7 +184,7 @@
 flag isn't given, then the value of the environment variable
 .Ev PKG_DBDIR
 is the package database directory for the default view,
-otherwise it defaults to 
+otherwise it defaults to
 .Pa /var/db/pkg .
 .It Ev PLIST_IGNORE_FILES
 This can be used to specify files in
@@ -265,5 +265,3 @@
 .Nm
 utility was written by
 .An Alistair G. Crooks Aq agc%netbsd.org@localhost .
-.Sh BUGS
-Only the empty view is supported.
diff -r 272ec9ea49b7 -r 07de78a823a2 pkgtools/pkg_install/files/view/pkg_view.cat1
--- a/pkgtools/pkg_install/files/view/pkg_view.cat1     Wed Sep 03 13:56:28 2003 +0000
+++ b/pkgtools/pkg_install/files/view/pkg_view.cat1     Wed Sep 03 14:05:59 2003 +0000
@@ -138,7 +138,4 @@
 AAUUTTHHOORRSS
      The ppkkgg__vviieeww utility was written by Alistair G. Crooks <agc%netbsd.org@localhost>.
 
-BBUUGGSS
-     Only the empty view is supported.
-
 NetBSD 1.6.1_STABLE              July 13, 2003                               3
diff -r 272ec9ea49b7 -r 07de78a823a2 pkgtools/pkg_install/files/view/pkg_view.sh
--- a/pkgtools/pkg_install/files/view/pkg_view.sh       Wed Sep 03 13:56:28 2003 +0000
+++ b/pkgtools/pkg_install/files/view/pkg_view.sh       Wed Sep 03 14:05:59 2003 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: pkg_view.sh,v 1.1 2003/09/01 16:27:16 jlam Exp $
+# $NetBSD: pkg_view.sh,v 1.2 2003/09/03 14:06:01 jlam Exp $
 
 #
 # Copyright (c) 2001 Alistair G. Crooks.  All rights reserved.
@@ -121,14 +121,6 @@
 esac
 shift
 
-# XXX Only support the standard view for now.
-case "$view" in
-"")    ;;
-*)     echo "pkg_view: only the standard view is supported" 1>&2
-       exit 1
-       ;;
-esac
-
 # if standard view, put package info into ${dflt_pkg_dbdir}
 # if not standard view, put package info into view's pkgdb
 case "$view" in



Home | Main Index | Thread Index | Old Index