NetBSD Problem Report #52684
From www@NetBSD.org Tue Oct 31 15:10:52 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id EF7FA7A1CB
for <gnats-bugs@gnats.NetBSD.org>; Tue, 31 Oct 2017 15:10:51 +0000 (UTC)
Message-Id: <20171031151051.25FC77A210@mollari.NetBSD.org>
Date: Tue, 31 Oct 2017 15:10:51 +0000 (UTC)
From: lifanov@FreeBSD.org
Reply-To: lifanov@FreeBSD.org
To: gnats-bugs@NetBSD.org
Subject: allow wtf to work with "pkg info" from pkgng
X-Send-Pr-Version: www-1.0
>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: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Oct 31 15:15:00 +0000 2017
>Closed-Date: Thu Aug 16 13:31:30 +0000 2018
>Last-Modified: Thu Aug 16 13:35:00 +0000 2018
>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
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: maya@NetBSD.org
State-Changed-When: Thu, 16 Aug 2018 13:31:30 +0000
State-Changed-Why:
Applied, thanks!
From: "Maya Rashish" <maya@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/52684 CVS commit: src/games/wtf
Date: Thu, 16 Aug 2018 13:31:04 +0000
Module Name: src
Committed By: maya
Date: Thu Aug 16 13:31:04 UTC 2018
Modified Files:
src/games/wtf: wtf
Log Message:
Try freebsd's pkg-info as well
From John Hein, via Nikolai Lifanov. PR misc/52684
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/games/wtf/wtf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.