Subject: Re: pkgsrc php4 install fails mysteriously
To: None <netbsd-help@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 12/30/2002 18:07:03
On Thu, 19 Dec 2002 14:39:13 -0800, "Johnny C. Lam" <jlam@netbsd.org>
wrote:
> On Wed, Dec 18, 2002 at 08:32:31AM -0500, James K. Lowden wrote:
> [snip]
> > 
> > Because $STAGE is empty (because $2 is empty), the switch falls to the
> > bottom, producing the unobvious "Unexpected argument" error.  
> 
> I think you have a pkgsrc/www/php4/INSTALL file that shouldn't be there.
> I remember removing that file about a year ago.

Thanks Johnny!  

That was indeed the problem.  I removed INSTALL and DEINSTALL from
www/php4; did "make clean && make install" and all is now well.

This is not the first time I've been burned by old files in my pkgsrc. 
Retracing my steps now nearly a month old, I remember I updated pkgsrc
with "sup -s".  I thought it would delete extraneous files because:

$ grep ^[a-z] /etc/supfiles/coll.list 
current release=pkgsrc host=sup.netbsd.org hostbase=/ftp/pub \
base=/usr prefix=/usr backup use-rel-suffix compress delete
                                                     ^^^^^^
and the man page says of the delete option "Files that are no longer in
the collection  on  the repository  will be deleted if present on the
local machine and were put there by a previous sup".  

I see now that my SOP is faulty.  That is, I always initialize my pkgsrc
collection by ftp'ing the tarball, and rely on sup to keep it up to date. 
The man page quite clearly states, however, that sup won't delete files it
didn't create (eg files put there by, say, tar).  Sooner or later, I'm
bound to run into trouble.  

"Too soon old and too late smart."

I guess to correct the situation I can nuke my pkgsrc tree and let
cron+sup do their overnight magic.  Is there a better way?  

--jkl




/etc/