NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/52684: allow wtf to work with "pkg info" from pkgng

>Number:         52684
>Category:       misc
>Synopsis:       allow wtf to work with "pkg info" from pkgng
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Oct 31 15:15:00 +0000 2017
>Originator:     Nikolai Lifanov
Currently, wtf queries the package database for a comment field using pkg_info(1) if an acronym is not found. This patch also adds a fallback to pkg-info(1) from pkgng.

This was originally submitted by John Hein in this PR:


--- wtf.orig    2017-10-31 15:03:28 UTC
+++ wtf
@@ -94,6 +94,13 @@ for i; do

+       # Try pkg-info(1) next
+       ans="$(pkg info -qI "$i" 2> /dev/null)"
+       if [ $? -eq 0 ]; then
+               echo "$i: $ans"
+               continue
+       fi
        # If called from pkgsrc package directory,
        # try querying pkgsrc's help facility next
        if [ -f ../../mk/ ]; then

Home | Main Index | Thread Index | Old Index