[Bug 209183] Uses/bdb.mk conversion appears broken

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jul 24 08:54:53 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=209183

--- Comment #9 from Peter Wemm <peter at FreeBSD.org> ---
Looking a little closer..

If I look over the tree, I see a million
USE_BDB=40+
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: 
USE_BDB=yes  or USES+= bdb.  This seems to work and should cover most of 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+=${bdb}
 . endif
 .endfor
+_INST_BDB_VER:=${_INST_BDB_VER:N${BDB_DEFAULT}}
+_INST_BDB_VER+=${BDB_DEFAULT}

 # 2. parse supported versions:
 # 2a. build list from _bdb_ARGS

Then it looks like this:
databases/py-bsddb # make DEFAULT_VERSIONS=bdb=48 debug-bdb | & grep '^BDB_VER'
BDB_VER=48
databases/py-bsddb # make DEFAULT_VERSIONS=bdb=5 debug-bdb | & grep '^BDB_VER'
BDB_VER=5
databases/py-bsddb # make DEFAULT_VERSIONS=bdb=48 USE_BDB=5 debug-bdb | & grep
'^BDB_VER'
BDB_VER=5
databases/py-bsddb # make DEFAULT_VERSIONS=bdb=48 USE_BDB=yes debug-bdb | &
grep '^BDB_VER'
BDB_VER=48

databases/py-bsddb # make DEFAULT_VERSIONS=bdb=5 USE_BDB=yes debug-bdb | & grep
'^BDB_VER'BDB_VER=5
databases/py-bsddb # make USE_BDB=yes debug-bdb | & grep '^BDB_VER'
BDB_VER=5

databases/py-bsddb # make DEFAULT_VERSIONS=bdb=48 USE_BDB=5+ debug-bdb | & grep
'^BDB_VER'
BDB_VER=5
databases/py-bsddb # make DEFAULT_VERSIONS=bdb=48 USE_BDB=6
WITH_BDB6_PERMITTED=yes debug-bdb | & grep '^BDB_VER'
BDB_VER=6

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 installed
at the end of the run.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-ports-bugs mailing list