From owner-freebsd-ports@FreeBSD.ORG Thu Feb 13 20:30:45 2014 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FCD7CA4 for ; Thu, 13 Feb 2014 20:30:45 +0000 (UTC) Received: from mail1.riverwillow.net.au (mail1.riverwillow.net.au [IPv6:2001:8000:1000:1801::36]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7FB251022 for ; Thu, 13 Feb 2014 20:30:44 +0000 (UTC) Received: from rwpc15.gfn.riverwillow.net.au (rwpc15.gfn.riverwillow.net.au [IPv6:2001:8000:1000:18e1:20c:76ff:fe0a:2117]) (authenticated bits=56) by mail1.riverwillow.net.au (8.14.8/8.14.8) with ESMTP id s1DKUcvW085175 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 14 Feb 2014 07:30:40 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=riverwillow.com.au; s=m1001; t=1392323440; bh=k7WjpslqobfhnPzUhsWkgJwLCiZHkLhpAo5GhDNOC8M=; h=Date:From:To:Subject; b=IP3Gx/MjW/57JMR5iANvhItJTmzE+Oe9n7RmJjNKt5YRy7Ad38RzAIGlQzBG9cNUO 5kvZiekpdt/Chw5HGqhWkSE0t5IpfLvMJU/W22lDdJE1mis8sJqQVxahDupYfRgj+M g8Kld975FsMz1/nJcRnlqzl4Uypa4uVrAuYaAhb8= Date: Fri, 14 Feb 2014 07:30:38 +1100 From: John Marshall To: freebsd-ports@freebsd.org Subject: 'pkg version -I index' ignores index argument Message-ID: <20140213203038.GA30069@rwpc15.gfn.riverwillow.net.au> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="qMm9M+Fa2AknHoGS" Content-Disposition: inline OpenPGP: id=A29A84A2; url=http://pki.riverwillow.com.au/pgp/johnmarshall.asc User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 20:30:45 -0000 --qMm9M+Fa2AknHoGS Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Prompted by the recent EOL announcement and the very loud pkg_install warning, I recently migrated about a dozen systems to pkgng. So far the only thing I've tripped over is the pkg-version(8) tool ignoring its index argument. The tool appears to do a good job of maintaining backwards compatibility with its venerable predecessor: usage: pkg_version [-hIoqv] [-l limchar] [-L limchar] [[-X] -s string] [-O origin] [index] pkg_version -t v1 v2 pkg_version -T name pattern Usage: pkg version [-IPR] [-hoqvU] [-l limchar] [-L limchar] [-egix pattern] [-r reponame] [-O origin] [index] pkg version -t pkg version -T but the new tool completely ignores its optional [index] argument and, if I request use of an INDEX via -I, it will only work if there is an INDEX file in the ports tree directory. A missing ports tree directory is also a fatal error. I have submitted a PR (ports/186671) in which I provide a patch to pkg/version.c to rectify this problem. The patch: - removes the requirement for /usr/ports when using an index (-I) - reads and uses the optional index file argument which, if present, will supersede the default file in /usr/ports. I am not a programmer, so please excuse and correct anything which is done improperly. "It works for me." --=20 John Marshall --qMm9M+Fa2AknHoGS Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iEYEARECAAYFAlL9K24ACgkQw/tAaKKahKJysgCeMuy2cAtxSXUe/uLzZTXVQgAd fEQAnAo3Z/jNDu24+DIyJFbPy/oHVF9K =ChJd -----END PGP SIGNATURE----- --qMm9M+Fa2AknHoGS--