Source-Changes-HG archive

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

[src/netbsd-1-4]: src/usr.sbin/pkg_install/lib Pull up revisions 1.39-1.42 (r...



details:   https://anonhg.NetBSD.org/src/rev/0693568ecd02
branches:  netbsd-1-4
changeset: 471023:0693568ecd02
user:      he <he%NetBSD.org@localhost>
date:      Thu Oct 12 21:26:20 2000 +0000

description:
Pull up revisions 1.39-1.42 (requested by fredb):
  Synchronize to version of pkg_install on trunk.

diffstat:

 usr.sbin/pkg_install/lib/file.c |  16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diffs (59 lines):

diff -r 26469fb3d30d -r 0693568ecd02 usr.sbin/pkg_install/lib/file.c
--- a/usr.sbin/pkg_install/lib/file.c   Thu Oct 12 21:26:17 2000 +0000
+++ b/usr.sbin/pkg_install/lib/file.c   Thu Oct 12 21:26:20 2000 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: file.c,v 1.25.2.9 2000/07/31 18:19:02 he Exp $ */
+/*     $NetBSD: file.c,v 1.25.2.10 2000/10/12 21:26:20 he Exp $        */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
 #else
-__RCSID("$NetBSD: file.c,v 1.25.2.9 2000/07/31 18:19:02 he Exp $");
+__RCSID("$NetBSD: file.c,v 1.25.2.10 2000/10/12 21:26:20 he Exp $");
 #endif
 #endif
 
@@ -405,10 +405,11 @@
        }
 
        cp = getenv("PKG_PATH");
-       while (cp) {
+       while (cp && *cp) {
                char   *cp2 = strsep(&cp, ";");
 
-               printf("trying PKG_PATH %s\n", cp2?cp2:cp);
+               if (Verbose)
+                       printf("trying PKG_PATH %s\n", cp2?cp2:cp);
 
                if (strstr(fname, ".tgz")) {
                        /* There's already a ".tgz" present, probably typed on the command line */
@@ -429,7 +430,8 @@
 /*                     printf("HF: expandURL('%s')'ing #3\n", url);*//*HF*/
                        rc = expandURL(tmp, url);
                        if (rc >= 0) {
-                               printf("fileFindByPath: success, expandURL('%s') returns '%s'\n", url, tmp);
+                               if (Verbose)
+                                       printf("fileFindByPath: success, expandURL('%s') returns '%s'\n", url, tmp);
                                return tmp;
                        }
 
@@ -597,7 +599,7 @@
                (void) snprintf(cmd, sizeof(cmd), "cp -r %s %s", fname, to);
        else
                (void) snprintf(cmd, sizeof(cmd), "cp -r %s/%s %s", dir, fname, to);
-       if (vsystem(cmd)) {
+       if (vsystem("%s", cmd)) {
                cleanup(0);
                errx(2, "could not perform '%s'", cmd);
        }
@@ -612,7 +614,7 @@
                (void) snprintf(cmd, sizeof(cmd), "mv %s %s", fname, to);
        else
                (void) snprintf(cmd, sizeof(cmd), "mv %s/%s %s", dir, fname, to);
-       if (vsystem(cmd)) {
+       if (vsystem("%s", cmd)) {
                cleanup(0);
                errx(2, "could not perform '%s'", cmd);
        }



Home | Main Index | Thread Index | Old Index