Bug 202338 - comms/chirp: Add missing run dependencies
Summary: comms/chirp: Add missing run dependencies
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: hamradio (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-15 01:11 UTC by Kevin Zheng
Modified: 2015-08-17 14:36 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (hamradio)


Attachments
Patch with fix (959 bytes, patch)
2015-08-15 01:11 UTC, Kevin Zheng
no flags Details | Diff
Poudriere build log (64.99 KB, text/x-log)
2015-08-15 01:12 UTC, Kevin Zheng
no flags Details
Updated patch with fix (1.01 KB, patch)
2015-08-15 01:55 UTC, Kevin Zheng
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Zheng 2015-08-15 01:11:44 UTC
Created attachment 159886 [details]
Patch with fix

comms/chirp requires py-serial and py-libxml2 at runtime; otherwise, the program exits with a stack trace after failing to import these libraries.

The attached patch adds py-serial and py-libxml2 as runtime dependencies. Note that the existing build dependencies are still required, as they are used at build time, as well.

Bump PORTREVISION because the resulting packages has changed.

Update COMMENT and sort USES to make 'portlint' happy.
Comment 1 Kevin Zheng 2015-08-15 01:12:49 UTC
Created attachment 159887 [details]
Poudriere build log
Comment 2 Kevin Zheng 2015-08-15 01:55:38 UTC
Created attachment 159890 [details]
Updated patch with fix

Original patch did not correctly add the py-serial dependency because the RUN_DEPENDS file/folder test behaves differently than the BUILD_DEPENDS test. Switch to using package names to check for dependencies. Meanwhile, put the dependencies in CHIRP_DEPENDS and copy them over to BUILD_DEPENDS and RUN_DEPENDS.
Comment 3 commit-hook freebsd_committer freebsd_triage 2015-08-15 14:21:29 UTC
A commit references this bug:

Author: feld
Date: Sat Aug 15 14:21:17 UTC 2015
New revision: 394319
URL: https://svnweb.freebsd.org/changeset/ports/394319

Log:
  Add missing RUN_DEPENDS
  Sort USES

  PR:		202338

Changes:
  head/comms/chirp/Makefile
Comment 4 Mark Felder freebsd_committer freebsd_triage 2015-08-15 14:21:43 UTC
committed with minor changes, thanks!
Comment 5 commit-hook freebsd_committer freebsd_triage 2015-08-16 12:46:40 UTC
A commit references this bug:

Author: feld
Date: Sun Aug 16 12:45:44 UTC 2015
New revision: 394407
URL: https://svnweb.freebsd.org/changeset/ports/394407

Log:
  MFH: r394319

  Add missing RUN_DEPENDS
  Sort USES

  PR:		202338
  Approved by:	ports-secteam (with hat)

Changes:
_U  branches/2015Q3/
  branches/2015Q3/comms/chirp/Makefile
Comment 6 Kevin Zheng 2015-08-16 14:03:18 UTC
The commit with minor changes appears to add an unnecessary run-time dependency on devel/gettext-tools due to lazy evaluation in the Makefile and USES.

One solution is to use the patch as-written, using CHIRP_DEPENDS.

I'm not sure if this:

RUN_DEPENDS:=	${BUILD_DEPENDS}

Instead of:

RUN_DEPENDS=	${BUILD_DEPENDS}

Also works?
Comment 7 Mark Felder freebsd_committer freebsd_triage 2015-08-16 14:30:18 UTC
Hmm interesting. Thanks for pointing that out. I'm reopening and will evaluate this soon.
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-08-17 14:14:01 UTC
A commit references this bug:

Author: feld
Date: Mon Aug 17 14:13:05 UTC 2015
New revision: 394507
URL: https://svnweb.freebsd.org/changeset/ports/394507

Log:
  Last update was causing pollution of BUILD_DEPENDS into RUN_DEPENDS

  PR:		202338

Changes:
  head/comms/chirp/Makefile
Comment 9 commit-hook freebsd_committer freebsd_triage 2015-08-17 14:24:04 UTC
A commit references this bug:

Author: feld
Date: Mon Aug 17 14:23:34 UTC 2015
New revision: 394509
URL: https://svnweb.freebsd.org/changeset/ports/394509

Log:
  MFH: r394507

  Last update was causing pollution of BUILD_DEPENDS into RUN_DEPENDS

  PR:		202338
  Approved by:	ports-secteam (with hat)

Changes:
_U  branches/2015Q3/
  branches/2015Q3/comms/chirp/Makefile
Comment 10 Mark Felder freebsd_committer freebsd_triage 2015-08-17 14:26:47 UTC
Hi Kevin,

I spoke with portmgr about this issue and this commit is the approved approach. The Porter's Handbook has this note as well:

Important:

Do not use := to assign BUILD_DEPENDS to RUN_DEPENDS or vice-versa. All variables are expanded immediately, which is exactly the wrong thing to do and almost always a failure.


https://www.freebsd.org/doc/en/books/porters-handbook/makefile-depend.html
Comment 11 Kevin Zheng 2015-08-17 14:36:14 UTC
Mark,

Thanks for taking time to figure out how to fix it correctly. I'll keep this in mind next time I need to mess with dependencies.

I came up with the ':=' assignment by looking at other port Makefiles. There are lots of ports that aren't perfect; I'll remember to check the Porter's Handbook as the authoritative documentation.