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
>Release:        
>Organization:
>Environment:
>Description:
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:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223329

>How-To-Repeat:

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

+       # 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/bsd.pkg.mk ]; then



Home | Main Index | Thread Index | Old Index