Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jun 2011 20:12:45 GMT
From:      Max Brazhnikov <makc@FreeBSD.org>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/157910: emulators/mtools: don't overwrite mtools.conf
Message-ID:  <201106152012.p5FKCjUu016960@red.freebsd.org>
Resent-Message-ID: <201106152020.p5FKKCjN038164@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         157910
>Category:       ports
>Synopsis:       emulators/mtools: don't overwrite mtools.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 15 20:20:12 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Max Brazhnikov
>Release:        FreeBSD 9.0-CURRENT amd64
>Organization:
>Environment:
FreeBSD luna.dio.ru 9.0-CURRENT FreeBSD 9.0-CURRENT #2 r222977: Sat Jun 11 14:22:54 MSD 2011     root@luna.dio.ru:/usr/obj/head/usr/freebsd/svn/head/sys/LUNA  amd64
>Description:
emulators/mtools overwrites mtools.conf when installing from ports.
>How-To-Repeat:

>Fix:
follow http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/plist-config.html

Patch attached with submission follows:

Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/emulators/mtools/Makefile,v
retrieving revision 1.70
diff -u -r1.70 Makefile
--- Makefile	7 Jun 2011 14:53:03 -0000	1.70
+++ Makefile	15 Jun 2011 19:55:05 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	mtools
 PORTVERSION=	4.0.10
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	emulators
 MASTER_SITES=	${MASTER_SITE_GNU}
 MASTER_SITE_SUBDIR=	mtools
@@ -63,9 +63,9 @@
 
 post-install:
 	${INSTALL_DATA} ${WRKSRC}/mtools.conf ${PREFIX}/etc/mtools.conf.sample
-.if !exists(${PREFIX}/etc/mtools.conf)
-	@cd ${PREFIX}/etc && ${CP} -f mtools.conf.sample mtools.conf
-.endif
+	@if [ ! -f ${PREFIX}/etc/mtools.conf ]; then \
+		cd ${PREFIX}/etc && ${CP} -p mtools.conf.sample mtools.conf; \
+	fi
 	@${CAT} ${PKGMESSAGE}
 
 .include <bsd.port.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201106152012.p5FKCjUu016960>