diff options
| -rw-r--r-- | usr.sbin/pkg_install/version/perform.c | 5 | ||||
| -rwxr-xr-x | usr.sbin/pkg_install/version/test-pkg_version.sh | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/version/perform.c b/usr.sbin/pkg_install/version/perform.c index 7ce6a9242c15..c371dc11b659 100644 --- a/usr.sbin/pkg_install/version/perform.c +++ b/usr.sbin/pkg_install/version/perform.c @@ -165,6 +165,10 @@ pkg_do(char *pkg) } } if (latest == NULL) { + /* Report package as not found in INDEX if the INDEX is not required. */ + if (IndexFile == NULL && !UseINDEXOnly) + show_version(plist, NULL, plist.origin); + else { /* We only pull in the INDEX once, if needed. */ if (SLIST_EMPTY(&Index)) { if (!IndexFile) @@ -230,6 +234,7 @@ pkg_do(char *pkg) show_version(plist, NULL, NULL); else show_version(plist, latest, "index"); + } } if (latest != NULL) free(latest); diff --git a/usr.sbin/pkg_install/version/test-pkg_version.sh b/usr.sbin/pkg_install/version/test-pkg_version.sh index 5c3d98d9c8f8..95486c1f7bdf 100755 --- a/usr.sbin/pkg_install/version/test-pkg_version.sh +++ b/usr.sbin/pkg_install/version/test-pkg_version.sh @@ -50,7 +50,7 @@ test-pv ( ) { \ test-pv 0.10 "=" 0.10_0 coercion test-pv 0.10 "=" 0.10,0 coercion test-pv 0.10 "=" 0.10_0,0 coercion - + # Test various comparisons test-pv 1.0 "=" 1.0 equality test-pv 2.15a "=" 2.15a equality |
