#727 closed PBI Packaging Bug (fixed)

PBI build breaks for some ports with dynamic dependency choices

Reported by: jim-p Owned by: Kris
Priority: minor Milestone:
Component: PBI Creator Version:
Keywords: pbi, dependencies Cc: trac-bugs@…

Description

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"
package-depends-list
openldap-client-2.4.35 /usr/ports/net/openldap24-client
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.

Attachments (1)

pbi-manager_package_depends.diff (486 bytes) - added by jim-p 15 months ago.
Diff to use make package-depends-list

Download all attachments as: .zip

Change History (4)

Changed 15 months ago by jim-p

Diff to use make package-depends-list

comment:1 Changed 11 months ago by joshms

  • Owner set to Ken

comment:2 Changed 11 months ago by kenmoore

  • Owner changed from Ken to Kris

Bumping this over to Kris since it is a patch for the pbi-manager source.

comment:3 Changed 11 months ago by kris

  • Resolution set to fixed
  • Status changed from new to closed

This should be fixed in GIT. We ended up using something similar:

make -C $_lPort PORTSDIR=${PORTSDIR} all-depends-list|sed 's,${PORTSDIR}/g'

If you still run into problems with the new code, let us know and we can get it fixed up.

Note: See TracTickets for help on using tickets.