From owner-freebsd-ports-bugs@freebsd.org Sun Jul 24 08:54:53 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 10D4FBA371A for ; Sun, 24 Jul 2016 08:54:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DAC8B1C45 for ; Sun, 24 Jul 2016 08:54:52 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u6O8sqW1087881 for ; Sun, 24 Jul 2016 08:54:52 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 209183] Uses/bdb.mk conversion appears broken Date: Sun, 24 Jul 2016 08:54:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Ports Framework X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: peter@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: portmgr@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jul 2016 08:54:53 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209183 --- Comment #9 from Peter Wemm --- Looking a little closer.. If I look over the tree, I see a million USE_BDB=3D40+ etc. The Uses/bdb.mk code converts all these to "48+" which it then interprets as "Use the latest version in _DB_PORTS, not the DEFAULT_VERSIONS one" One possible fix: sweep the ports tree and get rid of any USE_BDB that's older than 5. ie:=20 USE_BDB=3Dyes or USES+=3D bdb. This seems to work and should cover most o= f the tree. The real fix would be to rework the selection logic to actually respect the user's request like the rest of the ports tree does for DEFAULT_VERSIONS. A quick and dirty change to the logic is to leverage the "already installed" check. This appears to place nicely with the Version+ logic. Uses/bdb.mk: @@ -117,6 +116,8 @@ _INST_BDB_VER+=3D${bdb} . endif .endfor +_INST_BDB_VER:=3D${_INST_BDB_VER:N${BDB_DEFAULT}} +_INST_BDB_VER+=3D${BDB_DEFAULT} # 2. parse supported versions: # 2a. build list from _bdb_ARGS Then it looks like this: databases/py-bsddb # make DEFAULT_VERSIONS=3Dbdb=3D48 debug-bdb | & grep '^= BDB_VER' BDB_VER=3D48 databases/py-bsddb # make DEFAULT_VERSIONS=3Dbdb=3D5 debug-bdb | & grep '^B= DB_VER' BDB_VER=3D5 databases/py-bsddb # make DEFAULT_VERSIONS=3Dbdb=3D48 USE_BDB=3D5 debug-bdb= | & grep '^BDB_VER' BDB_VER=3D5 databases/py-bsddb # make DEFAULT_VERSIONS=3Dbdb=3D48 USE_BDB=3Dyes debug-b= db | & grep '^BDB_VER' BDB_VER=3D48 databases/py-bsddb # make DEFAULT_VERSIONS=3Dbdb=3D5 USE_BDB=3Dyes debug-bd= b | & grep '^BDB_VER'BDB_VER=3D5 databases/py-bsddb # make USE_BDB=3Dyes debug-bdb | & grep '^BDB_VER' BDB_VER=3D5 databases/py-bsddb # make DEFAULT_VERSIONS=3Dbdb=3D48 USE_BDB=3D5+ debug-bd= b | & grep '^BDB_VER' BDB_VER=3D5 databases/py-bsddb # make DEFAULT_VERSIONS=3Dbdb=3D48 USE_BDB=3D6 WITH_BDB6_PERMITTED=3Dyes debug-bdb | & grep '^BDB_VER' BDB_VER=3D6 This trivial change gives the least astonishing outcome that I can imagine. Pretending that the default version is already installed avoids duplicating= and messing with an awful lot of ugly make logic. After all, it will be instal= led at the end of the run. --=20 You are receiving this mail because: You are on the CC list for the bug.=