Re: [gentoo-user] List installed packaged for 'system'

2007-04-18 Thread Bo Ørsted Andresen
On Thursday 19 April 2007 04:28:37 [EMAIL PROTECTED] wrote:
> I had installed the 2006.1 release on an i686 system.
>  Few weeks later I just synced the portage (only)
>  using a snapshot. Now using quickpkg i want to
>  create the binary packages of 'system' and
>  install it on an underpowered system.
>
> I got the following tip from this forum for that..
>
> emerge -pe system|sed 's/\[ebuild  N\] /=/g' > pkglist.out
> cat pkglist.out | xargs quickpkg
>
> But this fails because of the portage re-sync. Hence my question.

This fails with portage >= 2.1.1 (iirc). Before that --emptytree caused all 
packages to show up as New - i.e. as not installed. With portage >= 2.1.1 
they'll show as installed i.e. U(pdate) or R(eplace)... `man emerge` for 
details. And that's not the only thing that's flawed with that sed. It gets 
the version that would be installed rather that what is installed...

This should work:

# cd /var/db/pkg && \
emerge -peq system | sed -n 's|^\[ebuild[^]]*\] \([^ $]\+\).*$|\1|p' | \
sed -r 's/-[^-]+(-r[0-9]+)*$//' | while read pkg; do
for p in "${pkg}-"*; do
quickpkg "=$p";
done;
done

> Also from the man page
>
>--emptytree (-e)
>   Reinstalls  all world packages and their
>   dependencies to the current USE specifi-
>   cations while differing from the installed
>   set of packages as little as possible.
>
> What is the real meaning of the term empty tree here?
> It is something more than including the dependencies ?

It's reinstall targets and all dependencies (indirect as well as direct). It 
used to be pretend nothing is installed but it doesn't really do that anymore 
(would result in stupid circular deps aborts even though the deps were 
installed)...

-- 
Bo Andresen


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] List installed packaged for 'system'

2007-04-18 Thread Bo Ørsted Andresen
On Thursday 19 April 2007 04:50:22 Bo Ørsted Andresen wrote:
>     sed -r 's/-[^-]+(-r[0-9]+)*$//' | while read pkg; do

Probably a good idea to insert a `sort -u`:

sed -r 's/-[^-]+(-r[0-9]+)*$//' | sort -u | while read pkg; do

-- 
Bo Andresen


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] List installed packaged for 'system'

2007-04-18 Thread Bo Ørsted Andresen
On Thursday 19 April 2007 04:50:22 Bo Ørsted Andresen wrote:
> # cd /var/db/pkg && \
>    emerge -peq system | sed -n 's|^\[ebuild[^]]*\] \([^ $]\+\).*$|\1|p' | \
>sed -r 's/-[^-]+(-r[0-9]+)*$//' | while read pkg; do
>        for p in "${pkg}-"*; do
>            quickpkg "=$p";
>        done;
>    done

Hah, I thought `quickpkg automake` would only make a binpkg for the highest 
version available. Turns out it handles all versions installed. So...

# emerge -peq system | sed -n 's|^\[ebuild[^]]*\] \([^ $]\+\).*$|\1|p' | \
sed -r 's/-[^-]+(-r[0-9]+)*$//' | sort -u | xargs quickpkg

:)

-- 
Bo Andresen


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] List installed packaged for 'system'

2007-04-19 Thread [EMAIL PROTECTED]

On 4/19/07, Bo Ørsted Andresen <[EMAIL PROTECTED]> wrote:


On Thursday 19 April 2007 04:50:22 Bo Ørsted Andresen wrote:
> # cd /var/db/pkg && \
> emerge -peq system | sed -n 's|^\[ebuild[^]]*\] \([^ $]\+\).*$|\1|p' | \
>sed -r 's/-[^-]+(-r[0-9]+)*$//' | while read pkg; do
> for p in "${pkg}-"*; do
> quickpkg "=$p";
> done;
> done

Hah, I thought `quickpkg automake` would only make a binpkg for the
highest
version available. Turns out it handles all versions installed. So...

# emerge -peq system | sed -n 's|^\[ebuild[^]]*\] \([^ $]\+\).*$|\1|p' | \
sed -r 's/-[^-]+(-r[0-9]+)*$//' | sort -u | xargs quickpkg

:)



Thanks, I was able to make the binary packages.
But my attempt to install 2006.1 on the low end machine was a disaster.
I will start a separate thread on that.


sathish


--

Bo Andresen