Bug 227882 - ports-mgmt/portmaster: match_flavor() called by origin_from_pdb() before defined
Summary: ports-mgmt/portmaster: match_flavor() called by origin_from_pdb() before defined
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Stefan Eßer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-30 22:09 UTC by Ryan Frederick
Modified: 2018-11-14 19:51 UTC (History)
2 users (show)

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


Attachments
Move match_flavor() to before its first use (1.25 KB, patch)
2018-05-20 07:48 UTC, Stefan Eßer
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Frederick 2018-04-30 22:09:27 UTC
In the latest version of ports-mgmt/portmaster (3.19_8) match_flavor() is called by origin_from_pdb() before match_flavor() is defined. This causes some functionality to break, namely the detection of dependent ports to rebuild when using the -r option.
Comment 1 Stefan Eßer freebsd_committer freebsd_triage 2018-05-20 07:48:40 UTC
Created attachment 193549 [details]
Move match_flavor() to before its first use

This patch should be applied to the installed portmaster script in /usr/local/sbin, since portmaster recursively invokes itself and a patched copy might thus lead to the unpatched original version being executed in /usr/local/sbin ...
Comment 2 Stefan Eßer freebsd_committer freebsd_triage 2018-05-20 07:50:19 UTC
Please apply the patch to the actual portmaster script to make sure that the patched version is actually being tested (see comment added to the attachment).
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-05-20 10:56:24 UTC
A commit references this bug:

Author: se
Date: Sun May 20 10:56:14 UTC 2018
New revision: 470451
URL: https://svnweb.freebsd.org/changeset/ports/470451

Log:
  Fix recursive building of ports (-r option). The match_flavor function was
  called before being defined.

  The issue and cause has been reported by Herbert J. Skuhra. (Thanks!)

  PR:		227882
  Reported by:	Herbert J. Skuhra <herbert@gojira.at>
  Approved by:	antoine (implicit)

Changes:
  head/ports-mgmt/portmaster/Makefile
  head/ports-mgmt/portmaster/files/patch-portmaster
Comment 4 Walter Schwarzenfeld 2018-10-20 00:02:33 UTC
Forgotten to close?