From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1691 invoked from network); 29 Mar 2004 19:35:09 +0000 Received: from smtp.gentoo.org (128.193.0.39) by eagle.gentoo.oregonstate.edu with DES-CBC3-SHA encrypted SMTP; 29 Mar 2004 19:35:09 +0000 Received: from lists.gentoo.org ([128.193.0.34] helo=eagle.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.24) id 1B82XN-00033M-3S for arch-gentoo-portage-dev@lists.gentoo.org; Mon, 29 Mar 2004 19:35:09 +0000 Received: (qmail 24261 invoked by uid 50004); 29 Mar 2004 19:35:08 +0000 Mailing-List: contact gentoo-portage-dev-help@gentoo.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail Reply-To: gentoo-portage-dev@lists.gentoo.org X-BeenThere: gentoo-portage-dev@gentoo.org Received: (qmail 7205 invoked from network); 29 Mar 2004 19:35:08 +0000 From: Roman Gaufman Reply-To: hackeron@dsl.pipex.com To: gentoo-portage-dev@lists.gentoo.org Date: Mon, 29 Mar 2004 19:35:31 +0000 User-Agent: KMail/1.6.1 References: <200402071318.47224.thomas@horsten.com> <200403291439.05887.hackeron@dsl.pipex.com> <20040329201005.55510d62.Michael.Waiblinger@web.de> In-Reply-To: <20040329201005.55510d62.Michael.Waiblinger@web.de> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200403291935.31558.hackeron@dsl.pipex.com> Subject: Re: [gentoo-portage-dev] Downloading while compiling - FETCHCOMMAND inside. X-Archives-Salt: f96d7b8d-1290-406e-b6d7-c350872e4bd9 X-Archives-Hash: 8b585bd30b9bfe1e29148c83c64f31e8 Well, that also works I suppose, I just don't like prozilla. In anycase with your solution if for the first URL you get file not found, or any other fetch error, you will need to remove lock file manually, you don't have that problem with my solution. On Monday 29 March 2004 18:10, Wiebel wrote: > My understanding of a lockfile seems to be different from your's so i'd > come up with something like: > > > FETCHPROG=proz > FETCHCOMMAND="( > while [ -e \${DISTDIR}/`basename \${URI}`.lock ]; do > sleep 5; done && > if [ ! -e \${DISTDIR}/`basename \${URI}` ]; then > touch \${DISTDIR}/`basename \${URI}`.lock; > \$FETCHPROG \${URI}; > rm \${DISTDIR}/`basename \${URI}`.lock; > fi > )" > > in this case error handling remains on the FETCHPROG side. > > > > On Mon, 29 Mar 2004 14:39:05 +0000 > > Roman Gaufman wrote: > > This fetchcommand will make sure portage doesn't download file > > simulatneously if you emerge -f package and emerge package in another > > terminal, it will make it wait for package to finish download. > > > > I improved it a little. Now if download fails (e.g. file not found), it > > wont freeze portage and will carry on, enjoy: > > > > FETCHCOMMAND="( > > while [ -e \${DISTDIR}/`basename \${URI}`.lock ]; do > > sleep 5; done && > > if [ ! -e \${DISTDIR}/`basename \${URI}` ]; then > > /usr/bin/wget -t 5 --passive-ftp \${URI} -O \${DISTDIR}/`basename > > \${URI}`.lock && > > mv \${DISTDIR}/`basename \${URI}`.lock \${DISTDIR}/`basename \${URI}` || > > rm \${DISTDIR}/`basename \${URI}`.lock; fi > > )" > > > > Please help test. And suggest a solution to remove lock file if user > > ctrl+c out of the wget. > > -- > gentoo-portage-dev@gentoo.org mailing list -- gentoo-portage-dev@gentoo.org mailing list