Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Rename -L to -U and deprecate -L usage
Bryan Drewery committed 13 years ago
commit 53e4fd03fec9670a867fb815d50908a4d69cf907
parent 4bc3c84
6 files changed +53 -29
modified pkg/fetch.c
@@ -1,6 +1,7 @@
/*-
 * Copyright (c) 2011-2012 Marin Atanasov Nikolov <dnaeon@gmail.com>
 * Copyright (c) 2013 Matthew Seaman <matthew@FreeBSD.org>
+
 * Copyright (c) 2012-2013 Bryan Drewery <bdrewery@FreeBSD.org>
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
@@ -43,9 +44,9 @@
void
usage_fetch(void)
{
-
	fprintf(stderr, "usage: pkg fetch [-r reponame] [-dgiLqxy] <pkg-name> <...>\n");
-
	fprintf(stderr, "       pkg fetch [-r reponame] [-dLqy] -a\n");
-
	fprintf(stderr, "       pkg fetch [-r reponame] [-dLqy] -u\n\n");
+
	fprintf(stderr, "usage: pkg fetch [-r reponame] [-dgiqUxy] <pkg-name> <...>\n");
+
	fprintf(stderr, "       pkg fetch [-r reponame] [-dqUy] -a\n");
+
	fprintf(stderr, "       pkg fetch [-r reponame] [-dqUy] -u\n\n");
	fprintf(stderr, "For more information see 'pkg help fetch'.\n");
}

@@ -68,7 +69,7 @@ exec_fetch(int argc, char **argv)
	pkg_config_bool(PKG_CONFIG_REPO_AUTOUPDATE, &auto_update);
	pkg_config_bool(PKG_CONFIG_ASSUME_ALWAYS_YES, &yes);

-
	while ((ch = getopt(argc, argv, "adgiLqr:uxy")) != -1) {
+
	while ((ch = getopt(argc, argv, "adgiLqr:Uuxy")) != -1) {
		switch (ch) {
		case 'a':
			match = MATCH_ALL;
@@ -84,6 +85,9 @@ exec_fetch(int argc, char **argv)
			pkgdb_set_case_sensitivity(false);
			break;
		case 'L':
+
			warnx("!!! The -L flag is deprecated and will be removed. Please use -U now.");
+
			/* FALLTHROUGH */
+
		case 'U':
			auto_update = false;
			break;
		case 'q':
modified pkg/install.c
@@ -3,6 +3,7 @@
 * Copyright (c) 2011-2012 Julien Laffaye <jlaffaye@FreeBSD.org>
 * Copyright (c) 2011-2012 Marin Atanasov Nikolov <dnaeon@gmail.com>
 * Copyright (c) 2013 Matthew Seaman <matthew@FreeBSD.org>
+
 * Copyright (c) 2012-2013 Bryan Drewery <bdrewery@FreeBSD.org>
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
@@ -46,7 +47,7 @@ void
usage_install(void)
{
	fprintf(stderr,
-
	    "usage: pkg install [-AfgIiLnqRxy] [-r reponame] <pkg-name> ...\n\n");
+
	    "usage: pkg install [-AfgIinqRUxy] [-r reponame] <pkg-name> ...\n\n");
	fprintf(stderr, "For more information see 'pkg help install'.\n");
}

@@ -69,7 +70,7 @@ exec_install(int argc, char **argv)
	pkg_config_bool(PKG_CONFIG_ASSUME_ALWAYS_YES, &yes);
	pkg_config_bool(PKG_CONFIG_REPO_AUTOUPDATE, &auto_update);

-
	while ((ch = getopt(argc, argv, "AfgIiLnqRr:xy")) != -1) {
+
	while ((ch = getopt(argc, argv, "AfgIiLnqRr:Uxy")) != -1) {
		switch (ch) {
		case 'A':
			f |= PKG_FLAG_AUTOMATIC;
@@ -87,6 +88,9 @@ exec_install(int argc, char **argv)
			pkgdb_set_case_sensitivity(false);
			break;
		case 'L':
+
			warnx("!!! The -L flag is deprecated and will be removed. Please use -U now.");
+
			/* FALLTHROUGH */
+
		case 'U':
			auto_update = false;
			break;
		case 'n':
modified pkg/pkg-fetch.8
@@ -15,7 +15,7 @@
.\"     @(#)pkg.8
.\" $FreeBSD$
.\"
-
.Dd February 25, 2013
+
.Dd March 3, 2013
.Dt PKG-FETCH 8
.Os
.Sh NAME
@@ -24,16 +24,16 @@
.Sh SYNOPSIS
.Nm
.Op Fl r Ar reponame
-
.Op Fl dgiLqxy
+
.Op Fl dgiqUxy
.Ar <pkg-name>
.Op ...
.Nm
.Op Fl r Ar reponame
-
.Op Fl dLqy
+
.Op Fl dqUy
.Fl a
.Nm
.Op Fl r Ar reponame
-
.Op Fl dLqy
+
.Op Fl dqUy
.Fl u
.Sh DESCRIPTION
.Nm
@@ -44,7 +44,7 @@ One or more packages, or patterns can be specified.
Repository catalogues will be updated automatically using
.Xr pkg-update 8 .
This can be disabled with the
-
.Fl L
+
.Fl U
flag.
.Sh OPTIONS
The following options are supported by
@@ -65,9 +65,9 @@ matching against
.Ar pkg-name
case insensitive.
.It Fl L
-
Skip updating the repository catalogues with
-
.Xr pkg-update 8 .
-
Use the local cache only.
+
Backwards compatbility flag for
+
.Fl U .
+
This is planned to be removed.
.It Fl q
Quiet mode.
Show less output.
@@ -79,6 +79,10 @@ See
.Xr pkg.conf 5 .
.It Fl u
Fetch all available updates for the currently installed packages.
+
.It Fl U
+
Skip updating the repository catalogues with
+
.Xr pkg-update 8 .
+
Use the local cache only.
.It Fl x
Treat
.Ar <pkg-name>
modified pkg/pkg-install.8
@@ -15,7 +15,7 @@
.\"     @(#)pkg.8
.\" $FreeBSD$
.\"
-
.Dd February 25, 2013
+
.Dd March 3, 2013
.Dt PKG-INSTALL 8
.Os
.Sh NAME
@@ -23,7 +23,7 @@
.Nd installs packages from remote package repositories
.Sh SYNOPSIS
.Nm
-
.Op Fl AfgIiLnqRxy
+
.Op Fl AfgIinqRUxy
.Op Fl r Ar reponame
.Ar <pkg-origin> ...
.Sh DESCRIPTION
@@ -97,7 +97,7 @@ configuration setting are defined.
Package repository catalogues will be automatically updated whenever
.Xr pkg-update 8
is run, unless disabled by the
-
.Fl L
+
.Fl U
flag.
Updating repository catalogues is highly recommended before doing any
package installation with
@@ -127,9 +127,9 @@ matching against
.Ar pkg-name
case insensitive.
.It Fl L
-
Skip updating the repository catalogues with
-
.Xr pkg-update 8 .
-
Use the locally cached copies only.
+
Backwards compatbility flag for
+
.Fl U .
+
This is planned to be removed.
.It Fl n
Dry-run mode.
The list of changes to packages is always printed, but
@@ -149,6 +149,10 @@ In multi-repo mode, override the
.Fa pkg.conf
ordering and only attempt to download packages from the named
repository.
+
.It Fl U
+
Skip updating the repository catalogues with
+
.Xr pkg-update 8 .
+
Use the locally cached copies only.
.It Fl x
Treat the package names as regular expressions according to the
"modern" or "extended" syntax of
modified pkg/pkg-upgrade.8
@@ -15,7 +15,7 @@
.\"     @(#)pkg.8
.\" $FreeBSD$
.\"
-
.Dd February 25, 2013
+
.Dd March 3, 2013
.Dt PKG-UPGRADE 8
.Os
.Sh NAME
@@ -23,7 +23,7 @@
.Nd performs upgrades of package software distributions
.Sh SYNOPSIS
.Nm
-
.Op Fl fILnqy
+
.Op Fl fInqUy
.Op Fl r Ar reponame
.Sh DESCRIPTION
.Nm
@@ -45,7 +45,7 @@ will be able to perform package upgrades from multiple repositories.
Repository catalogues will automatically be updated using
.Xr pkg-update 8 .
This can be disabled with the
-
.Fl L
+
.Fl U
flag.
.Sh OPTIONS
The following options are supported by
@@ -58,19 +58,23 @@ If any installation scripts (pre-install or post-install) or deinstallation
scripts (pre-deinstall or post-deinstall) exist for a given package, do not
execute them.
.It Fl L
-
Skip updating the repository catalogues with
-
.Xr pkg-update 8 .
-
Use the local cache only.
+
Backwards compatbility flag for
+
.Fl U .
+
This is planned to be removed.
.It Fl n
Dry-run mode: show what packages have updates available, but do not perform
any upgrades.
Repository catalogues will be updated as usual unless the
-
.Fl L
+
.Fl U
option is also given.
.It Fl q
Force quiet output, except when
.Fl n
is used, where
+
.It Fl U
+
Skip updating the repository catalogues with
+
.Xr pkg-update 8 .
+
Use the local cache only.
.Nm
will always print out the list of packages with available updates.
.It Fl y
modified pkg/upgrade.c
@@ -1,6 +1,7 @@
/*-
 * Copyright (c) 2011-2012 Baptiste Daroussin <bapt@FreeBSD.org>
 * Copyright (c) 2013 Matthew Seaman <matthew@FreeBSD.org>
+
 * Copyright (c) 2012-2013 Bryan Drewery <bdrewery@FreeBSD.org>
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
@@ -38,7 +39,7 @@
void
usage_upgrade(void)
{
-
	fprintf(stderr, "usage: pkg upgrade [-fILnqy] [-r reponame]\n\n");
+
	fprintf(stderr, "usage: pkg upgrade [-fInqUy] [-r reponame]\n\n");
	fprintf(stderr, "For more information see 'pkg help upgrade'.\n");
}

@@ -61,7 +62,7 @@ exec_upgrade(int argc, char **argv)
	pkg_config_bool(PKG_CONFIG_REPO_AUTOUPDATE, &auto_update);


-
	while ((ch = getopt(argc, argv, "fLnqr:y")) != -1) {
+
	while ((ch = getopt(argc, argv, "fLnqr:Uy")) != -1) {
		switch (ch) {
		case 'f':
			f |= PKG_FLAG_FORCE;
@@ -70,6 +71,9 @@ exec_upgrade(int argc, char **argv)
			f |= PKG_FLAG_NOSCRIPT;
			break;
		case 'L':
+
			warnx("!!! The -L flag is deprecated and will be removed. Please use -U now.");
+
			/* FALLTHROUGH */
+
		case 'U':
			auto_update = false;
			break;
		case 'n':