Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jul 2004 12:10:29 GMT
From:      Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/69266: www/squid delete existing files when "make deinstall"
Message-ID:  <200407231210.i6NCATcL098119@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/69266; it has been noted by GNATS.

From: Tsurutani Naoki <turutani@scphys.kyoto-u.ac.jp>
To: tmseck-lists@netcologne.de (Thomas-Martin Seck)
Cc: bug-followup@freebsd.org
Subject: Re: ports/69266: www/squid delete existing files when "make deinstall"
Date: Fri, 23 Jul 2004 21:00:42 +0900

 tmseck-lists@netcologne.de (Thomas-Martin Seck) wrote:
 
 > >>Fix:
 > >        I don't know, but I think the way of generating PLIST should be improved.
 > 
 > I see the problem, but the only sure-fire way to avoid this would be to
 > stage a fake installation first, create the package list and then copy
 > this installation into the PREFIX dir, like firefox does. I am not
 > really fond of this and I would like to avoid it. Mind you that other
 > ports suffer from the same problem, e.g. vim. And while this will
 > preserve locally added files, it will still end in modified files being
 > overwritten on every update.
 
 I wonder why all files are not listed in Makefile.
 There are many compile options, indeed, but the content of icons directory does not
 differ, as I guess, and errors files are also same except the choice of language.
 The following patch will solve the problem (at least on my host).
 If you have another reason not to adopt the following way, please tell me.
 
 --- /usr/ports/www/squid/Makefile.orig	Fri Jul 23 05:07:31 2004
 +++ /usr/ports/www/squid/Makefile	Fri Jul 23 20:45:13 2004
 @@ -311,6 +311,29 @@
  	@${SETENV} squid_user=${SQUID_UID} squid_group=${SQUID_GID} \
  	    PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
  
 +# prepare for plist
 +ICON_FILES=	anthony-binhex.gif anthony-bomb.gif anthony-box.gif \
 +		anthony-box2.gif anthony-c.gif anthony-compressed.gif \
 +		anthony-dir.gif anthony-dirup.gif anthony-dvi.gif \
 +		anthony-f.gif anthony-image.gif anthony-image2.gif \
 +		anthony-layout.gif anthony-link.gif anthony-movie.gif \
 +		anthony-pdf.gif anthony-portal.gif anthony-ps.gif \
 +		anthony-quill.gif anthony-script.gif anthony-sound.gif \
 +		anthony-tar.gif anthony-tex.gif anthony-text.gif \
 +		anthony-unknown.gif anthony-xbm.gif anthony-xpm.gif
 +
 +ERROR_FILES=	ERR_ACCESS_DENIED ERR_CACHE_ACCESS_DENIED \
 +		ERR_CACHE_MGR_ACCESS_DENIED ERR_CANNOT_FORWARD \
 +		ERR_CONNECT_FAIL ERR_DNS_FAIL ERR_FORWARDING_DENIED \
 +		ERR_FTP_DISABLED ERR_FTP_FAILURE ERR_FTP_FORBIDDEN \
 +		ERR_FTP_NOT_FOUND ERR_FTP_PUT_CREATED \
 +		ERR_FTP_PUT_ERROR ERR_FTP_PUT_MODIFIED \
 +		ERR_FTP_UNAVAILABLE ERR_INVALID_REQ ERR_INVALID_URL \
 +		ERR_LIFETIME_EXP ERR_NO_RELAY ERR_ONLY_IF_CACHED_MISS \
 +		ERR_READ_ERROR ERR_READ_TIMEOUT ERR_SHUTTING_DOWN \
 +		ERR_SOCKET_FAILURE ERR_TOO_BIG ERR_UNSUP_REQ \
 +		ERR_URN_RESOLVE ERR_WRITE_ERROR ERR_ZERO_SIZE_OBJECT
 +
  post-install:
  .if defined(WITH_SQUID_PINGER)
  	${CHMOD} 4510 ${PREFIX}/libexec/squid/pinger; \
 @@ -327,12 +350,14 @@
  	@cd ${PREFIX} && ${FIND} libexec/squid -type f -o -type l | ${SORT} \
  	    >>${TMPPLIST}
  	@${ECHO_CMD} "@dirrm libexec/squid" >>${TMPPLIST}
 -	@cd ${PREFIX} && ${FIND} etc/squid/icons -type f -o -type l | ${SORT} \
 -	    >>${TMPPLIST}
 +.for i in ${ICON_FILES}
 +	@${ECHO_CMD} "etc/squid/icons/${i}" >>${TMPPLIST}
 +.endfor
  	@${ECHO_CMD} "@dirrm etc/squid/icons" >>${TMPPLIST}
  .for d in ${SQUID_LANGUAGES}
 -	@cd ${PREFIX} && ${FIND} etc/squid/errors/${d} -type f | ${SORT} \
 -	    >>${TMPPLIST}
 +.for f in ${ERROR_FILES}
 +	@${ECHO_CMD} "etc/squid/errors/${d}/${f}" >>${TMPPLIST}
 +.endfor
  	@${ECHO_CMD} "@dirrm etc/squid/errors/${d}" >>${TMPPLIST}
  .endfor
  	@${ECHO_CMD} "@unexec rmdir %D/etc/squid/errors 2>/dev/null || true" \
 



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