diff options
author | joerg <joerg@pkgsrc.org> | 2016-04-10 19:01:19 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2016-04-10 19:01:19 +0000 |
commit | 4099f4e0f9ae6ea5fbcbe9c9ca7ef903d9be9cf2 (patch) | |
tree | 5ec0f70037c4598c33a55d4a84461063b090f867 /pkgtools/pkg_install | |
parent | e5e5bc38661ed6e3bbb364cf9efe42b9830b5aea (diff) | |
download | pkgsrc-4099f4e0f9ae6ea5fbcbe9c9ca7ef903d9be9cf2.tar.gz |
pkg_install-20160410:
Remove pkgdb handling logic from pkg_create, where it should have never
been in first place. Ignore former -U option as new default.
Diffstat (limited to 'pkgtools/pkg_install')
-rw-r--r-- | pkgtools/pkg_install/files/create/create.h | 3 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/create/main.c | 9 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/create/pkg_create.1 | 6 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/create/pl.c | 40 | ||||
-rw-r--r-- | pkgtools/pkg_install/files/lib/version.h | 4 |
5 files changed, 11 insertions, 51 deletions
diff --git a/pkgtools/pkg_install/files/create/create.h b/pkgtools/pkg_install/files/create/create.h index c21d5851896..d7f65ed2678 100644 --- a/pkgtools/pkg_install/files/create/create.h +++ b/pkgtools/pkg_install/files/create/create.h @@ -1,4 +1,4 @@ -/* $NetBSD: create.h,v 1.15 2014/12/30 15:13:20 wiz Exp $ */ +/* $NetBSD: create.h,v 1.16 2016/04/10 19:01:19 joerg Exp $ */ /* from FreeBSD Id: create.h,v 1.13 1997/10/08 07:46:19 charnier Exp */ @@ -57,7 +57,6 @@ extern char *DefaultGroup; extern const char *CompressionType; extern int PlistOnly; extern int RelativeLinks; -extern int update_pkgdb; void check_list(package_t *, const char *); void copy_plist(char *, package_t *); diff --git a/pkgtools/pkg_install/files/create/main.c b/pkgtools/pkg_install/files/create/main.c index fe57d18d642..826171094e4 100644 --- a/pkgtools/pkg_install/files/create/main.c +++ b/pkgtools/pkg_install/files/create/main.c @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz Exp $ */ +/* $NetBSD: main.c,v 1.21 2016/04/10 19:01:19 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -7,7 +7,7 @@ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz Exp $"); +__RCSID("$NetBSD: main.c,v 1.21 2016/04/10 19:01:19 joerg Exp $"); /* * FreeBSD install - a package for the installation and maintainance @@ -26,6 +26,7 @@ __RCSID("$NetBSD: main.c,v 1.20 2014/12/30 15:13:20 wiz Exp $"); #include "lib.h" #include "create.h" +/* -U is silently ignored, it used to inhibit pkgdb changes. */ static const char Options[] = "B:C:D:F:I:K:L:OP:S:T:UVb:c:d:f:g:i:k:ln:p:r:s:u:v"; char *Prefix = NULL; @@ -47,7 +48,6 @@ char *DefaultOwner = NULL; char *DefaultGroup = NULL; char *realprefix = NULL; const char *CompressionType = NULL; -int update_pkgdb = 1; int PlistOnly = 0; int RelativeLinks = 0; Boolean File2Pkg = FALSE; @@ -93,7 +93,6 @@ main(int argc, char **argv) break; case 'U': - update_pkgdb = 0; break; case 'p': @@ -204,7 +203,7 @@ main(int argc, char **argv) return 0; if (Verbose) { if (PlistOnly) - warnx("package registration failed"); + warnx("PLIST adjustment failed"); else warnx("package creation failed"); } diff --git a/pkgtools/pkg_install/files/create/pkg_create.1 b/pkgtools/pkg_install/files/create/pkg_create.1 index 4c95c3a5bfa..637ccc93622 100644 --- a/pkgtools/pkg_install/files/create/pkg_create.1 +++ b/pkgtools/pkg_install/files/create/pkg_create.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: pkg_create.1,v 1.26 2014/12/30 15:13:20 wiz Exp $ +.\" $NetBSD: pkg_create.1,v 1.27 2016/04/10 19:01:19 joerg Exp $ .\" .\" FreeBSD install - a package for the installation and maintenance .\" of non-core utilities. @@ -32,7 +32,7 @@ .Nd a utility for creating software package distributions .Sh SYNOPSIS .Nm -.Op Fl lOUVv +.Op Fl lOVv .Op Fl B Ar build-info-file .Op Fl b Ar build-version-file .Op Fl C Ar cpkgs @@ -243,8 +243,6 @@ Be sure to leave some number of characters 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 u Ar owner Make .Ar owner diff --git a/pkgtools/pkg_install/files/create/pl.c b/pkgtools/pkg_install/files/create/pl.c index cd01ceea6d9..654ec9b322e 100644 --- a/pkgtools/pkg_install/files/create/pl.c +++ b/pkgtools/pkg_install/files/create/pl.c @@ -1,4 +1,4 @@ -/* $NetBSD: pl.c,v 1.14 2009/11/05 16:22:32 joerg Exp $ */ +/* $NetBSD: pl.c,v 1.15 2016/04/10 19:01:19 joerg Exp $ */ #if HAVE_CONFIG_H #include "config.h" @@ -7,7 +7,7 @@ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -__RCSID("$NetBSD: pl.c,v 1.14 2009/11/05 16:22:32 joerg Exp $"); +__RCSID("$NetBSD: pl.c,v 1.15 2016/04/10 19:01:19 joerg Exp $"); /* * FreeBSD install - a package for the installation and maintainance @@ -89,10 +89,6 @@ check_list(package_t *pkg, const char *PkgName) char *pkgname = NULL; int cc; - /* Open Package Database for writing */ - if (update_pkgdb && !pkgdb_open(ReadWrite)) - err(EXIT_FAILURE, "can't open pkgdb"); - for (p = pkg->head; p; p = p->next) { switch (p->type) { case PLIST_CWD: @@ -109,38 +105,10 @@ check_list(package_t *pkg, const char *PkgName) errx(2, "@pkgdir without preceding @cwd found"); if (pkgname == NULL) errx(2, "@pkgdir without preceding @name found"); - if (update_pkgdb) { - add_pkgdir(pkgname, cwd, p->name); - /* mkdir_p(cwd, p->name); */ - } break; case PLIST_FILE: - /* - * pkgdb handling - usually, we enter files - * into the pkgdb as soon as they hit the disk, - * but as they are present before pkg_create - * starts, it's ok to do this somewhere here - */ if (cwd == NULL) errx(2, "file without preceding @cwd found"); - if (update_pkgdb) { - char *s, t[MaxPathSize]; - - (void) snprintf(t, sizeof(t), "%s%s%s", - cwd, - (strcmp(cwd, "/") == 0) ? "" : "/", - p->name); - - s = pkgdb_retrieve(t); - if (s && PlistOnly) - warnx("Overwriting %s - " - "pkg %s bogus/conflicting?", t, s); - else { - pkgdb_store(t, PkgName); - } - } - - /* prepend DESTDIR if set? - HF */ (void) snprintf(name, sizeof(name), "%s%s%s", cwd, (strcmp(cwd, "/") == 0) ? "" : "/", @@ -204,8 +172,4 @@ check_list(package_t *pkg, const char *PkgName) break; } } - - if (update_pkgdb) { - pkgdb_close(); - } } diff --git a/pkgtools/pkg_install/files/lib/version.h b/pkgtools/pkg_install/files/lib/version.h index 110b9a42e3e..adf3b42061c 100644 --- a/pkgtools/pkg_install/files/lib/version.h +++ b/pkgtools/pkg_install/files/lib/version.h @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.169 2015/09/01 12:14:06 jperkin Exp $ */ +/* $NetBSD: version.h,v 1.170 2016/04/10 19:01:19 joerg Exp $ */ /* * Copyright (c) 2001 Thomas Klausner. All rights reserved. @@ -27,6 +27,6 @@ #ifndef _INST_LIB_VERSION_H_ #define _INST_LIB_VERSION_H_ -#define PKGTOOLS_VERSION 20150901 +#define PKGTOOLS_VERSION 20160410 #endif /* _INST_LIB_VERSION_H_ */ |