Bug 256407 - 'make check-plist' doesn't complain when optional file is installed despite the option being 'off'
Summary: 'make check-plist' doesn't complain when optional file is installed despite t...
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Port Management Team
Depends on:
Reported: 2021-06-04 08:31 UTC by Yuri Victorovich
Modified: 2021-06-04 08:41 UTC (History)
1 user (show)

See Also:

testcase.shar (1.27 KB, text/plain)
2021-06-04 08:31 UTC, Yuri Victorovich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer 2021-06-04 08:31:26 UTC
Created attachment 225538 [details]

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 2021-06-04 08:41:33 UTC
Well, yes, this is what options do, if an option is off, the files are not packaged.