Source-Changes-HG archive

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

[src/netbsd-1-5]: src/usr.sbin/pkg_install/add Pull up revisions 1.18-1.19 (r...



details:   https://anonhg.NetBSD.org/src/rev/4d0c00c5e966
branches:  netbsd-1-5
changeset: 490907:4d0c00c5e966
user:      he <he%NetBSD.org@localhost>
date:      Tue Mar 20 17:55:48 2001 +0000

description:
Pull up revisions 1.18-1.19 (requested by hubertf):
  Various changes / updates:
   o add -V option to determine version
   o add -u switch to pkg_add for upgrading a package

diffstat:

 usr.sbin/pkg_install/add/main.c |  16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)

diffs (55 lines):

diff -r cf51c19eb6c8 -r 4d0c00c5e966 usr.sbin/pkg_install/add/main.c
--- a/usr.sbin/pkg_install/add/main.c   Tue Mar 20 17:25:33 2001 +0000
+++ b/usr.sbin/pkg_install/add/main.c   Tue Mar 20 17:55:48 2001 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: main.c,v 1.15.2.2 2000/12/15 04:05:22 he Exp $ */
+/*     $NetBSD: main.c,v 1.15.2.3 2001/03/20 17:55:48 he Exp $ */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char *rcsid = "from FreeBSD Id: main.c,v 1.16 1997/10/08 07:45:43 charnier Exp";
 #else
-__RCSID("$NetBSD: main.c,v 1.15.2.2 2000/12/15 04:05:22 he Exp $");
+__RCSID("$NetBSD: main.c,v 1.15.2.3 2001/03/20 17:55:48 he Exp $");
 #endif
 #endif
 
@@ -35,7 +35,7 @@
 #include "lib.h"
 #include "add.h"
 
-static char Options[] = "hvIRfnp:SMt:";
+static char Options[] = "hVvIRfnp:SMt:u";
 
 char   *Prefix = NULL;
 Boolean NoInstall = FALSE;
@@ -48,12 +48,13 @@
 char   *Directory = NULL;
 char    FirstPen[FILENAME_MAX];
 add_mode_t AddMode = NORMAL;
+int    upgrade = 0;
 
 static void
 usage(void)
 {
        fprintf(stderr, "%s\n%s\n",
-           "usage: pkg_add [-vInfRMS] [-t template] [-p prefix]",
+           "usage: pkg_add [-hVvInfRMSu] [-t template] [-p prefix]",
            "               pkg-name [pkg-name ...]");
        exit(1);
 }
@@ -106,6 +107,13 @@
                        AddMode = MASTER;
                        break;
 
+               case 'V':
+                       show_version();
+                       /* NOTREACHED */
+
+               case 'u':
+                       upgrade = 1;
+                       break;
                case 'h':
                case '?':
                default:



Home | Main Index | Thread Index | Old Index