From dinoex@FreeBSD.org  Mon Mar 29 09:29:31 2004
Return-Path: <dinoex@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8A38116A4D0
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Mar 2004 09:29:28 -0800 (PST)
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 7C58F43D1D
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Mar 2004 09:29:28 -0800 (PST)
	(envelope-from dinoex@FreeBSD.org)
Received: from freefall.freebsd.org (dinoex@localhost [127.0.0.1])
	by freefall.freebsd.org (8.12.10/8.12.10) with ESMTP id i2THTSbv062634
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 29 Mar 2004 09:29:28 -0800 (PST)
	(envelope-from dinoex@freefall.freebsd.org)
Received: (from dinoex@localhost)
	by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i2THTSbg062633;
	Mon, 29 Mar 2004 19:29:28 +0200 (CEST)
	(envelope-from dinoex)
Message-Id: <200403291729.i2THTSbg062633@freefall.freebsd.org>
Date: Mon, 29 Mar 2004 19:29:28 +0200 (CEST)
From: Dirk Meyer <dinoex@FreeBSD.org>
Reply-To: Dirk Meyer <dinoex@FreeBSD.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: help2man leave extra dirs after deinstall
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         64901
>Category:       ports
>Synopsis:       help2man leave extra dirs after deinstall
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    arved
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Mar 29 09:30:21 PST 2004
>Closed-Date:    Tue Mar 30 01:38:24 PST 2004
>Last-Modified:  Tue Mar 30 11:40:02 PST 2004
>Originator:     Dirk Meyer
>Release:        FreeBSD 4.9-STABLE i386
>Organization:
FreeBSD
>Environment:
System: FreeBSD freefall.freebsd.org 4.9-STABLE FreeBSD 4.9-STABLE #11: Thu Feb 5 19:43:44 PST 2004 kensmith@freefall.freebsd.org:/c/src/sys/compile/FREEFALL i386

	all

>Description:

	package leave extra dirs after deinstall.
	maintainer contacted: 2004-03-20, no response.

>How-To-Repeat:

	install port or package,
	then deinstall.

>Fix:


Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/misc/help2man/Makefile,v
retrieving revision 1.9
diff -u -u -r1.9 Makefile
--- Makefile	3 Mar 2004 10:03:15 -0000	1.9
+++ Makefile	20 Mar 2004 07:53:26 -0000
@@ -37,5 +37,6 @@
 PLIST_FILES=	bin/help2man %%NLS%%lib/hacklocaledir.so \
 		%%NLS%%share/locale/fr/LC_MESSAGES/help2man.mo \
 		%%NLS%%share/locale/pl/LC_MESSAGES/help2man.mo
+PLIST_DIRS=	man/fr/man1 man/pl/man1
 
 .include <bsd.port.mk>
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->arved 
Responsible-Changed-By: dinoex 
Responsible-Changed-When: Mon Mar 29 19:34:26 CEST 2004 
Responsible-Changed-Why:  
over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64901 
State-Changed-From-To: open->closed 
State-Changed-By: arved 
State-Changed-When: Tue Mar 30 01:30:05 PST 2004 
State-Changed-Why:  
Sorry for forgetting your PR. 

There were problems with your patch, as the PLIST_DIRS Macro 
does not support conditionals, and the directories were only created 
in the WITH NLS case. Also I could not dirrm the directories since other 
ports like nmap, samba and cups install localized manpages too. 
I hope you are satisfied with the solution, I just  
committed. BTW, imho this directories should be created by mtree (like the 
de-manpages). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=64901 

From: dirk.meyer@dinoex.sub.org (Dirk Meyer)
To: FreeBSD-gnats-submit@FreeBSD.org, arved@FreeBSD.org
Cc:  
Subject: Re: ports/64901: help2man leave extra dirs after deinstall
Date: Tue, 30 Mar 2004 21:32:39 +0200

 > There were problems with your patch, as the PLIST_DIRS Macro
 > does not support conditionals, and the directories were only created
 > in the WITH NLS case.
 
 easy to solve, you can move the PLIST_FILES/PLIST_DIRS definition
 in the conditional part of the makefile.
 
 > Also I could not dirrm the directories since other
 > ports like nmap, samba and cups install localized manpages too.
 
 It just fails to delete teh dir then,
 so when you delete the last port of nmap, samba and cups
 the directory shall vanish
 
 > I hope you are satisfied with the solution, I just 
 > committed. BTW, imho this directories should be created by mtree (like the
 > de-manpages).
 
 Looks fine ... Thanks.
 The patch down here ist just an example,
 how it can be done without PLIST_SUB.
 
 kind regards Dirk
 
 - Dirk Meyer, Im Grund 4, 34317 Habichtswald, Germany
 - [dirk.meyer@dinoex.sub.org],[dirk.meyer@guug.de],[dinoex@FreeBSD.org]
 
 Index: Makefile
 ===================================================================
 RCS file: /home/pcvs/ports/misc/help2man/Makefile,v
 retrieving revision 1.10
 diff -u -u -r1.10 Makefile
 --- Makefile	30 Mar 2004 09:29:47 -0000	1.10
 +++ Makefile	30 Mar 2004 19:26:18 -0000
 @@ -21,10 +21,12 @@
  RUN_DEPENDS=	${BUILD_DEPENDS}
  
  MANLANG=	"" pl fr
 -PLIST_SUB=		NLS=""
 +PLIST_FILES+=	lib/hacklocaledir.so \
 +		share/locale/fr/LC_MESSAGES/help2man.mo \
 +		share/locale/pl/LC_MESSAGES/help2man.mo \
 +PLIST_DIRS+=	man/fr/man1 man/pl/man1
  .else
  CONFIGURE_ARGS+=	--disable-nls
 -PLIST_SUB=		NLS="@comment "
  .endif
  
  WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 @@ -34,5 +36,7 @@
  MAN1=		help2man.1
  
  INFO=		help2man
 +
 +PLIST_FILES+=	bin/help2man
  
  .include <bsd.port.mk>
 Index: pkg-plist
 ===================================================================
 RCS file: /home/pcvs/ports/misc/help2man/pkg-plist,v
 retrieving revision 1.4
 diff -u -u -r1.4 pkg-plist
 --- pkg-plist	30 Mar 2004 09:29:47 -0000	1.4
 +++ pkg-plist	30 Mar 2004 19:26:18 -0000
 @@ -1,6 +0,0 @@
 -bin/help2man
 -%%NLS%%lib/hacklocaledir.so
 -%%NLS%%share/locale/fr/LC_MESSAGES/help2man.mo
 -%%NLS%%share/locale/pl/LC_MESSAGES/help2man.mo
 -%%NLS%%@unexec rmdir %D/man/fr/man1 2>/dev/null || true
 -%%NLS%%@unexec rmdir %D/man/pl/man1 2>/dev/null || true
 
>Unformatted:
