Bug 211995 - Mk/bsd.port.mk: Fix generic variables in PLIST_SUB_SED regression
Summary: Mk/bsd.port.mk: Fix generic variables in PLIST_SUB_SED regression
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Port Management Team
URL: https://reviews.freebsd.org/D7580
Keywords: needs-patch, needs-qa, regression
Depends on:
Blocks:
 
Reported: 2016-08-19 11:32 UTC by Kubilay Kocak
Modified: 2016-08-19 13:10 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kubilay Kocak freebsd_committer freebsd_triage 2016-08-19 11:32:26 UTC
A number of variables were previously removed from PLIST_SUB for being too generic are now present in PLIST_SUB after r420328, with affects such as:

Error: Orphaned: %%LIB32DIR%%/python%%XYDOT%%/idle%%LIB32DIR%%/tabbedpages.py

Looking into Mk/bsd.port.mk, there appears to be at least one reference to an undefined variable on line 1609:

PLIST_SUB_SED_tmp2= ${PLIST_SUB_tmp1: ...

I presume this should be PLIST_SUB_SED_tmp1

After correcting this, LIB32DIR is still present in PLIST_SUB

Contents of relevant variables:

irc/znc] make -V PLIST_SUB_SED_tmp1
CHARSET="@comment " CYRUS="@comment " DEBUG="@comment " DOCS="@comment " NO_IPV6="@comment " NO_OPENSSL="@comment " NO_PERL="@comment " PYTHON="@comment " TCL="@comment " OSREL=12.0 LOCALBASE=/usr/local RESETPREFIX=/usr/local PORTDOCS="@comment " PORTEXAMPLES="@comment " LIB32DIR=lib PERL_VERSION=5.22.3 PERL_VER=5.22 PERL5_MAN1=lib/perl5/site_perl/man/man1 PERL5_MAN3=lib/perl5/site_perl/man/man3 SITE_PERL=lib/perl5/site_perl SITE_ARCH=lib/perl5/site_perl/mach/5.22 DOCSDIR="share/doc/znc" EXAMPLESDIR="share/examples/znc" DATADIR="share/znc" WWWDIR="www/znc" ETCDIR="etc/znc"


No generic variables here:

irc/znc] make -V PLIST_SUB_SED_tmp2
PERL_VERSION=5.22.3 PERL_VER=5.22 PERL5_MAN1=lib/perl5/site_perl/man/man1 PERL5_MAN3=lib/perl5/site_perl/man/man3 SITE_PERL=lib/perl5/site_perl SITE_ARCH=lib/perl5/site_perl/mach/5.22 DOCSDIR="share/doc/znc" EXAMPLESDIR="share/examples/znc" DATADIR="share/znc" WWWDIR="www/znc" ETCDIR="etc/znc"


Generic variables here: (_tmp3 uses _tmp1, not _tmp2, not sure if intended)

 make -V PLIST_SUB_SED_tmp3
CHARSET="@comment " CYRUS="@comment " DEBUG="@comment " DOCS="@comment " NO_IPV6="@comment " NO_OPENSSL="@comment " NO_PERL="@comment " PYTHON="@comment " TCL="@comment " OSREL=12.0 LOCALBASE=/usr/local RESETPREFIX=/usr/local PORTDOCS="@comment " PORTEXAMPLES="@comment " LIB32DIR=lib PERL_VERSION=5.22.3 PERL_VER=5.22 PERL5_MAN1=lib/perl5/site_perl/man/man1 PERL5_MAN3=lib/perl5/site_perl/man/man3 SITE_PERL=lib/perl5/site_perl SITE_ARCH=lib/perl5/site_perl/mach/5.22 DOCSDIR="share/doc/znc" EXAMPLESDIR="share/examples/znc" DATADIR="share/znc" WWWDIR="www/znc" ETCDIR="etc/znc"


Generic variables here in final PLIST_SUB:

irc/znc] make -V PLIST_SUB
 CHARSET="@comment " NO_CHARSET="" CYRUS="@comment " NO_CYRUS="" DEBUG="@comment " NO_DEBUG="" DOCS="@comment " NO_DOCS="" IPV6="" NO_IPV6="@comment " OPENSSL="" NO_OPENSSL="@comment " PERL="" NO_PERL="@comment " PYTHON="@comment " NO_PYTHON="" TCL="@comment " NO_TCL="" OSREL=12.0 PREFIX=%D LOCALBASE=/usr/local  RESETPREFIX=/usr/local PORTDOCS="@comment " PORTEXAMPLES="@comment " LIB32DIR=lib PERL_VERSION=5.22.3  PERL_VER=5.22  PERL5_MAN1=lib/perl5/site_perl/man/man1  PERL5_MAN3=lib/perl5/site_perl/man/man3  SITE_PERL=lib/perl5/site_perl  SITE_ARCH=lib/perl5/site_perl/mach/5.22 DOCSDIR="share/doc/znc"  EXAMPLESDIR="share/examples/znc"  DATADIR="share/znc"  WWWDIR="www/znc"  ETCDIR="etc/znc"
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2016-08-19 12:14:24 UTC
I just realised the wrong variable (PLIST_SUB) was used to check the presence of generic variables rather than PLIST_SUB_SED, which was throwing off my tests.

Patch (phabricator review) attached fixing two variable references.

For lang/python36, the generic variables are no longer present. Custom variables added by the port remain present

lang/python36] make -V PLIST_SUB_SED
s!3\.6!%%XYDOT%%!g; s!3\.6\.0a4!%%XYZDOT%%!g; s!share/doc/python!%%DOCSDIR%%!g; s!share/examples/python!%%EXAMPLESDIR%%!g; s!share/python!%%DATADIR%%!g; s!www/python!%%WWWDIR%%!g; s!etc/python!%%ETCDIR%%!g;
Comment 2 Mathieu Arnold freebsd_committer freebsd_triage 2016-08-19 13:09:58 UTC
Ah, yes, once again, it's what the lack of review does.
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-08-19 13:10:25 UTC
A commit references this bug:

Author: mat
Date: Fri Aug 19 13:09:29 UTC 2016
New revision: 420461
URL: https://svnweb.freebsd.org/changeset/ports/420461

Log:
  Fixup the PLIST_SUB_SED creation.

  PR:		211995
  Reported by:	koobs
  Sponsored by:	Absolight

Changes:
  head/Mk/bsd.port.mk