On 12:06 Wed 07 Nov     , Peter Volkov wrote:
> On Mon, 05/11/2007 в 10:03 -0800, Donnie Berkholz wrote:
>
> BTW, is it possible to force portage to fetch sources if they do not 
> exist in ${DISTDIR}? Also does there exist a better way to find 
> iptables sources than find version without revision:
> 
> IPTVERINS=`echo $(best_version net-firewall/iptables) | \
>     sed -n 
> 's:^[^/]*/[[:alpha:]]*-\([0-9]\+\([.][0-9]\+\)*[a-z]\?\(_\(pre\|p\|beta\|alpha\|rc\)[0-9]*\)*\)\(-r[0-9]\+\)\?$:\1:p'
> 
> and construct package name (iptables-${IPTVERINS}}.tar.bz2)?

Not that I know of for fetching, but for the version, that sed seems 
awfully complex. I'd probably use bash substitution like this instead:

IPTVERINS=$(best_version net-firewall/iptables)
# Strip revision (safe, since nothing else has a hyphen followed by 'r')
IPTVERINS=${IPTVERINS%-r*}
# Strip category
IPTVERINS=${IPTVERINS#*/}

I previously brought up the idea of a way to access portage's 
CATEGORY/PN/PV parser from within ebuilds, but there didn't seem to be a 
whole lot of interest.

Thanks,
Donnie
-- 
[EMAIL PROTECTED] mailing list

Reply via email to