From owner-freebsd-pkg@FreeBSD.ORG Tue Jul 1 10:03:29 2014 Return-Path: Delivered-To: pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFAF47AF for ; Tue, 1 Jul 2014 10:03:29 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 91B702CF1 for ; Tue, 1 Jul 2014 10:03:29 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id A3A36A973 for ; Tue, 1 Jul 2014 10:03:28 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id B46B7348B2; Tue, 1 Jul 2014 12:03:29 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: pkg@freebsd.org Subject: Re: "pkg upgrade" doesn't References: <864mz1fno4.fsf@nine.des.no> Date: Tue, 01 Jul 2014 12:03:29 +0200 In-Reply-To: <864mz1fno4.fsf@nine.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8r?= =?utf-8?Q?grav=22's?= message of "Tue, 01 Jul 2014 11:12:11 +0200") Message-ID: <86y4wde6q6.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jul 2014 10:03:29 -0000 Dag-Erling Sm=C3=B8rgrav writes: > BTW, it would be nice to have a) a query pattern that prints the > repository a package was installed from [...] So apparently, this is implemented but not available. If I add an entry for 'R' to accepted_query_flags[] in src/query.c, I can use %R, but it doesn't work: % ./src/pkg-static query %R pkg-devel (null) % pkg info pkg-devel | grep repos repository : des-local that's because %R is implemented as pkg_printf("%N") which returns PKG_REPONAME ("reponame"), which doesn't seem to exist at this point. >From reading pkg_jobs.c, I get the impression that PKG_REPONAME is only valid for the in-memory version of pkg constructed from the repo manifest during "pkg upgrade", is that correct? In that case, fixing %R should be a simple matter of fetching the "repository" annotation if PKG_REPONAME is not available. See pull request #855. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no