From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7925 invoked from network); 28 Mar 2004 00:20:58 +0000 Received: from smtp.gentoo.org (128.193.0.39) by eagle.gentoo.oregonstate.edu with DES-CBC3-SHA encrypted SMTP; 28 Mar 2004 00:20:58 +0000 Received: from lists.gentoo.org ([128.193.0.34] helo=eagle.gentoo.org) by smtp.gentoo.org with esmtp (Exim 4.24) id 1B7O2n-0006jR-L3 for arch-gentoo-portage-dev@lists.gentoo.org; Sun, 28 Mar 2004 00:20:53 +0000 Received: (qmail 9741 invoked by uid 50004); 28 Mar 2004 00:20:52 +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 6635 invoked from network); 28 Mar 2004 00:20:51 +0000 From: Roman Gaufman Reply-To: hackeron@dsl.pipex.com To: gentoo-portage-dev@lists.gentoo.org Date: Sun, 28 Mar 2004 00:21:08 +0000 User-Agent: KMail/1.6.1 References: <200402071318.47224.thomas@horsten.com> <200402071607.27581.tradergt@smelser.org> <200402080059.14318.thomas@horsten.com> In-Reply-To: <200402080059.14318.thomas@horsten.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <200403280021.08657.hackeron@dsl.pipex.com> Subject: Re: [gentoo-portage-dev] emerge feature request: Downloads managed by lock file system X-Archives-Salt: 706caeb5-ca22-4a1d-9eba-5a66e5283cc5 X-Archives-Hash: e9528a7e9d3c7fdf4a422b610c17e783 I'm no coder, but I wrote a little fetchcommand for this based on suggestions by Sven: FETCHCOMMAND="( while [ -e \${DISTDIR}/`basename \${URI}`.lock ]; do sleep 5; done && if [ ! -e \${DISTDIR}/`basename \${URI}` ]; then wget -t 5 --passive-ftp \${URI} -O \${DISTDIR}/`basename \${URI}`.lock && mv \${DISTDIR}/`basename \${URI}`.lock \${DISTDIR}/`basename \${URI}`; fi )" suggestions, modifications are welcome. On Sunday 08 February 2004 00:59, Thomas Horsten wrote: > On Saturday 07 February 2004 22:07, Jeff Smelser wrote: > > On Saturday 07 February 2004 11:17 am, Sven Vermeulen wrote: > > > A quick 'n dirty hack in the FETCHCOMMAND should suffice. Something > > > along the lines of (pseudocode): > > > > > > FETCHCOMMAND="if exists \${DISTDIR}/`basename \${URL}.lck`; then skip; > > > else \ touch \${DISTDIR}/`basename \${URL}.lck`; \ > > > /usr/bin/wget ...; \ > > > rm \${DISTDIR}/`basename \${URL}.lck`; fi" > > > > I tried this, and got: > >[..] Errors > > Notice that Sven said it's pseudocode, just to describe the concept. It's > incomplete, and has an invalid syntax. For example, "if exists ..." should > be "if [ -e ...]" to be proper sh code. > > The real thing would be a bit more complex. > > // Thomas > > > -- > gentoo-portage-dev@gentoo.org mailing list -- gentoo-portage-dev@gentoo.org mailing list