diff options
author | jlam <jlam@pkgsrc.org> | 2003-09-03 14:05:59 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2003-09-03 14:05:59 +0000 |
commit | 35ae38a50f78b9a38ba0f32f8da8c91e2cbc15fc (patch) | |
tree | 3ae8200016f9d0fbca70b0c9421dae7f93739755 | |
parent | 1a2276974baa8f0abcf6bf78af5f5893d778f802 (diff) | |
download | pkgsrc-35ae38a50f78b9a38ba0f32f8da8c91e2cbc15fc.tar.gz |
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.
-rw-r--r-- | doc/CHANGES | 3 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/ftpio.c | 15 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/lib.h | 8 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/pen.c | 20 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/version.h | 4 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/view/pkg_view.1 | 6 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/view/pkg_view.cat1 | 3 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/view/pkg_view.sh | 10 |
8 files changed, 20 insertions, 49 deletions
diff --git a/doc/CHANGES b/doc/CHANGES index 6e4beca2c99..731a6182de1 100644 --- a/doc/CHANGES +++ b/doc/CHANGES @@ -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 @@ Changes to the packages collection and infrastructure in 2003: 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 --git a/pkgtools/pkg_install/files/lib/ftpio.c b/pkgtools/pkg_install/files/lib/ftpio.c index e7189179589..8187bd96ecc 100644 --- a/pkgtools/pkg_install/files/lib/ftpio.c +++ b/pkgtools/pkg_install/files/lib/ftpio.c @@ -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 @@ expect(int fd, const char *str, int *ftprc) 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 @@ expect(int fd, const char *str, int *ftprc) 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 --git a/pkgtools/pkg_install/files/lib/lib.h b/pkgtools/pkg_install/files/lib/lib.h index cc40a739dfb..c5bc7f16f04 100644 --- a/pkgtools/pkg_install/files/lib/lib.h +++ b/pkgtools/pkg_install/files/lib/lib.h @@ -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 --git a/pkgtools/pkg_install/files/lib/pen.c b/pkgtools/pkg_install/files/lib/pen.c index 1487ffdc2c2..52fd14d1895 100644 --- a/pkgtools/pkg_install/files/lib/pen.c +++ b/pkgtools/pkg_install/files/lib/pen.c @@ -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 @@ __RCSID("$NetBSD: pen.c,v 1.9 2003/09/03 12:32:50 jlam Exp $"); #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 @@ make_playpen(char *pen, size_t pensize, size_t sz) 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 --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h index 4972bd9d10e..77edc41b290 100644 --- a/pkgtools/pkg_install/files/lib/version.h +++ b/pkgtools/pkg_install/files/lib/version.h @@ -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 --git a/pkgtools/pkg_install/files/view/pkg_view.1 b/pkgtools/pkg_install/files/view/pkg_view.1 index 5fbfe0a944d..4aa05762f0e 100644 --- a/pkgtools/pkg_install/files/view/pkg_view.1 +++ b/pkgtools/pkg_install/files/view/pkg_view.1 @@ -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 @@ If the 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 @@ The .Nm utility was written by .An Alistair G. Crooks Aq agc@netbsd.org . -.Sh BUGS -Only the empty view is supported. diff --git a/pkgtools/pkg_install/files/view/pkg_view.cat1 b/pkgtools/pkg_install/files/view/pkg_view.cat1 index 0644266c16f..4d006ba9c7a 100644 --- a/pkgtools/pkg_install/files/view/pkg_view.cat1 +++ b/pkgtools/pkg_install/files/view/pkg_view.cat1 @@ -138,7 +138,4 @@ SSEEEE AALLSSOO AAUUTTHHOORRSS The ppkkgg__vviieeww utility was written by Alistair G. Crooks <agc@netbsd.org>. -BBUUGGSS - Only the empty view is supported. - NetBSD 1.6.1_STABLE July 13, 2003 3 diff --git a/pkgtools/pkg_install/files/view/pkg_view.sh b/pkgtools/pkg_install/files/view/pkg_view.sh index 119aa939232..ad4d91e1245 100644 --- a/pkgtools/pkg_install/files/view/pkg_view.sh +++ b/pkgtools/pkg_install/files/view/pkg_view.sh @@ -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 @@ delete|rm) action=delete ;; 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 |