Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/pkg_install Add -U argument to pkg_create - by defa...
details: https://anonhg.NetBSD.org/src/rev/3e74e8869cd1
branches: trunk
changeset: 510069:3e74e8869cd1
user: agc <agc%NetBSD.org@localhost>
date: Fri May 18 13:21:38 2001 +0000
description:
Add -U argument to pkg_create - by default, all files are added to the
pkgdb.byfile.db database. If -U is specified on command line to
pkg_create, don't add the PLIST entry to pkgdb.byfile.db.
Bump version number.
diffstat:
usr.sbin/pkg_install/create/create.h | 3 ++-
usr.sbin/pkg_install/create/main.c | 13 +++++++++----
usr.sbin/pkg_install/create/pkg_create.1 | 6 ++++--
usr.sbin/pkg_install/create/pl.c | 12 +++++++-----
usr.sbin/pkg_install/lib/version.h | 4 ++--
5 files changed, 24 insertions(+), 14 deletions(-)
diffs (161 lines):
diff -r 5640031ce608 -r 3e74e8869cd1 usr.sbin/pkg_install/create/create.h
--- a/usr.sbin/pkg_install/create/create.h Fri May 18 12:57:42 2001 +0000
+++ b/usr.sbin/pkg_install/create/create.h Fri May 18 13:21:38 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: create.h,v 1.14 1999/12/20 03:25:57 hubertf Exp $ */
+/* $NetBSD: create.h,v 1.15 2001/05/18 13:21:38 agc Exp $ */
/* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */
@@ -48,6 +48,7 @@
extern int PlistOnly;
extern int RelativeLinks;
extern int ReorderDirs;
+extern int update_pkgdb;
void check_list(char *, package_t *, const char *);
void copy_plist(char *, package_t *);
diff -r 5640031ce608 -r 3e74e8869cd1 usr.sbin/pkg_install/create/main.c
--- a/usr.sbin/pkg_install/create/main.c Fri May 18 12:57:42 2001 +0000
+++ b/usr.sbin/pkg_install/create/main.c Fri May 18 13:21:38 2001 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: main.c,v 1.17 2001/03/05 16:53:13 wiz Exp $ */
+/* $NetBSD: main.c,v 1.18 2001/05/18 13:21:38 agc Exp $ */
#include <sys/cdefs.h>
#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
-__RCSID("$NetBSD: main.c,v 1.17 2001/03/05 16:53:13 wiz Exp $");
+__RCSID("$NetBSD: main.c,v 1.18 2001/05/18 13:21:38 agc Exp $");
#endif
#endif
@@ -24,7 +24,7 @@
#include "lib.h"
#include "create.h"
-static char Options[] = "ORhlVvFf:p:P:C:c:d:i:k:L:r:t:X:D:m:s:S:b:B:";
+static char Options[] = "ORhlVvFf:p:P:C:c:d:i:k:L:r:t:X:D:m:s:S:b:B:U";
char *Prefix = NULL;
char *Comment = NULL;
@@ -45,6 +45,7 @@
char *SrcDir = NULL;
char PlayPen[FILENAME_MAX];
size_t PlayPenSize = sizeof(PlayPen);
+int update_pkgdb = 1;
int Dereference = 0;
int PlistOnly = 0;
int RelativeLinks = 0;
@@ -55,7 +56,7 @@
usage(void)
{
fprintf(stderr, "%s\n%s\n%s\n%s\n%s\n",
- "usage: pkg_create [-ORhlVv] [-P dpkgs] [-C cpkgs] [-p prefix] [-f contents]",
+ "usage: pkg_create [-ORUhlVv] [-P dpkgs] [-C cpkgs] [-p prefix] [-f contents]",
" [-i iscript] [-k dscript] [-r rscript] [-t template]",
" [-X excludefile] [-D displayfile] [-m mtreefile]",
" [-b build-version-file] [-B build-info-file]",
@@ -84,6 +85,10 @@
ReorderDirs = 1;
break;
+ case 'U':
+ update_pkgdb = 0;
+ break;
+
case 'p':
Prefix = optarg;
break;
diff -r 5640031ce608 -r 3e74e8869cd1 usr.sbin/pkg_install/create/pkg_create.1
--- a/usr.sbin/pkg_install/create/pkg_create.1 Fri May 18 12:57:42 2001 +0000
+++ b/usr.sbin/pkg_install/create/pkg_create.1 Fri May 18 13:21:38 2001 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pkg_create.1,v 1.27 2001/04/09 12:47:37 wiz Exp $
+.\" $NetBSD: pkg_create.1,v 1.28 2001/05/18 13:21:38 agc Exp $
.\"
.\" FreeBSD install - a package for the installation and maintainance
.\" of non-core utilities.
@@ -32,7 +32,7 @@
.Nd a utility for creating software package distributions
.Sh SYNOPSIS
.Nm
-.Op Fl hlORVv
+.Op Fl hlORUVv
.Bk -words
.Op Fl B Ar build-info-file
.Ek
@@ -257,6 +257,8 @@
for
.Xr mktemp 3
to fill in with a unique ID.
+.It Fl U
+Do not update the package file database with any file information.
.It Fl V
Print version number and exit.
.It Fl v
diff -r 5640031ce608 -r 3e74e8869cd1 usr.sbin/pkg_install/create/pl.c
--- a/usr.sbin/pkg_install/create/pl.c Fri May 18 12:57:42 2001 +0000
+++ b/usr.sbin/pkg_install/create/pl.c Fri May 18 13:21:38 2001 +0000
@@ -1,11 +1,11 @@
-/* $NetBSD: pl.c,v 1.19 2000/07/05 20:18:16 hubertf Exp $ */
+/* $NetBSD: pl.c,v 1.20 2001/05/18 13:21:38 agc Exp $ */
#include <sys/cdefs.h>
#ifndef lint
#if 0
static const char *rcsid = "from FreeBSD Id: pl.c,v 1.11 1997/10/08 07:46:35 charnier Exp";
#else
-__RCSID("$NetBSD: pl.c,v 1.19 2000/07/05 20:18:16 hubertf Exp $");
+__RCSID("$NetBSD: pl.c,v 1.20 2001/05/18 13:21:38 agc Exp $");
#endif
#endif
@@ -120,7 +120,7 @@
int dirc;
/* Open Package Database for writing */
- if (pkgdb_open(0) == -1) {
+ if (update_pkgdb && pkgdb_open(0) == -1) {
cleanup(0);
err(1, "can't open pkgdb");
}
@@ -146,7 +146,7 @@
* but as they are present before pkg_create
* starts, it's ok to do this somewhere here
*/
- {
+ if (update_pkgdb) {
char *s, t[FILENAME_MAX];
(void) snprintf(t, sizeof(t), "%s/%s", cwd, p->name);
@@ -206,7 +206,9 @@
}
}
- pkgdb_close();
+ if (update_pkgdb) {
+ pkgdb_close();
+ }
if (ReorderDirs && dirc > 0) {
reorder(pkg, dirc);
diff -r 5640031ce608 -r 3e74e8869cd1 usr.sbin/pkg_install/lib/version.h
--- a/usr.sbin/pkg_install/lib/version.h Fri May 18 12:57:42 2001 +0000
+++ b/usr.sbin/pkg_install/lib/version.h Fri May 18 13:21:38 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: version.h,v 1.4 2001/03/07 10:04:33 wiz Exp $ */
+/* $NetBSD: version.h,v 1.5 2001/05/18 13:21:39 agc Exp $ */
/*
* Copyright (c) 2001 Thomas Klausner. All rights reserved.
@@ -33,6 +33,6 @@
#ifndef _INST_LIB_VERSION_H_
#define _INST_LIB_VERSION_H_
-#define PKGTOOLS_VERSION "20010307"
+#define PKGTOOLS_VERSION "20010518"
#endif /* _INST_LIB_VERSION_H_ */
Home |
Main Index |
Thread Index |
Old Index