Subject: Re: pkg/18687: update textproc/lout to 3.26 and fix default papersize configuration
To: NetBSD GNATS submissions and followups <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 09/28/2003 17:34:55
[ On , September 15, 2003 at 10:54:56 (-0000), agc@netbsd.org wrote: ]
> Subject: Re: pkg/18687
>
> Synopsis: update textproc/lout to 3.26 and fix default papersize configuration
> 
> State-Changed-From-To: open->closed
> State-Changed-By: agc
> State-Changed-When: Mon Sep 15 10:53:19 UTC 2003
> State-Changed-Why: 
> agc updated the package to version 3.26 - thanks for the nudge.

Hmmm....  that "nudge" took so damn long to touch anyone that by the
time you did the update the original package was already up to 3.29.
Nearly a whole year has passed since I submitted this PR.

I.e. three whole new releases were missed in that intervening year!

I thought it was standard policy for official pkgsrc maintainers to
always check to make sure they were indeed updating to the latest
release, not just the one that was suggested in some possibly old PR.

I can supply an updated Makefile and patch/patch-aa file for the current
3.29 release if you wish, though the differences are quite trivial.


> In pkgsrc, we use getpapersize/setpapersize to query and set the default paper 
> size

That's simply not true.

mk/bsd.pkg.defaults.mk contains the following definition:

	PAPERSIZE?=     A4
	# Default paper size for packages.
	# Possible: A4, Letter.
	# Default: A4

suggesting that the PAPERSIZE macro is in fact the fundamental way that
the site-wide default papersize is pkgsrc is configured at install time.

In fact I find no fewer than 48 occurances of PAPERSIZE in the Makefiles
of 19 different pkgsrc modules in the current pkgsrc from CVS as of
yesterday (and that's just "Makefile" files, not all "Make*" files :-).


> so I've added lout to the packages which use that utility.

That's not the most wise thing to do, is it?  It means making changes
after install time to a core file from the lout package and thus causing
problems (albiet minor problems) down the road when the package is
deleted and/or upgraded, especially for a binary package.  I.e. the file
that must be modified by setpapersize is _not_ a configuration file.

I initially suggested in this PR that lout's initial install be patched
to match the site-wide PAPERSIZE definition in accordance with the way
print/psutils and the other 18 packages set their default runtime paper
size at install time.

They way I've suggested lout be patched at install time is the easiest
and most elegant way I could find to work with patch.

I suppose getpapersize could be used during the post-install target to
patch the necessary file, but I really don't see the point.  However if
a site maintainer installs print/papersize and then uses setpapersize to
change the local default but do not also change the definition of
PAPERSIZE in /etc/mk.conf to match they'll only confuse other packages
such as print/psutils.

At the very least I would strongly suggest that PAPERSIZE be honoured
during the initial install of lout from pkgsrc, even if the setpapersize
hack is also maintained.

-- 
						Greg A. Woods

+1 416 218-0098                  VE3TCP            RoboHack <woods@robohack.ca>
Planix, Inc. <woods@planix.com>          Secrets of the Weird <woods@weird.com>