Bug 114167 - [patch] bsd.port.mk - ignoring major numbers in LIB_DEPENDS
Summary: [patch] bsd.port.mk - ignoring major numbers in LIB_DEPENDS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Port Management Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-30 19:30 UTC by Mikhail T.
Modified: 2014-03-27 19:22 UTC (History)
0 users

See Also:


Attachments
file.diff (2.38 KB, patch)
2007-06-30 19:30 UTC, Mikhail T.
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail T. 2007-06-30 19:30:02 UTC
	Although specifying the major number of the shared library in
	a port's LIB_DEPENDS is neither mandatory nor needed in most
	circumstances, the practice is wide-spread. It is very rare,
	that a particular version is required.

	When a dependency-installed shlib changes, all dependants
	simply update their LIB_DEPENDS lines in a flurry of "chasing
	libfoo's major number" commits.

	A more important problem is one faced by people with already
	built/configured computers. Consider, for example, somebody,
	who has just built the entire KDE desktop.

	Three days later they may decide to add the Firefox browser,
	so they update their ports tree as advised (to get the latest
	version and security patches) and proceed.

	If, however, any of the ports used by both Firefox and KDE
	(such as the entire glib, JPEG, PNG, etc.) were updated during
	these few days, building firefox will fail, because firefox will
	require the new version of JPEG's (or PNG's, etc.) shared
	library, which will conflict with the one already installed.

	The person will then be faced with two rather poor options.
	Either rebuild the entire KDE, or use portupgrade to push
	the older version of libjpeg in the /usr/local/lib/compat/pkg.

	If neither the Firefox nor the already present KDE require
	whatever feature, that caused the JPEG (or PNG, etc.) library
	bump, the BEST solution is to make the new port (Firefox in
	this example) use the already present version of libjpeg,
	whatever it might be.

	The patch below makes it possible to tell bsd.port.mk to
	IGNORE the explicit major library numbers in all LIB_DEPENDS
	lines by defining a special IGNORE_SHLIB_NUMBERS knob to
	anything other than "no".

	The patch also changes bsd.port.mk to be stricter in its
	parsing the available inventory of shared library and to report
	the exact locations of the matching libraries.

	Adding the patch will not affect clean installs and it has
	no effect, unles the IGNORE_SHLIB_NUMBERS knob is set.

	Once the change is committed, make.conf(4) manual page can
	be updated to document the knob explaining its usual benefits
	and the occasional danger in those few cases, where the
	major number is, actually, important.
Comment 1 Mikhail Teterin freebsd_committer freebsd_triage 2007-06-30 20:04:03 UTC
Responsible Changed
From-To: freebsd-ports-bugs->portmgr

Patch for bsd.port.mk
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2012-11-02 14:30:45 UTC
State Changed
From-To: open->closed

major effort has gone into fixing these issues at a per-port level - no 
need for this patch anymore.
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2012-11-06 00:29:25 UTC
State Changed
From-To: closed->open

for portmgr to decide
Comment 4 Mathieu Arnold freebsd_committer freebsd_triage 2014-03-27 19:22:20 UTC
State Changed
From-To: open->closed

I feel the new LIB_DEPENDS format makes this obsolete.