Subject: Re: CVS commit: pkgsrc/pkgtools/pkglint
To: None <>
From: Roland Illig <>
List: tech-pkg
Date: 02/24/2006 22:55:48
Jeremy C. Reed wrote:
> Module Name:	pkgsrc
> Committed By:	reed
> Date:		Fri Feb 24 20:36:29 UTC 2006
> Modified Files:
> 	pkgsrc/pkgtools/pkglint: Makefile
> Log Message:
> PKGMANDIR instead of "man".
> (When do I use PKGMANDIR:Q or no :Q??)

When pkglint says so. And if it doesn't complain, try pkglint -Wall :)

And these are the cases in which pkglint expects the :Q operator:

When you append a string to a list, which is explained very briefly in

When you use a _string_ in a shell command, which is explained in

When you use a _list_ in a shell command, it depends. If the list is 
used as a single word, you need to use the :Q operator, otherwise you 
don't. Example:

     ${CC} ${CPPFLAGS} ${CFLAGS}

In the first line, the variables are interpreted in list context, 
meaning that they may result in more than one word, or even no words at 
all. In the second line the same variables are used in scalar context, 
which will lead to a single shell word.

There is one exception though: The empty string evaluates to the empty 
string when passed through the :Q operator. That is, the code

     EMPTY=          # empty

         set -- foo bar ${EMPTY:Q} ; echo $$#

will print "2", although you might expect it to print "3".