Gentoo Archives: gentoo-embedded

From: Joakim Tjernlund <joakim.tjernlund@×××××××××.se>
To: Mike Frysinger <vapier@g.o>
Cc: gentoo-embedded@l.g.o
Subject: Re: [gentoo-embedded] crossdev improvements
Date: Fri, 08 Oct 2010 10:18:02
Message-Id: OF516604AB.7E45413D-ONC12577B6.00348A06-C12577B6.0034DBF5@transmode.se
In Reply to: Re: [gentoo-embedded] crossdev improvements by Mike Frysinger
1 Mike Frysinger <vapier@g.o> wrote on 2010/10/08 10:20:22:
2 >
3 > On Friday, October 08, 2010 03:32:55 Joakim Tjernlund wrote:
4 > > Joakim Tjernlund wrote on 2010/10/08 08:37:51:
5 > > > Yeah, I came to the same conclusion. I used qlist and tar instead:
6 > > > TARGET="powerpc-e300c2-linux-gnu"
7 > > > MY_ROOT="/usr/${TARGET}"
8 > > > mkdir -p /tmp/${TARGET}
9 > > > qlist --quiet --all ${TARGET} > /tmp/${TARGET}/cross-tools
10 > > > ROOT=${MY_ROOT} qlist --quiet --all > /tmp/${TARGET}/pkgs
11 > > > #prefix all paths with our target root prefix
12 > > > sed -i s:/:${MY_ROOT}/: /tmp/${TARGET}/pkgs
13 > > > tar czf /tmp/${TARGET}.tgz -T /tmp/${TARGET}/cross-tools \
14 > > > -T /tmp/${TARGET}/pkgs
15 > > >
16 > > > Would be nice if one could get rid of the sed hack by adding
17 > > > an option to qlist to list the true abs path.
18 > >
19 > > Perhaps a --root=${MY_ROOT} option?
20 > > Use like this:
21 > > qlist --root=${MY_ROOT} --quiet --all
22 > > instead of
23 > > ROOT=${MY_ROOT} qlist --quiet --all
24 > > The difference being --root lists the abs path, including ${MY_ROOT}
25 >
26 > tar has a --transform option
27
28 Ah, tried it and it doesn't seem to work for me.
29 It appears tar applies the transform after reading the files
30 from the file system :(
31
32 >
33 > i dont think the behavior you propose is intuitive. better to have a
34 > dedicated option to control this behavior (if we choose to include it) ...
35
36 OK, perhaps --abspath will do?
37
38 jocke