1 |
On 12:06 Wed 07 Nov , Peter Volkov wrote: |
2 |
> On Mon, 05/11/2007 в 10:03 -0800, Donnie Berkholz wrote: |
3 |
> |
4 |
> BTW, is it possible to force portage to fetch sources if they do not |
5 |
> exist in ${DISTDIR}? Also does there exist a better way to find |
6 |
> iptables sources than find version without revision: |
7 |
> |
8 |
> IPTVERINS=`echo $(best_version net-firewall/iptables) | \ |
9 |
> sed -n 's:^[^/]*/[[:alpha:]]*-\([0-9]\+\([.][0-9]\+\)*[a-z]\?\(_\(pre\|p\|beta\|alpha\|rc\)[0-9]*\)*\)\(-r[0-9]\+\)\?$:\1:p' |
10 |
> |
11 |
> and construct package name (iptables-${IPTVERINS}}.tar.bz2)? |
12 |
|
13 |
Not that I know of for fetching, but for the version, that sed seems |
14 |
awfully complex. I'd probably use bash substitution like this instead: |
15 |
|
16 |
IPTVERINS=$(best_version net-firewall/iptables) |
17 |
# Strip revision (safe, since nothing else has a hyphen followed by 'r') |
18 |
IPTVERINS=${IPTVERINS%-r*} |
19 |
# Strip category |
20 |
IPTVERINS=${IPTVERINS#*/} |
21 |
|
22 |
I previously brought up the idea of a way to access portage's |
23 |
CATEGORY/PN/PV parser from within ebuilds, but there didn't seem to be a |
24 |
whole lot of interest. |
25 |
|
26 |
Thanks, |
27 |
Donnie |
28 |
-- |
29 |
gentoo-dev@g.o mailing list |