Bug 256407

Summary: 'make check-plist' doesn't complain when optional file is installed despite the option being 'off'
Product: Ports & Packages Reporter: Yuri Victorovich <yuri>
Component: Ports FrameworkAssignee: Port Management Team <portmgr>
Status: Closed Works As Intended    
Severity: Affects Only Me CC: ports-bugs
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
testcase.shar none

Description Yuri Victorovich freebsd_committer freebsd_triage 2021-06-04 08:31:26 UTC
Created attachment 225538 [details]
testcase.shar

The attached testcase installs the file bin/xz unconditionally, while pkg-plist has it conditional on the option Z (%%Z%%bin/xz).

With Z=OFF 'make check-plist' doesn't complain as it should that bin/xz is missing from pkg-plist:
> ====> Checking for pkg-plist issues (check-plist)
> ===> Parsing plist
> ===> Checking for items in STAGEDIR missing from pkg-plist
> ===> Checking for items in pkg-plist which are not in STAGEDIR
> ===> No pkg-plist issues found (check-plist)


Porter's Handbook says:
> In pkg-plist, put %%X11%% in front of the lines only being installed when the option is enabled, like this:
> > %%X11%%bin/foo-gui
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2021-06-04 08:41:33 UTC
Well, yes, this is what options do, if an option is off, the files are not packaged.