From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jun 8 17:00:45 2006 Return-Path: X-Original-To: freebsd-ports-bugs@FreeBSD.org Delivered-To: freebsd-ports-bugs@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 274DB16EC9C; Thu, 8 Jun 2006 15:14:20 +0000 (UTC) (envelope-from shaun@inerd.com) Received: from dione.picobyte.net (host-212-158-207-124.bulldogdsl.com [212.158.207.124]) by mx1.FreeBSD.org (Postfix) with SMTP id 98F8A43D68; Thu, 8 Jun 2006 15:14:09 +0000 (GMT) (envelope-from shaun@inerd.com) Received: from charon.picobyte.net (charon.picobyte.net [IPv6:2001:4bd0:201e::fe03]) by dione.picobyte.net (Postfix) with ESMTP; Thu, 8 Jun 2006 16:14:06 +0100 (BST) Date: Thu, 8 Jun 2006 16:14:05 +0100 From: Shaun Amott To: Thierry Thomas Message-ID: <20060608151405.GA1127@picobyte.net> References: <200606041031.k54AVGD0011404@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <200606041031.k54AVGD0011404@freefall.freebsd.org> User-Agent: Mutt/1.5.11 (FreeBSD i386) Cc: freebsd-ports-bugs@FreeBSD.org Subject: Re: ports/98469: [MAINTAINER] news/inn: fix package X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 17:00:45 -0000 On Sun, Jun 04, 2006 at 10:31:16AM +0000, Thierry Thomas wrote: > > When installed on a clean machine from a newly created package, the > $PREFIX/news/db is created, but not populated: > > ls -l /usr/local/news/db > total 0 > > ls -l /usr/local/news/db.dist > total 6 > -rw-rw-r-- 1 news news 225 4 jui 12:21 active > -rw-rw-r-- 1 news news 0 4 jui 12:21 active.times > -rw-r--r-- 1 news news 0 4 jui 12:21 history > -rw-r--r-- 1 news news 43 4 jui 12:21 history.dir > -rw-rw-r-- 1 news news 333 4 jui 12:21 newsgroups > > I think that /usr/local/news/db.dist should contain this files too. > > Could you please check it? Okay, it really works this time. :-) -----inn.diff begins here----- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/news/inn/Makefile,v retrieving revision 1.75 diff -u -r1.75 Makefile --- Makefile 28 May 2006 19:38:52 -0000 1.75 +++ Makefile 8 Jun 2006 15:11:59 -0000 @@ -7,7 +7,7 @@ PORTNAME= inn PORTVERSION= 2.4.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= news ipv6 MASTER_SITES= ${MASTER_SITE_ISC} MASTER_SITE_SUBDIR= ${PORTNAME} @@ -184,6 +184,6 @@ ${MV} history.n.$${s} history.$${s} ; \ done ; \ fi) - @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL + @${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL PORTMODE .include Index: pkg-install =================================================================== RCS file: /home/ncvs/ports/news/inn/pkg-install,v retrieving revision 1.7 diff -u -r1.7 pkg-install --- pkg-install 28 May 2006 19:38:52 -0000 1.7 +++ pkg-install 8 Jun 2006 15:11:59 -0000 @@ -42,10 +42,27 @@ ${NEWSBASE}/spool/overview \ ${NEWSBASE}/spool/tmp - if [ -d ${NEWSBASE}/db.dist -a ! -f ${NEWSBASE}/db.dist/* ]; then - for f in ${NEWSBASE}/db/*; do - cp -pR ${f} ${NEWSBASE}/db.dist - done + if [ ${3:-""} = "PORTMODE" ]; then + fc=`ls ${NEWSBASE}/db.dist/* 2>/dev/null | wc -l` + + if [ -d ${NEWSBASE}/db.dist -a $fc -eq 0 ]; then + for f in ${NEWSBASE}/db/*; do + cp -pR ${f} ${NEWSBASE}/db.dist + done + else + mkdir -p ${NEWSBASE}/db.dist + for f in ${NEWSBASE}/db/*; do + touch ${NEWSBASE}/db.dist/${f##*/} + done + fi + else + fc=`ls ${NEWSBASE}/db/* 2>/dev/null | wc -l` + + if [ -d ${NEWSBASE}/db -a $fc -eq 0 ]; then + for f in ${NEWSBASE}/db.dist/*; do + cp -pR ${f} ${NEWSBASE}/db + done + fi fi ;; Index: pkg-plist =================================================================== RCS file: /home/ncvs/ports/news/inn/pkg-plist,v retrieving revision 1.23 diff -u -r1.23 pkg-plist --- pkg-plist 28 May 2006 19:38:52 -0000 1.23 +++ pkg-plist 8 Jun 2006 15:11:59 -0000 @@ -1,3 +1,4 @@ +@exec mkdir -p %D/news/db news/bin/actmerge news/bin/actsync news/bin/actsyncd @@ -105,11 +106,15 @@ @unexec f=history; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi @unexec f=history.dir; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi @unexec f=newsgroups; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi -@unexec rm -f %D/news/db.dist/active 2> /dev/null || true -@unexec rm -f %D/news/db.dist/active.times 2> /dev/null || true -@unexec rm -f %D/news/db.dist/history 2> /dev/null || true -@unexec rm -f %D/news/db.dist/history.dir 2> /dev/null || true -@unexec rm -f %D/news/db.dist/newsgroups 2> /dev/null || true +news/db.dist/active +news/db.dist/active.times +news/db.dist/history +news/db.dist/history.dir +news/db.dist/newsgroups +@unexec rm -f %D/news/db.dist/active.old || true +@unexec rm -f %D/news/db.dist/history.n.dir || true +@unexec rm -f %D/news/db.dist/history.n.hash || true +@unexec rm -f %D/news/db.dist/history.n.index || true %%SUB_WITHOUT_TAGGED_HASH%%@unexec f=history.hash; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi %%SUB_WITHOUT_TAGGED_HASH%%@unexec f=history.index; if cmp -s %D/news/db/$f %D/news/db.dist/$f; then rm -f %D/news/db/$f; fi %%SUB_WITHOUT_TAGGED_HASH%%@unexec rm -f %D/news/db.dist/history.hash 2> /dev/null || true @@ -257,15 +262,15 @@ %%PORTDOCS%%%%DOCSDIR%%/TODO %%PORTDOCS%%@dirrm %%DOCSDIR%% @dirrmtry news/tmp -@dirrm news/spool/overview -@dirrm news/spool/outgoing -@dirrm news/spool/innfeed -@dirrm news/spool/incoming/bad -@dirrm news/spool/incoming -@dirrm news/spool/articles -@dirrm news/spool/archive -@dirrm news/spool/tmp -@dirrm news/spool +@dirrmtry news/spool/overview +@dirrmtry news/spool/outgoing +@dirrmtry news/spool/innfeed +@dirrmtry news/spool/incoming/bad +@dirrmtry news/spool/incoming +@dirrmtry news/spool/articles +@dirrmtry news/spool/archive +@dirrmtry news/spool/tmp +@dirrmtry news/spool @dirrm news/run @dirrm news/lib @dirrm news/include/inn -----inn.diff ends here----- -- Shaun Amott [ PGP: 0x6B387A9A ] Scientia Est Potentia.