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