Restore pkg_admin 'add' command; it's still used by bootstrap in one place.
This commit is contained in:
parent
e1bf55736f
commit
98b6b1422a
1 changed files with 12 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: main.c,v 1.63 2014/12/30 15:13:20 wiz Exp $ */
|
||||
/* $NetBSD: main.c,v 1.64 2015/01/02 14:26:16 wiz 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.63 2014/12/30 15:13:20 wiz Exp $");
|
||||
__RCSID("$NetBSD: main.c,v 1.64 2015/01/02 14:26:16 wiz Exp $");
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999-2009 The NetBSD Foundation, Inc.
|
||||
|
@ -103,6 +103,7 @@ usage(void)
|
|||
" rebuild - rebuild pkgdb from +CONTENTS files\n"
|
||||
" rebuild-tree - rebuild +REQUIRED_BY files from forward deps\n"
|
||||
" check [pkg ...] - check md5 checksum of installed files\n"
|
||||
" add pkg ... - add pkg files to database\n"
|
||||
" set variable=value pkg ... - set installation variable for package\n"
|
||||
" unset variable pkg ... - unset installation variable for package\n"
|
||||
" lsall /path/to/pkgpattern - list all pkgs matching the pattern\n"
|
||||
|
@ -505,6 +506,15 @@ main(int argc, char *argv[])
|
|||
|
||||
pkgdb_dump();
|
||||
|
||||
} else if (strcasecmp(argv[0], "add") == 0) {
|
||||
struct pkgdb_count count;
|
||||
|
||||
count.files = 0;
|
||||
count.directories = 0;
|
||||
count.packages = 0;
|
||||
|
||||
for (++argv; *argv != NULL; ++argv)
|
||||
add_pkg(*argv, &count);
|
||||
} else if (strcasecmp(argv[0], "set") == 0) {
|
||||
argv++; /* "set" */
|
||||
set_unset_variable(argv, FALSE);
|
||||
|
|
Loading…
Reference in a new issue