summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install/create
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1995-04-09 15:05:01 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1995-04-09 15:05:01 +0000
commit6c5325bf0e55ecfa5a6b5f77761336aa1c406a42 (patch)
treef273cc944338bcf02c0c1057a024d5fdbf75658e /usr.sbin/pkg_install/create
parenta8f0877be0c29810f40e2163163b76cec8b6b978 (diff)
Notes
Diffstat (limited to 'usr.sbin/pkg_install/create')
-rw-r--r--usr.sbin/pkg_install/create/create.h3
-rw-r--r--usr.sbin/pkg_install/create/main.c10
-rw-r--r--usr.sbin/pkg_install/create/perform.c10
-rw-r--r--usr.sbin/pkg_install/create/pkg_create.111
4 files changed, 29 insertions, 5 deletions
diff --git a/usr.sbin/pkg_install/create/create.h b/usr.sbin/pkg_install/create/create.h
index e0ee4ccacefa..e64cf29366ac 100644
--- a/usr.sbin/pkg_install/create/create.h
+++ b/usr.sbin/pkg_install/create/create.h
@@ -1,4 +1,4 @@
-/* $Id: create.h,v 1.5 1994/05/19 18:27:38 alm Exp $ */
+/* $Id: create.h,v 1.6 1994/12/06 00:51:35 jkh Exp $ */
/*
* FreeBSD install - a package for the installation and maintainance
@@ -34,6 +34,7 @@ extern char *Require;
extern char *PlayPen;
extern char *ExcludeFrom;
extern char *Mtree;
+extern char *Pkgdeps;
extern int Dereference;
void check_list(char *, Package *);
diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c
index 623d7d117a6d..e3058dd3c392 100644
--- a/usr.sbin/pkg_install/create/main.c
+++ b/usr.sbin/pkg_install/create/main.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: main.c,v 1.7 1994/05/19 18:27:40 alm Exp $";
+static const char *rcsid = "$Id: main.c,v 1.8 1994/12/06 00:51:36 jkh Exp $";
#endif
/*
@@ -16,7 +16,7 @@ static const char *rcsid = "$Id: main.c,v 1.7 1994/05/19 18:27:40 alm Exp $";
#include "lib.h"
#include "create.h"
-static char Options[] = "YNhvf:p:c:d:i:k:r:t:X:D:m:";
+static char Options[] = "YNhvf:p:P:c:d:i:k:r:t:X:D:m:";
char *Prefix = NULL;
char *Comment = NULL;
@@ -29,6 +29,7 @@ char *Require = NULL;
char *PlayPen = NULL;
char *ExcludeFrom = NULL;
char *Mtree = NULL;
+char *Pkgdeps = NULL;
int Dereference = 0;
int
@@ -101,6 +102,10 @@ main(int argc, char **argv)
Mtree = optarg;
break;
+ case 'P':
+ Pkgdeps = optarg;
+ break;
+
case '?':
default:
usage(prog_name, NULL);
@@ -153,6 +158,7 @@ usage(const char *name, const char *fmt, ...)
fprintf(stderr, "-k script de-install script\n");
fprintf(stderr, "-D file install notice\n");
fprintf(stderr, "-m file mtree spec for directories\n");
+ fprintf(stderr, "-P pkgs set package dependency list to pkgs\n");
fprintf(stderr, "-p prefix install prefix will be arg\n");
fprintf(stderr, "-r script pre/post requirements script\n");
fprintf(stderr, "-t temp use temp as template for mktemp()\n");
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index 6d15ef8e3864..fb72a5114e01 100644
--- a/usr.sbin/pkg_install/create/perform.c
+++ b/usr.sbin/pkg_install/create/perform.c
@@ -1,5 +1,5 @@
#ifndef lint
-static const char *rcsid = "$Id: perform.c,v 1.13 1994/11/17 10:54:11 jkh Exp $";
+static const char *rcsid = "$Id: perform.c,v 1.14 1994/12/06 00:51:37 jkh Exp $";
#endif
/*
@@ -62,6 +62,14 @@ pkg_perform(char **pkgs)
else
suffix = "tgz";
+ /* Stick the dependencies, if any, at the top */
+ while (Pkgdeps) {
+ cp = strsep(&Pkgdeps, " \t\n");
+ if (*cp) {
+ add_plist(&plist, PLIST_PKGDEP, cp);
+ }
+ }
+
/* Slurp in the packing list */
read_plist(&plist, pkg_in);
diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1
index c2fc2bb99cac..e5424a9e85b7 100644
--- a/usr.sbin/pkg_install/create/pkg_create.1
+++ b/usr.sbin/pkg_install/create/pkg_create.1
@@ -15,7 +15,7 @@
.\"
.\"
.\" @(#)pkg_create.8
-.\" $Id: pkg_create.1,v 1.11 1995/01/05 10:22:51 jkh Exp $
+.\" $Id: pkg_create.1,v 1.12 1995/01/05 10:37:09 jkh Exp $
.\" hacked up by John Kohl for NetBSD--fixed a few bugs, extended keywords,
.\" added dependency tracking, etc.
.\"
@@ -28,6 +28,7 @@
.Sh SYNOPSIS
.Nm
.Op Fl YNhv
+.Op Fl P Ar pkgs
.Op Fl p Ar prefix
.Op Fl f Ar contents
.Op Fl i Ar iscript
@@ -99,6 +100,14 @@ to be the install procedure for the package. This can be any
executable program (or shell script). It will be invoked automatically
when the package is later installed.
.Em "Optional."
+.It Fl P Ar pkgs
+Sets the initial package dependency list to
+.Ar pkgs.
+This is assumed to be a whitespace separated list of package names
+and is meant as a convenient shorthand for specifying multiple
+.Cm @pkgdep
+directives in the packing list (see PACKING LIST DETAILS section below).
+.Em "Optional."
.It Fl p Ar prefix
Sets
.Ar prefix