diff options
| author | hubertf <hubertf@NetBSD.org> | 1997-10-16 00:50:20 +0000 |
|---|---|---|
| committer | hubertf <hubertf@NetBSD.org> | 1997-10-16 00:50:20 +0000 |
| commit | 508ee08a3437c4e7d719a2bdcede65bf82af1830 (patch) | |
| tree | c6b9b663df9bc38110d31d2e0b5c228942535465 /usr.sbin/pkg_install/create | |
| parent | a35a2a56e452797b0a27b6a9675750f96ce37a72 (diff) | |
Second part of intrgration of FreeBSD pkg_install as of 971013.
This patch adds @option preserve and handling for -s (SrcDir)
option.
Diffstat (limited to 'usr.sbin/pkg_install/create')
| -rw-r--r-- | usr.sbin/pkg_install/create/create.h | 5 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/create/main.c | 13 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/create/perform.c | 13 | ||||
| -rw-r--r-- | usr.sbin/pkg_install/create/pkg_create.1 | 14 |
4 files changed, 36 insertions, 9 deletions
diff --git a/usr.sbin/pkg_install/create/create.h b/usr.sbin/pkg_install/create/create.h index 1672b15fb59..702a05e0fa3 100644 --- a/usr.sbin/pkg_install/create/create.h +++ b/usr.sbin/pkg_install/create/create.h @@ -1,4 +1,4 @@ -/* $NetBSD: create.h,v 1.3 1997/10/16 00:31:49 hubertf Exp $ */ +/* $NetBSD: create.h,v 1.4 1997/10/16 00:50:28 hubertf Exp $ */ /* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */ @@ -33,10 +33,11 @@ extern char *Install; extern char *DeInstall; extern char *Contents; extern char *Require; -extern char PlayPen[]; +extern char *SrcDir; extern char *ExcludeFrom; extern char *Mtree; extern char *Pkgdeps; +extern char PlayPen[]; extern int Dereference; extern int PlistOnly; diff --git a/usr.sbin/pkg_install/create/main.c b/usr.sbin/pkg_install/create/main.c index 46b5f33b9cc..109704bd947 100644 --- a/usr.sbin/pkg_install/create/main.c +++ b/usr.sbin/pkg_install/create/main.c @@ -1,10 +1,10 @@ -/* $NetBSD: main.c,v 1.3 1997/10/16 00:31:51 hubertf Exp $ */ +/* $NetBSD: main.c,v 1.4 1997/10/16 00:50:31 hubertf Exp $ */ #ifndef lint #if 0 static const char *rcsid = "from FreeBSD Id: main.c,v 1.17 1997/10/08 07:46:23 charnier Exp"; #else -static const char *rcsid = "$NetBSD: main.c,v 1.3 1997/10/16 00:31:51 hubertf Exp $"; +static const char *rcsid = "$NetBSD: main.c,v 1.4 1997/10/16 00:50:31 hubertf Exp $"; #endif #endif @@ -23,20 +23,21 @@ static const char *rcsid = "$NetBSD: main.c,v 1.3 1997/10/16 00:31:51 hubertf Ex #include "lib.h" #include "create.h" -static char Options[] = "YNOhvf:p:P:c:d:i:k:r:t:X:D:m:"; +static char Options[] = "YNOhvf:p:P:c:d:i:k:r:t:X:D:m:s:"; char *Prefix = NULL; char *Comment = NULL; char *Desc = NULL; +char *SrcDir = NULL; char *Display = NULL; char *Install = NULL; char *DeInstall = NULL; char *Contents = NULL; char *Require = NULL; -char PlayPen[FILENAME_MAX]; char *ExcludeFrom = NULL; char *Mtree = NULL; char *Pkgdeps = NULL; +char PlayPen[FILENAME_MAX]; int Dereference = 0; int PlistOnly = 0; @@ -71,6 +72,10 @@ main(int argc, char **argv) Prefix = optarg; break; + case 's': + SrcDir = optarg; + break; + case 'f': Contents = optarg; break; diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index 924e2479d31..2c41292ca38 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -1,10 +1,10 @@ -/* $NetBSD: perform.c,v 1.3 1997/10/16 00:31:53 hubertf Exp $ */ +/* $NetBSD: perform.c,v 1.4 1997/10/16 00:50:34 hubertf Exp $ */ #ifndef lint #if 0 static const char *rcsid = "from FreeBSD Id: perform.c,v 1.38 1997/10/13 15:03:51 jkh Exp"; #else -static const char *rcsid = "$NetBSD: perform.c,v 1.3 1997/10/16 00:31:53 hubertf Exp $"; +static const char *rcsid = "$NetBSD: perform.c,v 1.4 1997/10/16 00:50:34 hubertf Exp $"; #endif #endif @@ -90,6 +90,14 @@ pkg_perform(char **pkgs) if (Verbose && !PlistOnly) printf(".\n"); } + + /* If a SrcDir override is set, add it now */ + if (SrcDir) { + if (Verbose && !PlistOnly) + printf("Using SrcDir value of %s\n", SrcDir); + add_plist(&plist, PLIST_SRC, SrcDir); + } + /* Slurp in the packing list */ read_plist(&plist, pkg_in); @@ -110,6 +118,7 @@ pkg_perform(char **pkgs) * hack. It's not a real create in progress. */ if (PlistOnly) { + check_list(home, &plist); write_plist(&plist, stdout); exit(0); } diff --git a/usr.sbin/pkg_install/create/pkg_create.1 b/usr.sbin/pkg_install/create/pkg_create.1 index 520a4bc71a7..20e8b367a46 100644 --- a/usr.sbin/pkg_install/create/pkg_create.1 +++ b/usr.sbin/pkg_install/create/pkg_create.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_create.1,v 1.5 1997/10/16 00:31:56 hubertf Exp $ +.\" $NetBSD: pkg_create.1,v 1.6 1997/10/16 00:50:37 hubertf Exp $ .\" .\" FreeBSD install - a package for the installation and maintainance .\" of non-core utilities. @@ -268,6 +268,18 @@ Format is the same as that used by the command (well, considering that it's later handed off to it, that's no surprise). Use without an arg to set back to default (extraction) permissions. +.It Cm @option Ar option +Set internal package options, the only two currently supported ones +being +.Ar extract-in-place , +which tells the pkg_add command not to extract the package's tarball +into a staging area but rather directly into the target +hierarchy (this is typically meant to be used only by distributions +or other special package types), and +.Ar preserve , +which tells pkg_add to move any existing files out of the way, +preserving the previous contents (which are also resurrected on +pkg_delete, so caveat emptor). .It Cm @owner Ar user Set default ownership for all subsequently extracted files to .Ar user . |
