Subject: Nuke MANCOMPRESSED?
To: tech-pkg <tech-pkg@netbsd.org>
From: Michael South <msouth@msouth.org>
List: tech-pkg
Date: 07/15/2003 03:37:39
Proposal:
0) Clarify /usr/share/mk/bsd.README to say that compression will be done
if MANZ is _defined_. (NOPROFILE, NOPIC, and NOLINT should also be
clarified.) Or, to be consistent with how the other switches are
defined, change bsd.README and bsd.man.mk so that MANZ is true if it ==
"yes".
1) Deprecate MANCOMPRESSED and MANCOMPRESSED_IF_MANZ.
2) Change mk/bsd.pkg.mk: If MANZ is true (defined) compress any man
pages that are actually uncompressed. Otherwise uncompress any man pages
that are actually compressed. (Also fix handling of man page symlinks.)
File names in the PLIST are already modified based on whether MANZ is
_defined_.
3) Remove man page compression from www/opera6 and www/opera7 Makefiles.
--------------------
Rationale:
MANCOMPRESSED, and the undocumented MANCOMPRESSED_IF_MANZ, are
inconsistently used, and can probably be retired.
packages(7) says:
"This section docuemnts [sic] variables used to configure the
way manual pages are installed by this package.
MANCOMPRESSED Indicates that the package installs manpages in a
compressed form. The default package installs manpages un-
compressed."
It's not clear to me if it's saying that "the package always installs
compressed man pages," or "if MANCOMPRESSED is set, then the package
will compress the man page," or "if MANCOMPRESSED is set, then the
bsd.XXX.mk files will automatically compress the man pages." The
variable MANCOMPRESSED_IF_MANZ isn't documented in packages(7), but is
set in many package Makefiles.
The only file in mk/ which does anything with the two variables is
bsd.pkg.mk.
First, it sets MANCOMPRESSED to "yes" if both MANCOMPRESSED_IF_MANZ and
MANZ are _defined_.
Second, during installation, if MANCOMPRESSED is _nonempty_ (anything,
including "no"!), and MANZ is _empty_, then it assumes all installed man
pages are compressed and will decompresses them (and will choke if a
page isn't compressed). On the other hand, if MANCOMPRESSED is _empty_
and MANZ is _nonempty_, then it attempts to compress all the pages (and
chokes on any pages which are already compressed). (In both of these
cases the handling of symlinks is broken.) So here it appears that
MANCOMPRESSED means "the package always installs compressed pages".
Third, the section of bsd.pkg.mk which processes the PLIST says:
# generate ${PLIST} from ${PLIST_SRC} by:
# - fixing list of man-pages according to MANCOMPRESSED/MANZ
# (we don't take any notice of MANCOMPRESSED as many packages \
have .gz
# pages in PLIST even when they install manpages without \
compressing them)
I'm not sure what the comment means (the PLIST lies? MANCOMPRESSED
lies?) But the man page file names are flipped to/from ".gz" based
solely on MANZ being _defined_; MANCOMPRESSED is not referenced.
Finally, the www/opera6 and www/opera7 packages will compress their man
pages if MANCOMPRESSED is _defined_ in the included file
emulators/suse_linux/Makefile.common. No other package uses
MANCOMPRESSED or MANCOMPRESSED_IF_MANZ.
--
Michael South
msouth@msouth.org