public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] List installed packaged for 'system'
@ 2007-04-19  2:28 holla.net
  2007-04-19  2:50 ` Bo Ørsted Andresen
  0 siblings, 1 reply; 5+ messages in thread
From: holla.net @ 2007-04-19  2:28 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1187 bytes --]

Hello,

short question:
How can I list all the installed packages with their
version no.s which belong to the virtual 'system' ?

   emerge -pe system  ---> this is giving me the list of
             packages  which are latest in the portage.
              I want the same list  but what is actually
              installed.

long story:

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.


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 ?


thanks
sathish

[-- Attachment #2: Type: text/html, Size: 2394 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] List installed packaged for 'system'
  2007-04-19  2:28 [gentoo-user] List installed packaged for 'system' holla.net
@ 2007-04-19  2:50 ` Bo Ørsted Andresen
  2007-04-19  2:56   ` Bo Ørsted Andresen
  2007-04-19  3:15   ` Bo Ørsted Andresen
  0 siblings, 2 replies; 5+ messages in thread
From: Bo Ørsted Andresen @ 2007-04-19  2:50 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 1872 bytes --]

On Thursday 19 April 2007 04:28:37 holla.net@gmail.com 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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] List installed packaged for 'system'
  2007-04-19  2:50 ` Bo Ørsted Andresen
@ 2007-04-19  2:56   ` Bo Ørsted Andresen
  2007-04-19  3:15   ` Bo Ørsted Andresen
  1 sibling, 0 replies; 5+ messages in thread
From: Bo Ørsted Andresen @ 2007-04-19  2:56 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] List installed packaged for 'system'
  2007-04-19  2:50 ` Bo Ørsted Andresen
  2007-04-19  2:56   ` Bo Ørsted Andresen
@ 2007-04-19  3:15   ` Bo Ørsted Andresen
  2007-04-20  1:36     ` holla.net
  1 sibling, 1 reply; 5+ messages in thread
From: Bo Ørsted Andresen @ 2007-04-19  3:15 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 654 bytes --]

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

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] List installed packaged for 'system'
  2007-04-19  3:15   ` Bo Ørsted Andresen
@ 2007-04-20  1:36     ` holla.net
  0 siblings, 0 replies; 5+ messages in thread
From: holla.net @ 2007-04-20  1:36 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 888 bytes --]

On 4/19/07, Bo Ørsted Andresen <bo.andresen@zlin.dk> 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
>
>

[-- Attachment #2: Type: text/html, Size: 1460 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-04-20  1:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-19  2:28 [gentoo-user] List installed packaged for 'system' holla.net
2007-04-19  2:50 ` Bo Ørsted Andresen
2007-04-19  2:56   ` Bo Ørsted Andresen
2007-04-19  3:15   ` Bo Ørsted Andresen
2007-04-20  1:36     ` holla.net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox