From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IpuE3-0002o8-0K for garchives@archives.gentoo.org; Wed, 07 Nov 2007 23:22:23 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.2/8.14.0) with SMTP id lA7NLTco021743; Wed, 7 Nov 2007 23:21:29 GMT Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by robin.gentoo.org (8.14.2/8.14.0) with ESMTP id lA7NJZEH019248 for ; Wed, 7 Nov 2007 23:19:36 GMT Received: from gentoo.org (c-67-171-150-177.hsd1.or.comcast.net [67.171.150.177]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id 4CB936538D for ; Wed, 7 Nov 2007 23:19:35 +0000 (UTC) Date: Wed, 7 Nov 2007 15:19:33 -0800 From: Donnie Berkholz To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in net-firewall/ipset: ChangeLog metadata.xml ipset-2.3.0.20070828.ebuild Message-ID: <20071107231933.GG5516@supernova> References: <20071105180321.GF25343@supernova> <1194426373.13571.10.camel@localhost> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1194426373.13571.10.camel@localhost> User-Agent: Mutt/1.5.16 (2007-06-09) Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by robin.gentoo.org id lA7NLTeY021743 X-Archives-Salt: f5bd5575-bcf5-449d-b6c5-4182940142c6 X-Archives-Hash: 37e1c3bec859a534980a5aab1413552e On 12:06 Wed 07 Nov , Peter Volkov wrote: > On Mon, 05/11/2007 =D0=B2 10:03 -0800, Donnie Berkholz wrote: > > BTW, is it possible to force portage to fetch sources if they do not=20 > exist in ${DISTDIR}? Also does there exist a better way to find=20 > iptables sources than find version without revision: >=20 > IPTVERINS=3D`echo $(best_version net-firewall/iptables) | \ > sed -n 's:^[^/]*/[[:alpha:]]*-\([0-9]\+\([.][0-9]\+\)*[a-z]\?\(_\(p= re\|p\|beta\|alpha\|rc\)[0-9]*\)*\)\(-r[0-9]\+\)\?$:\1:p' >=20 > and construct package name (iptables-${IPTVERINS}}.tar.bz2)? Not that I know of for fetching, but for the version, that sed seems=20 awfully complex. I'd probably use bash substitution like this instead: IPTVERINS=3D$(best_version net-firewall/iptables) # Strip revision (safe, since nothing else has a hyphen followed by 'r') IPTVERINS=3D${IPTVERINS%-r*} # Strip category IPTVERINS=3D${IPTVERINS#*/} I previously brought up the idea of a way to access portage's=20 CATEGORY/PN/PV parser from within ebuilds, but there didn't seem to be a=20 whole lot of interest. Thanks, Donnie --=20 gentoo-dev@gentoo.org mailing list