Mike Frysinger <vapier@gentoo.org> wrote on 2010/10/08 10:20:22:
>
> On Friday, October 08, 2010 03:32:55 Joakim Tjernlund wrote:
> > Joakim Tjernlund wrote on 2010/10/08 08:37:51:
> > > Yeah, I came to the same conclusion. I used qlist and tar instead:
> > > TARGET="powerpc-e300c2-linux-gnu"
> > > MY_ROOT="/usr/${TARGET}"
> > > mkdir -p /tmp/${TARGET}
> > > qlist --quiet --all ${TARGET} > /tmp/${TARGET}/cross-tools
> > > ROOT=${MY_ROOT} qlist --quiet --all > /tmp/${TARGET}/pkgs
> > > #prefix all paths with our target root prefix
> > > sed -i s:/:${MY_ROOT}/: /tmp/${TARGET}/pkgs
> > > tar czf /tmp/${TARGET}.tgz -T /tmp/${TARGET}/cross-tools
> > > -T /tmp/${TARGET}/pkgs
> > >
> > > Would be nice if one could get rid of the sed hack by adding
> > > an option to qlist to list the true abs path.
> >
> > Perhaps a --root=${MY_ROOT} option?
> > Use like this:
> > qlist --root=${MY_ROOT} --quiet --all
> > instead of
> > ROOT=${MY_ROOT} qlist --quiet --all
> > The difference being --root lists the abs path, including ${MY_ROOT}
>
> tar has a --transform option
Ah, tried it and it doesn't seem to work for me.
It appears tar applies the transform after reading the files
from the file system
>
> i dont think the behavior you propose is intuitive. better to have a
> dedicated option to control this behavior (if we choose to include it) ...
OK, perhaps --abspath will do?
jocke