Subject: Re: pkg/8982: change in pkg_install breaks third party product
To: Eric Schnoebelen <eric@cirr.com>
From: Hubert Feyrer <feyrer@rfhs8012.fh-regensburg.de>
List: tech-pkg
Date: 12/16/1999 04:14:30
Hi Eric!

> Any input on this from the tech-pkg folks? :)

After I had to wade through the overwhelming feedback on this from
tech-pkg, I've put together patches to add the old -s switch back as -L
now. Can you please let me know if they work for you, I can't really test
this.

In any case, let me know so I can commit this and close the PR. Thanks!


 - Hubert


Index: create/create.h
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/create/create.h,v
retrieving revision 1.13
diff -u -r1.13 create.h
--- create.h	1999/11/29 19:48:45	1.13
+++ create.h	1999/12/16 03:06:18
@@ -41,6 +41,7 @@
 extern char *BuildInfo;
 extern char *SizePkg;
 extern char *SizeAll;
+extern char *SrcDir;
 extern char PlayPen[];
 extern size_t PlayPenSize;
 extern int Dereference;
Index: create/main.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/create/main.c,v
retrieving revision 1.15
diff -u -r1.15 main.c
--- main.c	1999/11/29 19:48:45	1.15
+++ main.c	1999/12/16 03:06:18
@@ -24,7 +24,7 @@
 #include "lib.h"
 #include "create.h"
 
-static char Options[] = "ORhlvFf:p:P:C:c:d:i:k:r:t:X:D:m:s:S:b:B:";
+static char Options[] = "ORhlvFf:p:P:C:c:d:i:k:L:r:t:X:D:m:s:S:b:B:";
 
 char   *Prefix = NULL;
 char   *Comment = NULL;
@@ -42,6 +42,7 @@
 char   *BuildInfo = NULL;
 char   *SizePkg = NULL;
 char   *SizeAll = NULL;
+char   *SrcDir = NULL;
 char    PlayPen[FILENAME_MAX];
 size_t  PlayPenSize = sizeof(PlayPen);
 int     Dereference = 0;
@@ -117,6 +118,10 @@
 
 		case 'l':
 			RelativeLinks = 1;
+			break;
+
+		case 'L':
+			SrcDir = optarg;
 			break;
 
 		case 'r':
Index: create/perform.c
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/create/perform.c,v
retrieving revision 1.21
diff -u -r1.21 perform.c
--- perform.c	1999/11/29 20:09:55	1.21
+++ perform.c	1999/12/16 03:06:19
@@ -263,6 +263,13 @@
 			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);
 
Index: create/pkg_create.1
===================================================================
RCS file: /cvsroot/basesrc/usr.sbin/pkg_install/create/pkg_create.1,v
retrieving revision 1.20
diff -u -r1.20 pkg_create.1
--- pkg_create.1	1999/11/29 20:09:55	1.20
+++ pkg_create.1	1999/12/16 03:06:25
@@ -61,6 +61,9 @@
 .Op Fl k Ar dscript
 .Ek
 .Bk -words
+.Op Fl L Ar SrcDir
+.Ek
+.Bk -words
 .Op Fl m Ar mtreefile
 .Ek
 .Bk -words
@@ -119,6 +122,9 @@
 and is meant as a convenient shorthand for specifying multiple
 .Cm @pkgcfl
 directives in the packing list (see PACKING LIST DETAILS section below).
+.It Fl L Ar SrcDir
+This sets the package's @src directive; see below for a description
+of what this does.
 .It Fl D Ar displayfile
 Display the file after installing the package. Useful for things like
 legal notices on almost-free software, etc.

-- 
NetBSD - Better for your uptime than Viagra