Bug 227882

Summary: ports-mgmt/portmaster: match_flavor() called by origin_from_pdb() before defined
Product: Ports & Packages Reporter: Ryan Frederick <ryanrfrederick>
Component: Individual Port(s)Assignee: Stefan Eßer <se>
Status: Closed FIXED    
Severity: Affects Many People CC: ryanrfrederick, w.schwarzenfeld
Priority: --- Flags: bugzilla: maintainer-feedback? (se)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Move match_flavor() to before its first use none

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?