Subject: pkg/34981: www/screws installs bogus (pre-patch) file - breaks PLIST
To: None <,,>
From: None <kre@munnari.OZ.AU>
List: pkgsrc-bugs
Date: 11/03/2006 10:55:00
>Number:         34981
>Category:       pkg
>Synopsis:       www/screws installs bogus (pre-patch) file - breaks PLIST
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 03 10:55:00 +0000 2006
>Originator:     Robert Elz
>Release:        NetBSD 3.99.15   (pkgsrc current within past couple of hours)
	Prince of Songkla University
System: NetBSD 3.99.15 NetBSD 3.99.15 (GENERIC-1.696-20060125) #8: Wed Jan 25 04:59:39 ICT 2006 i386
Architecture: i386
Machine: i386
	The recent (like in the past day) fix for PR 34969 fixed the
	immediate problem (by patching the broken file) but introduced
	a new problem - the directory containing the patched file
	is simply copied "cp -rp" to install it - that copies the .orig
	file created by patch as well as the files it intended to copy.
	Naturally, the PLIST is not expecting a .orig file to appear,
	and so the check for files installed against what the PLIST
	expects to install fails.

	Attempt to "make package" with the current version of www/screws

	Apply the following patch, which simply causes the .orig file
	to be removed, immediately after patch creates it...   Of course,
	a much better solution would be to tell patch to skip creating the
	.orig file in the first place (those files are never useful for
	pkgsrc patches, and only ever cause problems - or are irrelevant)
	Unfortunately, patch seems to have no option to do that, or I assume
	pkgsrc would always use it.

	ps: After applying the patch below, someone who understands the rules
	for pkgsrc Makefiles should check that the "post-patch" part gets
	put at the "correct" place.


--- Makefile.WAS	2006-08-15 16:15:39.000000000 +0700
+++ Makefile
@@ -36,6 +36,9 @@ SUBST_SED.paths=	-e 's|/var/log|${VARBAS
 # something very similar.
+	${RM} ${WRKSRC}/src/Exec/sh/
 .include ""
 .include "../../mk/"