1 |
On Thursday 19 April 2007 04:28:37 holla.net@×××××.com wrote: |
2 |
> I had installed the 2006.1 release on an i686 system. |
3 |
> Few weeks later I just synced the portage (only) |
4 |
> using a snapshot. Now using quickpkg i want to |
5 |
> create the binary packages of 'system' and |
6 |
> install it on an underpowered system. |
7 |
> |
8 |
> I got the following tip from this forum for that.. |
9 |
> |
10 |
> emerge -pe system|sed 's/\[ebuild N \] /=/g' > pkglist.out |
11 |
> cat pkglist.out | xargs quickpkg |
12 |
> |
13 |
> But this fails because of the portage re-sync. Hence my question. |
14 |
|
15 |
This fails with portage >= 2.1.1 (iirc). Before that --emptytree caused all |
16 |
packages to show up as New - i.e. as not installed. With portage >= 2.1.1 |
17 |
they'll show as installed i.e. U(pdate) or R(eplace)... `man emerge` for |
18 |
details. And that's not the only thing that's flawed with that sed. It gets |
19 |
the version that would be installed rather that what is installed... |
20 |
|
21 |
This should work: |
22 |
|
23 |
# cd /var/db/pkg && \ |
24 |
emerge -peq system | sed -n 's|^\[ebuild[^]]*\] \([^ $]\+\).*$|\1|p' | \ |
25 |
sed -r 's/-[^-]+(-r[0-9]+)*$//' | while read pkg; do |
26 |
for p in "${pkg}-"*; do |
27 |
quickpkg "=$p"; |
28 |
done; |
29 |
done |
30 |
|
31 |
> Also from the man page |
32 |
> |
33 |
> --emptytree (-e) |
34 |
> Reinstalls all world packages and their |
35 |
> dependencies to the current USE specifi- |
36 |
> cations while differing from the installed |
37 |
> set of packages as little as possible. |
38 |
> |
39 |
> What is the real meaning of the term empty tree here? |
40 |
> It is something more than including the dependencies ? |
41 |
|
42 |
It's reinstall targets and all dependencies (indirect as well as direct). It |
43 |
used to be pretend nothing is installed but it doesn't really do that anymore |
44 |
(would result in stupid circular deps aborts even though the deps were |
45 |
installed)... |
46 |
|
47 |
-- |
48 |
Bo Andresen |