Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 8 Apr 2001 20:23:00 -0700
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Tim Zingelman <zingelman@fnal.gov>
Cc:        freebsd-stable@FreeBSD.ORG
Subject:   Re: make release broken with too many ports/distfiles...
Message-ID:  <20010408202300.J15938@fw.wintelcom.net>
In-Reply-To: <Pine.GSO.4.30.0104082045560.940-100000@nova.fnal.gov>; from zingelman@fnal.gov on Sun, Apr 08, 2001 at 09:31:47PM -0500
References:  <Pine.GSO.4.30.0104082045560.940-100000@nova.fnal.gov>

next in thread | previous in thread | raw e-mail | index | archive | help
* Tim Zingelman <zingelman@fnal.gov> [010408 19:32] wrote:
> On a system with all (or most of) the distfiles existing in
> /usr/ports/distfiles, line 680 of:
> 
>  $FreeBSD: src/release/Makefile,v 1.536.2.40 2000/03/27 16:49:58
> 
> 	@-rm -rf /usr/ports/distfiles/*
> 
> fails to cleanup the duplicated distfiles directory, due to: "Argument
> list too long", and as a result the ports tarball includes the whole set
> of distfiles.  (and that won't fit on a cdrom :)
> 
> Just for reference...
> # cd /usr/ports/distfiles
> # ls *
> /bin/ls: Argument list too long.
> # echo * | wc -c
>    83575
> #

ha! :)

> 
> Here's a trivial patch:

Please provide more context, which makefile is this patch to be
applied against?

> 
> diff -w -u -b -r1.536.2.40 Makefile
> --- Makefile    2001/03/27 16:49:58     1.536.2.40
> +++ Makefile    2001/04/09 02:21:47
> @@ -677,7 +677,8 @@
>         @ln -f ${CD_DISC1}/kernel ${CD_DISC2}/kernel
>  .endif
>  .if !defined(NOPORTS)
> -       @-rm -rf /usr/ports/distfiles/*
> +       @-rm -rf /usr/ports/distfiles
> +       @-mkdir /usr/ports/distfiles
>         @mkdir -p ${CD_DISC1}/ports && \
>           tar --exclude CVS -czf ${CD_DISC1}/ports/ports.tgz -C /usr ports && \
>           cp ${.CURDIR}/scripts/ports-install.sh ${CD_DISC1}/ports/install.sh \
> 
> 
> I just started a make release, with this patch in place.  I'll reply to
> this email only if it does not solve the problem as I expect it to.

What if ports/distfiles is a symlink?  Or is this only done during
make release?

How about something like this:

find /usr/ports/distfiles/ -mindepth 1 | xargs rm -rf

?

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
Represent yourself, show up at BABUG http://www.babug.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




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