[Trac-bugs] [PC-BSD Trac] #727: PBI build breaks for some ports with dynamic dependency choices

PC-BSD trac at pcbsd.org
Thu Jun 13 11:32:25 PDT 2013

#727: PBI build breaks for some ports with dynamic dependency choices
 Reporter:  jim-p              |      Owner:
     Type:  PBI Packaging Bug  |     Status:  new
 Priority:  minor              |  Milestone:
Component:  PBI Creator        |    Version:
 Keywords:  pbi, dependencies  |
 Certain ports that have multiple choice dependencies will not build
 properly when choosing a non-default build option.

 The easiest example of this I can find isn't strictly relevant to PC-BSD
 on the desktop, but is for us over at pfSense when we build PBIs.

 I've been trying to get a PBI build of squidGuard (www/squidguard) built
 against Squid 3.3, but the way the PBI build checks/tracks dependencies is
 holding it back.

 The squidGuard port has a single-choice OPTIONSNG knob that controls
 whether it gets built against Squid 2.7 (www/squid), 3.2 (www/squid32), or
 3.3 (www/squid33), any of which conflict with the others. However, the PBI
 build doesn't check that, it checks the entry in INDEX for the
 dependencies, and that lists only squid 2.7 (squid-2.7.9_4). Since squid
 2.7 and squid 3.3 conflict, the PBI build ultimately fails or comes out
 with the incorrect dependency.

 I couldn't see any way to bypass the check in the pbi-manager code (In
 do_port_build around line 7300). I wondered if it might be better to use a
 more dynamic check of the dependencies using one of the various ports make
 targets to find them, such as: all-depends-list, build-depends-list,
 package-depends-list, actual-package-depends, or run-depends-list

 For example:
 $ grep squidGuard /usr/ports/INDEX-9 | cut -d '|' -f 8-9 | sed 's/|/ /g'
 db4-4.0.14_1,1 db4-4.0.14_1,1 perl-5.14.4 squid-2.7.9_4

 $ cd /usr/ports/www/squidguard
 $ make package-depends-list
 db41-4.1.25_4 /usr/ports/databases/db41 databases/db41
 squid-2.7.9_4 /usr/ports/www/squid www/squid
 perl-5.14.2_3 /usr/ports/lang/perl5.14 lang/perl5.14

 $ make squidGuard_SET="LDAP SQUID33" squidGuard_UNSET="SQUID27"
 openldap-client-2.4.35 /usr/ports/net/openldap24-client
 db41-4.1.25_4 /usr/ports/databases/db41 databases/db41
 squid-3.3.4_1 /usr/ports/www/squid33 www/squid33
 perl-5.14.2_3 /usr/ports/lang/perl5.14 lang/perl5.14

 The attached patch below seems to fix it for me, but I'm not sure if there
 might be other problems introduced.

Ticket URL: <http://trac.pcbsd.org/ticket/727>
PC-BSD <http://trac.pcbsd.org>
PC-BSD Project Management

More information about the Trac-bugs mailing list