From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 3 14:45:10 2013 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1E59A5EA for ; Thu, 3 Jan 2013 14:45:10 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-wg0-x229.google.com (wg-in-x0229.1e100.net [IPv6:2a00:1450:400c:c00::229]) by mx1.freebsd.org (Postfix) with ESMTP id A971CC1A for ; Thu, 3 Jan 2013 14:45:09 +0000 (UTC) Received: by mail-wg0-f41.google.com with SMTP id ds1so6510553wgb.4 for ; Thu, 03 Jan 2013 06:45:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=2MbjGB81DswnjLq3MOYGtC97VQdnpw0rqKD1NtGvync=; b=phaScRDOYLaSa0dN7IasPgtaKYedUy0v1cVNT387KlOq0UlOqFAfoFVg0wajsp1xQR UAIfKTo1LO6mvs3dbY7fOvS4/CfjmvH7uIRS6BylOjLxB862TbDu5ktdM5CTDcE/tAJ9 iO10PxusFnO/ntUemrIDFOapauwPApyPesr+gYWmta9TDY7tYu/c26JKDMP9kgh8r64V NACHNfLQKbkQqMyvtMPfCcw7N92PfawzCKozTdYaYTTYMJJCbJQ/D2hAQPd1zmVfv9W4 46qJf84oC3EXwZkPIVibkcXFoZyH0U5yF0x2ZDNtcjgvCY7vcHEE9Ti06io3Y7hwFPOW OUmg== X-Received: by 10.180.103.136 with SMTP id fw8mr68400561wib.27.1357224307777; Thu, 03 Jan 2013 06:45:07 -0800 (PST) Received: from DOMYPC ([82.193.208.225]) by mx.google.com with ESMTPS id s10sm85693802wiw.4.2013.01.03.06.45.05 (version=SSLv3 cipher=OTHER); Thu, 03 Jan 2013 06:45:05 -0800 (PST) Message-ID: <20130103.144510.650.7@DOMY-PC> From: rank1seeker@gmail.com To: "Mike Meyer" , "Matthew Seaman" , hackers@freebsd.org Subject: Re: Vice versa of 'pkg_info -W' Date: Thu, 03 Jan 2013 15:45:10 +0100 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20130102.175558.373.6@DOMY-PC> X-Mailer: POP Peeper (3.8.1.0) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2013 14:45:10 -0000 > rank1seeker@gmail.com wrote:=0D=0A> =0D=0A> >For example:=0D=0A> ># = pkg_info -W /usr/local/bin/lynx=0D=0A> >/usr/local/bin/lynx was installed = by package lynx-2.8.7.2,1=0D=0A> >=0D=0A> ># pkg_deinstall = lynx-2.8.7.2,1=0D=0A> >=0D=0A> ># pkg_info -W /usr/local/bin/lynx=0D=0A> = >pkg_info: /usr/local/bin/lynx: file cannot be found=0D=0A> >=0D=0A> = >=0D=0A> >As you can figure it out, I want a reverse method, that is = ...=0D=0A> >If I want to have '/usr/local/bin/lynx' installed, which = port=0D=0A> >origin(s), would install it?=0D=0A> =0D=0A> The portsearch = port will do that.=0D=0A> =0D=0A=0D=0AWell, it works prety much = as:=0D=0A=0D=0A=0D=0A> Well, in the case of lynx, where the filename of = the executable matches=0D=0A> the package name, it's fairly = simple:=0D=0A> =0D=0A> lucid-nonsense:/usr/ports:% cd /usr/ports=0D=0A> = lucid-nonsense:/usr/ports:% make search name=3Dlynx=0D=0A> Port: = ja-lynx-2.8.7.r1=0D=0A> Path: /usr/ports/japanese/lynx=0D=0A> Info: A = terminal-based World-Wide Web Client with multi-byte modification=0D=0A> = Maint: ports@FreeBSD.org=0D=0A> B-deps: libiconv-1.14=0D=0A> R-deps: = libiconv-1.14=0D=0A> WWW: http://lynx.isc.org/current/=0D=0A> =0D=0A> = Port: ja-lynx-2.8.8.d3=0D=0A> Path: = /usr/ports/japanese/lynx-current=0D=0A> Info: A terminal-based World-Wide = Web Client with multi-byte=0D=0A> modification (development = version)=0D=0A> Maint: ports@FreeBSD.org=0D=0A> B-deps: = libiconv-1.14=0D=0A> R-deps: libiconv-1.14=0D=0A> WWW: = http://lynx.isc.org/current/=0D=0A> =0D=0A> Port: lynx-2.8.7.2,1=0D=0A> = Path: /usr/ports/www/lynx=0D=0A> Info: A non-graphical, text-based = World-Wide Web client=0D=0A> Maint: jharris@widomaker.com=0D=0A> B-deps: = gettext-0.18.1.1 libiconv-1.14 openssl-1.0.1_4=0D=0A> R-deps: = gettext-0.18.1.1 libiconv-1.14 openssl-1.0.1_4=0D=0A> WWW: = http://lynx.isc.org/=0D=0A> =0D=0A> Port: lynx-2.8.8d12_1=0D=0A> Path: = /usr/ports/www/lynx-current=0D=0A> Info: A non-graphical, text-based = World-Wide Web client=0D=0A> Maint: johans@FreeBSD.org=0D=0A> B-deps: = gettext-0.18.1.1 libiconv-1.14 libidn-1.25 openssl-1.0.1_4=0D=0A> = pkgconf-0.8.9=0D=0A> R-deps: gettext-0.18.1.1 libiconv-1.14 libidn-1.25 = mime-support-3.52.2=0D=0A> openssl-1.0.1_4 pkgconf-0.8.9=0D=0A> WWW: = http://lynx.isc.org/current/=0D=0A> =0D=0A=0D=0AI slightly hopped '-p = path' flag of a portsearch would to the trick, but it counts for = '/usr/ports/*' path.=0D=0ANot to the path of a binary.=0D=0A=0D=0A> = =0D=0A> However, in the general case, there isn't (as far as I know) a = database=0D=0A> of all of the files installed by all of the packages that = can be=0D=0A> generated from the = ports.=0D=0A=0D=0AUnfortunately.=0D=0AI've attempted to grep = '/usr/ports/*/*/pkg-plist' for 'bin/lynx' and shot myself in a foot! = :P=0D=0AEven if it did returned "sane" amount of matches, speed was = atrocious.=0D=0A=0D=0A> I believe bapt@ had plans to gather this sort of = data on the=0D=0A> yet-to-be-commisioned pkgng build cluster. As that's = currently out of=0D=0A> action as a consequence of the security incident, = and the whole package=0D=0A> building system is being revised, I don't = know if that's still on the=0D=0A> cards or likely to be implemented any = time soon.=0D=0A> =0D=0A> Cheers,=0D=0A> =0D=0A> Matthew=0D=0A=0D=0AI = see. But for this to work, DB is mandatory.=0D=0A=0D=0A=0D=0ADomagoj = Smol=E8i=E6