Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Support '-r reponame' for pkg version -R
Bryan Drewery committed 13 years ago
commit e3c69315f3c0dacede34aacb96995d2fc6dfa479
parent 28a3563
2 files changed +11 -2
modified pkg/pkg-version.8
@@ -28,6 +28,7 @@
.Op Fl l Ar limchar
.Op Fl L Ar limchar
.Op Fl Xxge Ar pattern
+
.Op Fl r Ar reponame
.Op Fl O Ar origin
.Op Ar index
.Nm
@@ -57,6 +58,11 @@ for more information.
.It Fl R
Use repository catalogue for determining if a package is out of date.
This is the default if no ports tree exists.
+
.It Fl r Ar reponame
+
Use the given
+
.Ar reponame
+
for comparison when using
+
.Fl R
.It Fl o
Display package origin, instead of package name.
.It Fl q
modified pkg/version.c
@@ -58,7 +58,7 @@ void
usage_version(void)
{
	fprintf(stderr, "usage: pkg version [-IPR] [-hoqv] [-l limchar] [-L limchar] [[-X] -s string]\n");
-
	fprintf(stderr, "                   [-O origin] [index]\n");
+
	fprintf(stderr, "                   [-r reponame] [-O origin] [index]\n");
	fprintf(stderr, "       pkg version -t <version1> <version2>\n");
	fprintf(stderr, "       pkg version -T <pkgname> <pattern>\n\n");
	fprintf(stderr, "For more information see 'pkg help version'.\n");
@@ -168,7 +168,7 @@ exec_version(int argc, char **argv)

	SLIST_INIT(&indexhead);

-
	while ((ch = getopt(argc, argv, "hIPRoqvl:L:X:x:g:e:O:tT")) != -1) {
+
	while ((ch = getopt(argc, argv, "hIPRoqvl:L:X:x:g:e:O:r:tT")) != -1) {
		switch (ch) {
		case 'h':
			usage_version();
@@ -215,6 +215,9 @@ exec_version(int argc, char **argv)
			match = MATCH_EXACT;
			pattern = optarg;
			break;
+
		case 'r':
+
			reponame = optarg;
+
			break;
		case 'O':
			opt |= VERSION_WITHORIGIN;
			matchorigin = optarg;